Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
	"properties": {
		...
		"address": {
			"city": {...},
			"state": {...}
		}
	}
}


Container-nodes can be nested.


The property "type": "node" isn't required (or recommended) but can be used for clarity.

Container-nodes can be nested.

...

 If the  "type", "required" and/or "description" properties are used, the sub-properties must be  contained inside of  the "items" property:

Code Block
{
	"properties": {
		...
		"address": {
			"type": "node",
			"description": "Customer primary address",
			"items": {
				"city": {...},
				"state": {...}
			}
		}
	}
}


PropertyDescription
requiredA non-null value for this item must be provided (false by default). Items inside the container-node can
override the parent container node's required setting.
itemsContains the list of sub-properties in the node. This is required only if the "type", "required" and/or "description" properties are used.
descriptionA human-readable description of the property.


String

A string of characters variable. The following properties are applied when data is posted for this item:

PropertyDescription
minMinimum string length.

max

Maximum string length.
regexString must match the regex pattern.
defaultIf the item is not provided or is null, the default value is used.
requiredA non-null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

Int

A numeric, whole number.

PropertyDescription
minMinimum value allowed.

max

Maximum value allowed.
defaultIf the item is not provided or is null, the default value is used.
requiredA non-null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

Number

A numeric, decimal number with up to 15 bits of precision.

PropertyDescription
minMinimum value allowed.

max

Maximum value allowed.
defaultIf the item is not provided or is null, the default value is used.
requiredA non-null value for this item must be provided (false by default)(false by default).
descriptionA human-readable description of the property.

Boolean

A Boolean, allowing only the two values of true or false

PropertyDescription
defaultIf the item is not provided or is null, the default value is used.
requiredA non-null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

Enum

Enumerations (enums) can be either a primitive type (stringint, or a number) or, a cross-reference to an entire set or subset of data records in another domain.

PropertyDescription
enumType

Types of enums:

  • int: A numeric whole number.
  • number: A numeric, decimal number with up to 15 bits of precision.
  • string: A string of character variables. 
  • uri: A cross-reference to another domain; use in conjunction with xrefLocation.
xrefLocation

If enumType is set to uri then xrefLocation points to the domain that makes up the elements of the enumeration.

For example, if a version of a domain "countries"contains a list of data record values that represent all countries then a domain can reference it by specifying an enumeration type of uri and the desired domain and version number:

enumType: uri

xrefLocation: /domains/countries:v1

A subset of the data record values in the domain can be specified using the data property.

data

An array containing a comma separated list of enum values e.g.

"data":["Mays", "McCovey", "Marichal"]

Is a three-item string enumeration.

If the enumType is uri the list of values in the xrefLocation can be limited to the subset of data records whose display values contained in the data array. For example, if /domains/countries:v1 contains a list of all countries but the domain should only reference countries in North America, then the data entries would be:

"data":["CANADA", "USA", "MEXICO"]

Assuming the display values for Canada, the United States and Mexico are those shown above in the data elements.

defaultIf the item is not provided or is null, the default value is used.
requiredA non-null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

URI

A properly formed Uniform Resource Locator (URI). By default, a property of type uri can be any valid URI or it can be limited by a regex pattern or to a domain cross-reference (xrefLocation: "xref").

...

PropertyDescription
uriTypeThe uri type (e.g. url, blob, xref).

xrefLocation

The location of the domain item or domain item data element.  Used in conjunction with "uritype": "xref".
regexString must match the regex pattern.
defaultIf the item is not provided or is null, the default value is used.
requiredA non null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

Array

An array can contain any type of value including nodes and nested arrays.

PropertyDescription
minItemsMinimum items allowed in the array.

maxItems

Maximum items allowed in the array
defaultIf the item is not provided or is null, the default value is used.
itemsContains the list of sub-properties in the node.
requiredA non-null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

Rules About Required and Default Values

...