The following shows an example of a property with a value based on a simple type:
{
"nc:AddressCategoryCode": "residential"
}
{
"nc:AddressCategoryCodeSimpleType": {
"type": "string",
"description": "A data type for a kind of address.",
"oneOf": [
{
"enum": [ "business" ],
"description": "business"
},
{
"enum": [ "residential" ],
"description": "residential"
}
]
}
}
See Facets in JSON for examples of simple types with other kinds of facets.
The following is a template for a simple type with an enumeration:
{
"NAME": {
"type": "BASE_TYPE",
"description": "A data type for ...",
"oneOf": [
{
"enum": [ "CODE" ],
"description": "DEFINITION"
}
]
}
}
The following is another template for a simple type with an enumeration:
{
"definitions": {
"SIMPLE_TYPE": {
"description": "TYPE_DEFINITION",
"type": "BASE_TYPE",
"FACET_KIND": "FACET_VALUE"
},
}
}