Skip to content

Instantly share code, notes, and snippets.

@jewzaam
Created January 5, 2015 18:48
Show Gist options
  • Save jewzaam/a9a3a3d585a97688d5e9 to your computer and use it in GitHub Desktop.
Save jewzaam/a9a3a3d585a97688d5e9 to your computer and use it in GitHub Desktop.
Example JSON Schema for lightblue metadata: country/1.0.0
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "JSON schema for entity 'country' version '1.0.0' (see https://raw.githubusercontent.com/lightblue-platform/openshift-lightblue-cart/master/versions/shared/template/src/main/data/country.json)",
"properties": {
"createdBy": {
"type": "string",
"description": "Identifies who created this entity. Ideally, a login. Worst case an ID from some other system."
},
"creationDate": {
"type": "string",
"pattern": "[0-9]{8} [0-9]{10}[+-][0-9]{0,4}",
"description": "Date the entity was created."
},
"lastUpdatedBy": {
"type": "string",
"description": "Identifies who last updated this entity. Ideally, a login. Worst case an ID from some other system."
},
"lastUpdateDate": {
"type": "string",
"pattern": "[0-9]{8} [0-9]{10}[+-][0-9]{0,4}",
"description": "Date the entity was last updated."
},
"name": {
"type": "string",
"description": ""
},
"iso2Code": {
"type": "string",
"description": ""
},
"iso3Code": {
"type": "string",
"description": ""
},
"required": [
"createdBy",
"creationDate",
"lastUpdatedBy",
"lastUpdateDate",
"name",
"iso2Code",
"iso3Code"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment