adobe/xdm

Name: xdm

Owner: Adobe Systems Incorporated

Description: Experience Data Model

Created: 2017-12-04 14:40:24.0

Updated: 2018-01-17 14:25:37.0

Pushed: 2018-01-18 19:21:17.0

Homepage:

Size: 2108

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Experience Data Model (XDM) Schema

CircleCI

The Experience Data Model (XDM) is the language of digital experiences. XDM is a publicly documented specification, driven by Adobe to improve the interoperability, expressivness, and power of digital experiences. This repository contains the source code for the formal specification of the XDM model, using the JSON Schema language.

Read the XDM Spec
Project Layout

The project is laid out in the following way:

Tooling

The tooling project (e.g. for generating Markdown documentation, example validation, JSON Schema documentation inlining) is located in the adobe/jsonschema2md git repository.

Dependencies

You need:

  1. Node.js and npm
  2. curl
AEM Package Generation

When all dependencies are installed, simply run

m install
m run package

This will fetch all dependencies, then generate Markdown in the docs/reference directory and then generate an AEM package under xdm-docs.zip. The package can be uploaded using the command

m run upload

upload will upload to the Adobe I/O Staging instance. To upload to production, use upload:prod instead.

The AEM password is not saved in this repository (of course), but you can set it using this command:

m config set xdm-models:aem_password $AEM_PASSWORD

This is assuming $AEM_PASSWORD has been provided to your Continuous Integration system or set on the command line beforehand.

Running upload will only make the documentation visible on the “author” instance, this means visitors to the site cannot see any of the documentation. To publish it, run the npm run activate or npm run activate:prod commands.

A full process would then look like this:

m config set xdm-models:aem_password $AEM_PASSWORD
m install
m test
m run package
m run upload
m run activate

This will generate documentation, create an AEM package, install it on (stage) author, and activate it from there, so that visitors can read the documentation.

A Note on Dependencies

The package.json script will fetch a released version of the AEM Markdown Importer JAR using curl.

Validation

This project contains a minimal validation script that depends on NPM. You can use it to validate the JSON example files against the JSON Schema files after making changes to either.

m install
m test

m-models@0.0.1 test /Users/lars/Code/models
 validate.sh

dating schemas/common/eventenvelope.example.1.json against schemas/common/eventenvelope.schema.json
mas/common/eventenvelope.example.1.json valid
dating schemas/common/eventenvelope.example.2.json against schemas/common/eventenvelope.schema.json
mas/common/eventenvelope.example.2.json valid
dating schemas/common/eventenvelope.example.3.json against schemas/common/eventenvelope.schema.json
mas/common/eventenvelope.example.3.json valid
dating schemas/common/eventenvelope.example.4.json against schemas/common/eventenvelope.schema.json
mas/common/eventenvelope.example.4.json valid
dating schemas/common/eventenvelope.example.5.json against schemas/common/eventenvelope.schema.json
mas/common/eventenvelope.example.5.json valid

If you see warnings or error messages (or an non-zero exit code), fix them before making a pull request.

Naming Conventions
Links
Specifications
Vocabularies/Ontologies
License/Copyright

Copyright 2017 Adobe Systems Incorporated. All rights reserved. This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license.

You are free to:

This license is acceptable for Free Cultural Works.

The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.