draft-ietf-asdf-sdf-00.txt   draft-ietf-asdf-sdf-01.txt 
T2TRG M. Koster, Ed. T2TRG M. Koster, Ed.
Internet-Draft SmartThings Internet-Draft SmartThings
Intended status: Informational C. Bormann, Ed. Intended status: Informational C. Bormann, Ed.
Expires: 19 May 2021 Universit├Ąt Bremen TZI Expires: 19 May 2021 Universit├Ąt Bremen TZI
15 November 2020 15 November 2020
Semantic Definition Format (SDF) for Data and Interactions of Things Semantic Definition Format (SDF) for Data and Interactions of Things
draft-ietf-asdf-sdf-00 draft-ietf-asdf-sdf-01
Abstract Abstract
The Semantic Definition Format (SDF) is a format for domain experts The Semantic Definition Format (SDF) is a format for domain experts
to use in the creation and maintenance of data and interaction models to use in the creation and maintenance of data and interaction models
in the Internet of Things. It was created as a common language for in the Internet of Things. It was created as a common language for
use in the development of the One Data Model liaison organization use in the development of the One Data Model liaison organization
(OneDM) definitions. Tools convert this format to database formats (OneDM) definitions. Tools convert this format to database formats
and other serializations as needed. and other serializations as needed.
An SDF specification describes definitions of SDF Objects and their An SDF specification describes definitions of SDF Objects and their
associated interactions (Events, Actions, Properties), as well as the associated interactions (Events, Actions, Properties), as well as the
Data types for the information exchanged in those interactions. Data types for the information exchanged in those interactions.
A JSON format representation of SDF 1.0 is defined in this document. A JSON format representation of SDF 1.0 was defined in the previous
(-00) version of this document. SDF 1.1 is expected to be defined in
(This is a republication of draft-onedm-t2trg-sdf-00 as an IETF ASDF a future version; the present document represents a draft on the way
Working Group document, with no technical changes, a superfluous from 1.0 to 1.1. Hence, this is not an implementation draft.
figure removed, and some tool version induced reformatting.)
Contributing Contributing
Recent versions of this document are available at its GitHub Recent versions of this document are available at its GitHub
repository https://github.com/ietf-wg-asdf/SDF (https://github.com/ repository https://github.com/ietf-wg-asdf/SDF (https://github.com/
ietf-wg-asdf/SDF) -- this also provides an issue tracker as well as a ietf-wg-asdf/SDF) -- this also provides an issue tracker as well as a
way to supply "pull requests". way to supply "pull requests".
General discussion of this SDF Internet-Draft happens on the mailing General discussion of this SDF Internet-Draft happens on the mailing
list of the IETF ASDF Working Group, asdf@ietf.org (subscribe at list of the IETF ASDF Working Group, asdf@ietf.org (subscribe at
skipping to change at page 3, line 9 skipping to change at page 3, line 9
3.3. Definitions section . . . . . . . . . . . . . . . . . . . 13 3.3. Definitions section . . . . . . . . . . . . . . . . . . . 13
4. Names and namespaces . . . . . . . . . . . . . . . . . . . . 14 4. Names and namespaces . . . . . . . . . . . . . . . . . . . . 14
4.1. Structure . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1. Structure . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2. Contributing global names . . . . . . . . . . . . . . . . 15 4.2. Contributing global names . . . . . . . . . . . . . . . . 15
4.3. Referencing global names . . . . . . . . . . . . . . . . 15 4.3. Referencing global names . . . . . . . . . . . . . . . . 15
4.4. sdfRef . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.4. sdfRef . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.5. sdfRequired . . . . . . . . . . . . . . . . . . . . . . . 17 4.5. sdfRequired . . . . . . . . . . . . . . . . . . . . . . . 17
4.5.1. Optionality using the keyword "sdfRequired" . . . . . 17 4.5.1. Optionality using the keyword "sdfRequired" . . . . . 17
4.6. Common Qualities . . . . . . . . . . . . . . . . . . . . 18 4.6. Common Qualities . . . . . . . . . . . . . . . . . . . . 18
4.7. Data Qualities . . . . . . . . . . . . . . . . . . . . . 19 4.7. Data Qualities . . . . . . . . . . . . . . . . . . . . . 19
5. Keywords for definition groups . . . . . . . . . . . . . . . 22 5. Keywords for definition groups . . . . . . . . . . . . . . . 23
5.1. sdfObject . . . . . . . . . . . . . . . . . . . . . . . . 22 5.1. sdfObject . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2. sdfProperty . . . . . . . . . . . . . . . . . . . . . . . 22 5.2. sdfProperty . . . . . . . . . . . . . . . . . . . . . . . 23
5.3. sdfAction . . . . . . . . . . . . . . . . . . . . . . . . 23 5.3. sdfAction . . . . . . . . . . . . . . . . . . . . . . . . 24
5.4. sdfEvent . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4. sdfEvent . . . . . . . . . . . . . . . . . . . . . . . . 24
5.5. sdfData . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.5. sdfData . . . . . . . . . . . . . . . . . . . . . . . . . 25
6. High Level Composition . . . . . . . . . . . . . . . . . . . 24 6. High Level Composition . . . . . . . . . . . . . . . . . . . 25
6.1. Paths in the model namespaces . . . . . . . . . . . . . . 25 6.1. Paths in the model namespaces . . . . . . . . . . . . . . 26
6.2. Modular Composition . . . . . . . . . . . . . . . . . . . 25 6.2. Modular Composition . . . . . . . . . . . . . . . . . . . 26
6.2.1. Use of the "sdfRef" keyword to re-use a definition . 25 6.2.1. Use of the "sdfRef" keyword to re-use a definition . 26
6.3. sdfThing . . . . . . . . . . . . . . . . . . . . . . . . 26 6.3. sdfThing . . . . . . . . . . . . . . . . . . . . . . . . 27
6.4. sdfProduct . . . . . . . . . . . . . . . . . . . . . . . 27 6.4. sdfProduct . . . . . . . . . . . . . . . . . . . . . . . 28
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.1. Normative References . . . . . . . . . . . . . . . . . . 27 7.1. Normative References . . . . . . . . . . . . . . . . . . 28
7.2. Informative References . . . . . . . . . . . . . . . . . 28 7.2. Informative References . . . . . . . . . . . . . . . . . 29
Appendix A. Formal Syntax of SDF . . . . . . . . . . . . . . . . 29 Appendix A. Formal Syntax of SDF . . . . . . . . . . . . . . . . 30
Appendix B. json-schema.org Rendition of SDF Syntax . . . . . . 32 Appendix B. json-schema.org Rendition of SDF Syntax . . . . . . 33
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 49 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 34
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 49 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34
1. Introduction 1. Introduction
The Semantic Definition Format (SDF) is a format for domain experts The Semantic Definition Format (SDF) is a format for domain experts
to use in the creation and maintenance of data and interaction models to use in the creation and maintenance of data and interaction models
in the Internet of Things. It was created as a common language for in the Internet of Things. It was created as a common language for
use in the development of the One Data Model liaison organization use in the development of the One Data Model liaison organization
(OneDM) definitions. Tools convert this format to database formats (OneDM) definitions. Tools convert this format to database formats
and other serializations as needed. and other serializations as needed.
An SDF specification describes definitions of SDF Objects and their An SDF specification describes definitions of SDF Objects and their
associated interactions (Events, Actions, Properties), as well as the associated interactions (Events, Actions, Properties), as well as the
Data types for the information exchanged in those interactions. Data types for the information exchanged in those interactions.
A JSON format representation of SDF 1.0 is defined in this document. A JSON format representation of SDF 1.0 was defined in the previous
(-00) version of this document. SDF 1.1 is expected to be defined in
a future version; the present document represents a draft on the way
from 1.0 to 1.1. Hence, this is not an implementation draft.
1.1. Terminology and Conventions 1.1. Terminology and Conventions
Thing: A physical device that is also made available in the Internet Thing: A physical device that is also made available in the Internet
of Things. The term is used here for Things that are notable for of Things. The term is used here for Things that are notable for
their interaction with the physical world beyond interaction with their interaction with the physical world beyond interaction with
humans; a temperature sensor or a light might be a Thing, but a humans; a temperature sensor or a light might be a Thing, but a
router that employs both temperature sensors and indicator lights router that employs both temperature sensors and indicator lights
might exhibit less Thingness, as the effects of its functioning might exhibit less Thingness, as the effects of its functioning
are mostly on the digital side. are mostly on the digital side.
skipping to change at page 4, line 29 skipping to change at page 4, line 29
represented in SDF as an entry in a JSON map (object) that serves represented in SDF as an entry in a JSON map (object) that serves
as a definition or declaration. as a definition or declaration.
Entry: A key-value pair in a map. (In JSON maps, sometimes also Entry: A key-value pair in a map. (In JSON maps, sometimes also
called "member".) called "member".)
Block: One or more entries in a JSON map that is part of an SDF Block: One or more entries in a JSON map that is part of an SDF
specification; these entries together serve a specific function. specification; these entries together serve a specific function.
Group: An entry in the main SDF map and in certain nested Group: An entry in the main SDF map and in certain nested
definitions that either has a Class Name Keyword as its key and a definitions that has a Class Name Keyword as its key and a map of
map of definition entries (Definition Group) or a Parameter Name definition entries (Definition Group) as a value.
Keyword as its key and an array of SDF pointers as a value
(Parameter Group).
Class Name Keyword: One of sdfThing, sdfProduct, sdfObject, Class Name Keyword: One of sdfThing, sdfProduct, sdfObject,
sdfProperty, sdfAction, sdfEvent, or sdfData; the Classes for sdfProperty, sdfAction, sdfEvent, or sdfData; the Classes for
these type keywords are capitalized and prefixed with "sdf". these type keywords are capitalized and prefixed with "sdf".
Class: Abstract term for the information that is contained in groups Class: Abstract term for the information that is contained in groups
identified by a Class Name Keyword. identified by a Class Name Keyword.
Property: An affordance that can potentially be used to read, write, Property: An affordance that can potentially be used to read, write,
and/or observe state on an Object. (Note that Entries are often and/or observe state on an Object. (Note that Entries are often
skipping to change at page 5, line 9 skipping to change at page 5, line 8
Action: An affordance that can potentially be used to perform a Action: An affordance that can potentially be used to perform a
named operation on an Object. named operation on an Object.
Event: An affordance that can potentially be used to obtain Event: An affordance that can potentially be used to obtain
information about what happened to an Object. information about what happened to an Object.
Object: A grouping of Property, Action, and Event definitions; the Object: A grouping of Property, Action, and Event definitions; the
main "atom" of reusable semantics for model construction. (Note main "atom" of reusable semantics for model construction. (Note
that JSON maps are often called JSON objects due to JSON's that JSON maps are often called JSON objects due to JSON's
JavaScript heritage; properties in other environments; in this JavaScript heritage; in this document, the term Object is
document, the term Object is specifically reserved for the above specifically reserved for the above grouping, even if the type
grouping, even if the type name "object" might be imported from a name "object" might be imported from a data definition language
data definition language with the other semantics.) with the other semantics.)
Parameter name keyword: One of sdfInputData, sdfOutputData,
sdfRequiredInputData, or sdfRequired.
Element: A part or an aspect of something abstract; used here in its Element: A part or an aspect of something abstract; used here in its
usual English definition. (Occasionally, also used specifically usual English definition. (Occasionally, also used specifically
for the elements of JSON arrays.) for the elements of JSON arrays.)
Definition: An entry in a Definition Group; the entry creates a new Definition: An entry in a Definition Group; the entry creates a new
semantic term for use in SDF models and associates it with a set semantic term for use in SDF models and associates it with a set
of qualities. of qualities.
Declaration: A reference to and a use of a definition within an Declaration: A reference to and a use of a definition within an
skipping to change at page 6, line 29 skipping to change at page 6, line 29
"value": { "value": {
"description": "The state of the switch; false for off and true for on." "description": "The state of the switch; false for off and true for on."
"type": "boolean" "type": "boolean"
} }
}, },
"sdfAction": { "sdfAction": {
"on": { "on": {
"description": "Turn the switch on; equivalent to setting value to true." "description": "Turn the switch on; equivalent to setting value to true."
}, },
"off": { "off": {
"description": "Turn the switch on; equivalent to setting value to false." "description": "Turn the switch off; equivalent to setting value to false."
}, },
"toggle": { "toggle": {
"description": "Toggle the switch; equivalent to setting value to its complement." "description": "Toggle the switch; equivalent to setting value to its complement."
} }
} }
} }
} }
} }
Figure 1: A simple example of an SDF definition file Figure 1: A simple example of an SDF definition file
skipping to change at page 9, line 14 skipping to change at page 9, line 14
For definitions in "sdfProperty" and "sdfData", SDF provides For definitions in "sdfProperty" and "sdfData", SDF provides
qualities that can constrain the structure and values of data allowed qualities that can constrain the structure and values of data allowed
in an instance of these data, as well as qualities that associate in an instance of these data, as well as qualities that associate
semantics to these data, for engineering units and unit scaling semantics to these data, for engineering units and unit scaling
information. information.
For the data definition within "sdfProperty" or "sdfData", SDF For the data definition within "sdfProperty" or "sdfData", SDF
borrows a number of elements proposed for the drafts 4 and 7 of the borrows a number of elements proposed for the drafts 4 and 7 of the
json-schema.org "JSON Schema" format json-schema.org "JSON Schema" format
[I-D.handrews-json-schema-validation], enhanced by qualities that are [I-D.handrews-json-schema-validation], enhanced by qualities that are
specific to SDF. However, for the current version of SDF, data are specific to SDF. For the current version of SDF, data are
constrained to be of simple types (number, string, Boolean) and constrained to be of simple types (number, string, Boolean), JSON
arrays of these types. Syntax extension points are provided that can maps composed of named data ("objects"), and arrays of these types.
be used to provide richer types in future versions of this Syntax extension points are provided that can be used to provide
specification (possibly more of which can be borrowed from json- richer types in future versions of this specification (possibly more
schema.org). of which can be borrowed from json-schema.org).
Note that "sdfProperty" definitions (and "sdfData" definitions in Note that "sdfProperty" definitions (and "sdfData" definitions in
general) are not intended to constrain the formats of data used for general) are not intended to constrain the formats of data used for
communication over network interfaces. Where needed, data communication over network interfaces. Where needed, data
definitions for payloads of protocol messages are expected to be part definitions for payloads of protocol messages are expected to be part
of the protocol binding. of the protocol binding.
2.2.3. sdfAction 2.2.3. sdfAction
The "sdfAction" group contains declarations of Actions, model The "sdfAction" group contains declarations of Actions, model
affordances that, when triggered, have more effect than just reading, affordances that, when triggered, have more effect than just reading,
updating, or observing Thing state, often resulting in some outward updating, or observing Thing state, often resulting in some outward
physical effect (which, itself, cannot be modeled in SDF). From a physical effect (which, itself, cannot be modeled in SDF). From a
programmer's perspective, they might be considered to be roughly programmer's perspective, they might be considered to be roughly
analogous to method calls. analogous to method calls.
Actions may have multiple data parameters; these are modeled as input Actions may have data parameters; these are modeled as a single item
data and output data (using "sdfData" definitions, i.e., the same of input data and output data, each. (Where multiple parameters need
entries as for "sdfProperty" declarations). Actions may be long- to be modeled, an "object" type can be used to combine these
running, that is to say that the effects may not take place parameters into one.) Actions may be long-running, that is to say
immediately as would be expected for an update to an "sdfPoperty"; that the effects may not take place immediately as would be expected
the effects may play out over time and emit action results. Actions for an update to an "sdfPoperty"; the effects may play out over time
may also not always complete and may result in application errors, and emit action results. Actions may also not always complete and
such as an item blocking the closing of an automatic door. may result in application errors, such as an item blocking the
closing of an automatic door.
Actions may have (or lack) qualities of idempotency and side-effect Actions may have (or lack) qualities of idempotency and side-effect
safety. safety.
The current version of SDF only provides data constraint modeling and The current version of SDF only provides data constraint modeling and
semantics for the input and output data of definitions in "sdfAction" semantics for the input and output data of definitions in "sdfAction"
groups. Again, data definitions for payloads of protocol messages, groups. Again, data definitions for payloads of protocol messages,
and detailed protocol settings for invoking the action, are expected and detailed protocol settings for invoking the action, are expected
to be part of the protocol binding. to be part of the protocol binding.
skipping to change at page 13, line 23 skipping to change at page 13, line 23
| defaultNamespace | string | no | Identifies one of the | | defaultNamespace | string | no | Identifies one of the |
| | | | prefixes in the | | | | | prefixes in the |
| | | | namespace map to be | | | | | namespace map to be |
| | | | used as a default in | | | | | used as a default in |
| | | | resolving identifiers | | | | | resolving identifiers |
+------------------+--------+----------+-----------------------+ +------------------+--------+----------+-----------------------+
Table 2: Namespaces Section Table 2: Namespaces Section
The following example declares a set of namespaces and defines "cap" The following example declares a set of namespaces and defines "cap"
as the default namespace. as the default namespace. By convention, the values in the namespace
map contain full URIs without a fragment identifier, and the fragment
identifier is then added, if needed, where the namespace entry is
used.
"namespace": { "namespace": {
"cap": "https://example.com/capability/cap", "cap": "https://example.com/capability/cap",
"zcl": "https://zcl.example.com/sdf" "zcl": "https://zcl.example.com/sdf"
}, },
"defaultNamespace": "cap", "defaultNamespace": "cap",
If no defaultNamespace setting is given, the SDF definition file does If no defaultNamespace setting is given, the SDF definition file does
not contribute to a global namespace. As the defaultNamespace is set not contribute to a global namespace. As the defaultNamespace is set
by giving a namespace short name, its presence requires a namespace by giving a namespace short name, its presence requires a namespace
skipping to change at page 13, line 46 skipping to change at page 13, line 49
If no namespace map is given, no short names for namespace URIs are If no namespace map is given, no short names for namespace URIs are
set up, and no defaultNamespace can be given. set up, and no defaultNamespace can be given.
3.3. Definitions section 3.3. Definitions section
The Definitions section contains one or more groups, each identified The Definitions section contains one or more groups, each identified
by a Class Name Keyword (there can only be one group per keyword; the by a Class Name Keyword (there can only be one group per keyword; the
actual grouping is just a shortcut and does not carry any specific actual grouping is just a shortcut and does not carry any specific
semantics). The value of each group is a JSON map (object), the keys semantics). The value of each group is a JSON map (object), the keys
of which serve for naming the individual definitions in this group, of which serve for naming the individual definitions in this group,
and the corresponding values provide the qualities (name-value pairs) and the corresponding values provide a set of qualities (name-value
for the individual definition. pairs) for the individual definition. (In short, we speak of the map
entries as "named sets of qualities".)
Each group may contain zero or more definitions. Each identifier Each group may contain zero or more definitions. Each identifier
defined creates a new type and term in the target namespace. defined creates a new type and term in the target namespace.
Declarations have a scope of the current definition block. Declarations have a scope of the current definition block.
A definition may in turn contain other definitions. Each definition A definition may in turn contain other definitions. Each definition
consists of the newly defined identifier and a set of key-value pairs is a named set of qualities, i.e., it consists of the newly defined
that represent the defined qualities and contained definitions. identifier and a set of key-value pairs that represent the defined
qualities and contained definitions.
An example for an Object definition is given in Figure 3: An example for an Object definition is given in Figure 3:
"sdfObject": { "sdfObject": {
"foo": { "foo": {
"sdfProperty": { "sdfProperty": {
"bar": { "bar": {
"type": "boolean" "type": "boolean"
} }
} }
skipping to change at page 14, line 45 skipping to change at page 14, line 49
4. Names and namespaces 4. Names and namespaces
SDF definition files may contribute to a global namespace, and may SDF definition files may contribute to a global namespace, and may
reference elements from that global namespace. (An SDF definition reference elements from that global namespace. (An SDF definition
file that does not set a defaultNamespace does not contribute to a file that does not set a defaultNamespace does not contribute to a
global namespace.) global namespace.)
4.1. Structure 4.1. Structure
Global names look exactly like https:// URIs with attached fragment Global names look exactly like "https://" URIs with attached fragment
identifiers. identifiers.
There is no intention to require that these URIs can be dereferenced. There is no intention to require that these URIs can be dereferenced.
(However, as future versions of SDF might find a use for (However, as future versions of SDF might find a use for
dereferencing global names, the URI should be chosen in such a way dereferencing global names, the URI should be chosen in such a way
that this may become possible in the future.) that this may become possible in the future.)
The absolute URI of a global name should be a URI as per Section 3 of The absolute URI of a global name should be a URI as per Section 3 of
[RFC3986], with a scheme of "https" and a path ("hier-part" in [RFC3986], with a scheme of "https" and a path ("hier-part" in
[RFC3986]). For the present version of this specification, the query [RFC3986]). For the present version of this specification, the query
part should not be used (it might be used in later versions). part should not be used (it might be used in later versions).
The fragment identifier is constructed as per Section 6 of [RFC6901]. The fragment identifier is constructed as per Section 6 of [RFC6901].
4.2. Contributing global names 4.2. Contributing global names
The fragment identifier part of a global name defined in an SDF The fragment identifier part of a global name defined in an SDF
skipping to change at page 15, line 35 skipping to change at page 15, line 41
* https://example.com/capability/cap#/sdfObject/Switch * https://example.com/capability/cap#/sdfObject/Switch
* https://example.com/capability/cap#/sdfObject/Switch/sdfProperty/ * https://example.com/capability/cap#/sdfObject/Switch/sdfProperty/
value value
* https://example.com/capability/cap#/sdfObject/Switch/sdfAction/on * https://example.com/capability/cap#/sdfObject/Switch/sdfAction/on
* https://example.com/capability/cap#/sdfObject/Switch/sdfAction/off * https://example.com/capability/cap#/sdfObject/Switch/sdfAction/off
Note the "#", which separates the base part from the fragment Note the "#", which separates the absolute-URI part (Section 4.3 of
identifier part. [RFC3986]) from the fragment identifier part.
4.3. Referencing global names 4.3. Referencing global names
A name reference takes the form of the production "curie" in A name reference takes the form of the production "curie" in
[W3C.NOTE-curie-20101216] (note that this excludes the production [W3C.NOTE-curie-20101216] (note that this excludes the production
"safe-curie"), but also limiting the IRIs involved in that production "safe-curie"), but also limiting the IRIs involved in that production
to URIs as per [RFC3986] and the prefixes to ASCII characters to URIs as per [RFC3986] and the prefixes to ASCII characters
[RFC0020]. [RFC0020].
A name that is contributed by the current SDF definition file can be A name that is contributed by the current SDF definition file can be
referenced by a Same-Document Reference as per section 4.4 of referenced by a Same-Document Reference as per section 4.4 of
[RFC3986]. As there is little point in referencing the entire SDF [RFC3986]. As there is little point in referencing the entire SDF
definition file, this will be a "#" followed by a JSON pointer. This definition file, this will be a "#" followed by a JSON pointer. This
is the only kind of name reference that is possible in an SDF is the only kind of name reference to itself that is possible in an
definition file that does not set a default namespace. SDF definition file that does not set a default namespace.
Name references that point outside the current SDF definition file Name references that point outside the current SDF definition file
need to contain curie prefixes. These then reference namespace need to contain curie prefixes. These then reference namespace
declarations in the namespaces section. declarations in the namespaces section.
For example, if a namespace prefix is defined: For example, if a namespace prefix is defined:
"namespace": { "namespace": {
"foo": "https://example.com/#" "foo": "https://example.com/"
} }
Then this reference to that namespace: Then this reference to that namespace:
{ "sdfRef": "foo:/sdfData/temperatureData" } { "sdfRef": "foo:#/sdfData/temperatureData" }
references the global name: references the global name:
"https://example.com/#/sdfData/temperatureData" "https://example.com/#/sdfData/temperatureData"
Note that there is no way to provide a URI scheme name in a curie, so Note that there is no way to provide a URI scheme name in a curie, so
all references outside of the document need to go through the all references outside of the document need to go through the
namespace map. namespace map.
Name references occur only in specific elements of the syntax of SDF: Name references occur only in specific elements of the syntax of SDF:
* copying elements via sdfRef values * copying elements via sdfRef values
* pointing to elements via sdfRequired value elements or as * pointing to elements via sdfRequired value elements
sdfInput/OutputData etc.
4.4. sdfRef 4.4. sdfRef
In a JSON map establishing a definition, the keyword "sdfRef" is used In a JSON map establishing a definition, the keyword "sdfRef" is used
to copy all of the qualities of the referenced definition, indicated to copy all of the qualities of the referenced definition, indicated
by the included name reference, into the newly formed definition. by the included name reference, into the newly formed definition.
(This can be compared to the processing of the "$ref" keyword in (This can be compared to the processing of the "$ref" keyword in
[I-D.handrews-json-schema-validation].) [I-D.handrews-json-schema-validation].)
For example, this reference: For example, this reference:
skipping to change at page 18, line 20 skipping to change at page 18, line 20
"#/sdfObject/temperatureWithAlarm/sdfEvent/overTemperatureEvent" "#/sdfObject/temperatureWithAlarm/sdfEvent/overTemperatureEvent"
], ],
"sdfData":{ "sdfData":{
"temperatureData": { "temperatureData": {
"type": "number" "type": "number"
} }
}, },
"sdfEvent": { "sdfEvent": {
"overTemperatureEvent": { "overTemperatureEvent": {
"sdfOutputData": { "sdfOutputData": {
"alarmType": { "type": "object",
"sdfRef": "cap:/sdfData/alarmTypes/quantityAlarms", "properties": {
"const": "OverTemperatureAlarm" "alarmType": {
}, "sdfRef": "cap:/sdfData/alarmTypes/quantityAlarms",
"temperature": { "const": "OverTemperatureAlarm"
"sdfRef": "#/sdfObject/temperatureWithAlarm/sdfData/temperatureData" },
"temperature": {
"sdfRef": "#/sdfObject/temperatureWithAlarm/sdfData/temperatureData"
}
} }
} }
} }
} }
} }
} }
} }
Figure 4: Using sdfRequired Figure 4: Using sdfRequired
4.6. Common Qualities 4.6. Common Qualities
Definitions in SDF share a number of qualities that provide metadata Definitions in SDF share a number of qualities that provide metadata
for them. These are listed in Table 3. None of these qualities are for them. These are listed in Table 3. None of these qualities are
required or have default values that are assumed if the quality is required or have default values that are assumed if the quality is
absent. If a label is required for an application and no label is absent. If a label is required for an application and no label is
given, the last part ("reference-token", Section 3 of [RFC6901]) of given in the SDF model, the last part ("reference-token", Section 3
the JSON pointer to the definition can be used. of [RFC6901]) of the JSON pointer to the definition can be used.
+=============+==============+===================================+ +=============+==============+===================================+
| Quality | Type | Description | | Quality | Type | Description |
+=============+==============+===================================+ +=============+==============+===================================+
| description | text | long text (no constraints) | | description | text | long text (no constraints) |
+-------------+--------------+-----------------------------------+ +-------------+--------------+-----------------------------------+
| label | text | short text (no constraints) | | label | text | short text (no constraints) |
+-------------+--------------+-----------------------------------+ +-------------+--------------+-----------------------------------+
| $comment | text | source code comments only, no | | $comment | text | source code comments only, no |
| | | semantics | | | | semantics |
skipping to change at page 19, line 25 skipping to change at page 19, line 25
| sdfRef | sdf-pointer | (see Section 4.4) | | sdfRef | sdf-pointer | (see Section 4.4) |
+-------------+--------------+-----------------------------------+ +-------------+--------------+-----------------------------------+
| sdfRequired | pointer-list | (see Section 4.5, applies to | | sdfRequired | pointer-list | (see Section 4.5, applies to |
| | | qualities of properties, of data) | | | | qualities of properties, of data) |
+-------------+--------------+-----------------------------------+ +-------------+--------------+-----------------------------------+
Table 3: Common Qualities Table 3: Common Qualities
4.7. Data Qualities 4.7. Data Qualities
Data qualities are used in "sdfData" and "sdfProperty" definitions. Data qualities are used in "sdfData" and "sdfProperty" definitions,
which are named sets of data qualities (abbreviated as "named-sdq").
Table 4 lists data qualities borrowed from Table 4 lists data qualities borrowed from
[I-D.handrews-json-schema-validation]; the intention is that these [I-D.handrews-json-schema-validation]; the intention is that these
qualities retain their semantics from the versions of the json- qualities retain their semantics from the versions of the json-
schema.org proposal they were imported from. schema.org proposal they were imported from. A description that
starts with a parenthesized term means the quality is only applicable
when "type" has the value of the term.
Table 5 lists data qualities defined specifically for the present Table 5 lists data qualities defined specifically for the present
specification. specification.
The term "allowed types" stands for primitive JSON types as well as The term "allowed types" stands for primitive JSON types, JSON maps
homogeneous arrays of numbers, text, or Booleans. (This list might ("objects")" as well as homogeneous arrays of numbers, text,
be extended in a future version of SDF.) An "allowed value" is a Booleans, or maps. (This list might be extended in a future version
value allowed for one of these types. of SDF.) An "allowed value" is a value allowed for one of these
types.
+================+==========+=======================================+ +================+==========+=======================================+
|Quality |Type |Description | |Quality |Type |Description |
+================+==========+=======================================+ +================+==========+=======================================+
|type |"number" /|JSON data type | |type |"number" /|JSON data type (note 1) |
| |"string" /| | | |"string" /| |
| |"boolean" | | | |"boolean" | |
| |/ | | | |/ | |
| |"integer" | | | |"integer" | |
| |/ "array" | | | |/ "array" | |
| |/ "object"| |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|enum |array of |enumeration constraint | |enum |array of |enumeration constraint |
| |allowed | | | |allowed | |
| |values | | | |values | |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|const |allowed |specifies a constant value for a data | |const |allowed |specifies a constant value for a data |
| |value |item or property | | |value |item or property |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|default |allowed |specifies the default value for | |default |allowed |specifies the default value for |
| |value |initialization | | |value |initialization |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|minimum |number |lower limit of value | |minimum |number |(number) lower limit of value |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|maximum |number |upper limit of value | |maximum |number |(number) upper limit of value |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|exclusiveMinimum|number or |lower limit of value | |exclusiveMinimum|number or |(number) lower limit of value |
| |boolean | | | |boolean | |
| |(jso draft| | | |(jso draft| |
| |7/4) | | | |7/4) | |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|exclusiveMaximum|number or |lower limit of value | |exclusiveMaximum|number or |(number) lower limit of value |
| |boolean | | | |boolean | |
| |(jso draft| | | |(jso draft| |
| |7/4) | | | |7/4) | |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|multipleOf |number |resolution of the number [NEEDED?] | |multipleOf |number |(number) resolution of the number |
| | |[NEEDED?] |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|minLength |integer |shortest length string in octets | |minLength |integer |(string) shortest length string in |
| | |octets |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|maxLength |integer |longest length string in octets | |maxLength |integer |(string) longest length string in |
| | |octets |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|pattern |string |regular expression to constrain a | |pattern |string |(string) regular expression to |
| | |string pattern | | | |constrain a string pattern |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|format |"date- |JSON Schema formats as per | |format |"date- |(string) JSON Schema formats as per |
| |time" / |[I-D.handrews-json-schema-validation], | | |time" / |[I-D.handrews-json-schema-validation], |
| |"date" / |Section 7.3 | | |"date" / |Section 7.3 |
| |"time" / | | | |"time" / | |
| |"uri" / | | | |"uri" / | |
| |"uri- | | | |"uri- | |
| |reference"| | | |reference"| |
| |/ "uuid" | | | |/ "uuid" | |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|minItems |number |Minimum number of items in array | |minItems |number |(array) Minimum number of items in |
| | |array |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|maxItems |number |Maximum number of items in array | |maxItems |number |(array) Maximum number of items in |
| | |array |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|uniqueItems |boolean |if true, requires items to be all | |uniqueItems |boolean |(array) if true, requires items to be |
| | |different | | | |all different |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|items |(subset of|constraints on array items | |items |(subset of|(array) constraints on array items |
| |common/ | | | |common/ | |
| |data | | | |data | |
| |qualities;| | | |qualities;| |
| |see | | | |see | |
| |Appendix A| | | |Appendix A| |
+----------------+----------+---------------------------------------+ +----------------+----------+---------------------------------------+
|required |array of |(object) names of properties (note 2) |
| |strings |that are required in the JSON map |
| | |("object") |
+----------------+----------+---------------------------------------+
|properties |named set |(object) entries allowed for the JSON |
| |of data |map ("object") |
| |qualities | |
+----------------+----------+---------------------------------------+
Table 4: Qualities of sdfProperty and sdfData borrowed from json- Table 4: Qualities of sdfProperty and sdfData borrowed from json-
schema.org schema.org
+===============+===============+=========================+=========+ (1) A type value of "integer" means that only integral values of JSON
| Quality | Type | Description | Default | numbers can be used.
+===============+===============+=========================+=========+
| (common) | | Section 4.6 | |
+---------------+---------------+-------------------------+---------+
| units | string | SenML unit name as | N/A |
| | | per [IANA.senml], | |
| | | subregistry SenML | |
| | | Units | |
+---------------+---------------+-------------------------+---------+
| scaleMinimum | number | lower limit of | N/A |
| | | value in units | |
+---------------+---------------+-------------------------+---------+
| scaleMaximum | number | upper limit of | N/A |
| | | value in units | |
+---------------+---------------+-------------------------+---------+
| readable | boolean | Reads are allowed | true |
+---------------+---------------+-------------------------+---------+
| writable | boolean | Writes are allowed | true |
+---------------+---------------+-------------------------+---------+
| observable | boolean | flag to indicate | true |
| | | asynchronous | |
| | | notification is | |
| | | available | |
+---------------+---------------+-------------------------+---------+
| nullable | boolean | indicates a null | true |
| | | value is available | |
| | | for this type | |
+---------------+---------------+-------------------------+---------+
| contentFormat | string | content type (IANA | N/A |
| | | media type string | |
| | | plus parameters), | |
| | | encoding | |
+---------------+---------------+-------------------------+---------+
| subtype | "byte-string" | subtype | N/A |
| | / "unix-time" | enumeration | |
+---------------+---------------+-------------------------+---------+
Table 5: SDF-defined Qualities of sdfProperty and sdfData (2) Note that the term "properties" as used for map entries in
[I-D.handrews-json-schema-validation] is unrelated to sdfProperty.
+===============+===============+====================+=========+
| Quality | Type | Description | Default |
+===============+===============+====================+=========+
| (common) | | Section 4.6 | |
+---------------+---------------+--------------------+---------+
| unit | string | SenML unit name as | N/A |
| | | per [IANA.senml], | |
| | | subregistry SenML | |
| | | Units (note 3) | |
+---------------+---------------+--------------------+---------+
| scaleMinimum | number | lower limit of | N/A |
| | | value in units | |
| | | given by unit | |
+---------------+---------------+--------------------+---------+
| scaleMaximum | number | upper limit of | N/A |
| | | value in units | |
| | | given by unit | |
+---------------+---------------+--------------------+---------+
| readable | boolean | Reads are allowed | true |
+---------------+---------------+--------------------+---------+
| writable | boolean | Writes are allowed | true |
+---------------+---------------+--------------------+---------+
| observable | boolean | flag to indicate | true |
| | | asynchronous | |
| | | notification is | |
| | | available | |
+---------------+---------------+--------------------+---------+
| nullable | boolean | indicates a null | true |
| | | value is available | |
| | | for this type | |
+---------------+---------------+--------------------+---------+
| contentFormat | string | content type (IANA | N/A |
| | | media type string | |
| | | plus parameters), | |
| | | encoding | |
+---------------+---------------+--------------------+---------+
| subtype | "byte-string" | subtype | N/A |
| | / "unix-time" | enumeration | |
+---------------+---------------+--------------------+---------+
Table 5: SDF-defined Qualities of sdfProperty and sdfData
(3) note that the quality "unit" was called "units" in SDF 1.0.
5. Keywords for definition groups 5. Keywords for definition groups
The following SDF keywords are used to create definition groups in The following SDF keywords are used to create definition groups in
the target namespace. All these definitions share some common the target namespace. All these definitions share some common
qualities as discussed in Section 4.6. qualities as discussed in Section 4.6.
5.1. sdfObject 5.1. sdfObject
The sdfObject keyword denotes a group of zero or more Object The sdfObject keyword denotes a group of zero or more Object
definitions. Object definitions may contain or include definitions definitions. Object definitions may contain or include definitions
of Properties, Actions, Events declared for the object, as well as of Properties, Actions, Events declared for the object, as well as
data types (sdfData group) to be used in this or other Objects. data types (sdfData group) to be used in this or other Objects.
The qualities of an sdfObject include the common qualities, The qualities of an sdfObject include the common qualities,
additional qualities are shown in Table 6. None of these qualities additional qualities are shown in Table 6. None of these qualities
are required or have default values that are assumed if the quality are required or have default values that are assumed if the quality
is absent. is absent.
+=============+==========+==========================================+ +=============+===========+=============================+
| Quality | Type | Description | | Quality | Type | Description |
+=============+==========+==========================================+ +=============+===========+=============================+
| (common) | | Section 4.6 | | (common) | | Section 4.6 |
+-------------+----------+------------------------------------------+ +-------------+-----------+-----------------------------+
| sdfProperty | property | zero or more named property | | sdfProperty | property | zero or more named property |
| | | definitions for this object | | | | definitions for this object |
+-------------+----------+------------------------------------------+ +-------------+-----------+-----------------------------+
| sdfAction | action | zero or more named action | | sdfAction | action | zero or more named action |
| | | definitions for this object | | | | definitions for this object |
+-------------+----------+------------------------------------------+ +-------------+-----------+-----------------------------+
| sdfEvent | event | zero or more named event | | sdfEvent | event | zero or more named event |
| | | definitions for this object | | | | definitions for this object |
+-------------+----------+------------------------------------------+ +-------------+-----------+-----------------------------+
| sdfData | data | zero or more named data | | sdfData | named-sdq | zero or more named data |
| | | type definitions that might | | | | type definitions that might |
| | | be used in the above | | | | be used in the above |
+-------------+----------+------------------------------------------+ +-------------+-----------+-----------------------------+
Table 6: Qualities of sdfObject Table 6: Qualities of sdfObject
5.2. sdfProperty 5.2. sdfProperty
The sdfProperty keyword denotes a group of zero or more Property The sdfProperty keyword denotes a group of zero or more Property
definitions. definitions.
Properties are used to model elements of state. Properties are used to model elements of state.
The qualities of a Property definition include the common qualities The qualities of a Property definition include the data qualities
and the data qualities, see Section 4.7. (and thus the common qualities), see Section 4.7.
5.3. sdfAction 5.3. sdfAction
The sdfAction keyword denotes a group of zero or more Action The sdfAction keyword denotes a group of zero or more Action
definitions. definitions.
Actions are used to model commands and methods which are invoked. Actions are used to model commands and methods which are invoked.
Actions have parameter data that are supplied upon invocation. Actions have parameter data that are supplied upon invocation.
The qualities of an Action definition include the common qualities, The qualities of an Action definition include the common qualities,
additional qualities are shown in Table 7. additional qualities are shown in Table 7.
+======================+=======+================================+ +===============+===========+============================+
| Quality | Type | Description | | Quality | Type | Description |
+======================+=======+================================+ +===============+===========+============================+
| (common) | | Section 4.6 | | (common) | | Section 4.6 |
+----------------------+-------+--------------------------------+ +---------------+-----------+----------------------------+
| sdfInputData | array | Array of JSON Pointers to Data | | sdfInputData | map | data qualities of the |
| | | items in the input data for an | | | | input data for an Action |
| | | Action | +---------------+-----------+----------------------------+
+----------------------+-------+--------------------------------+ | sdfOutputData | map | data qualities of the |
| sdfRequiredInputData | array | Array of JSON Pointers to | | | | output data for an Action |
| | | mandatory Data items in the | +---------------+-----------+----------------------------+
| | | input data for an Action | | sdfData | named-sdq | zero or more named data |
+----------------------+-------+--------------------------------+ | | | type definitions that |
| sdfOutputData | array | Array of JSON Pointers to Data | | | | might be used in the above |
| | | items in the Output data for | +---------------+-----------+----------------------------+
| | | an Action (mandatory items are |
| | | listed under sdfRequired) |
+----------------------+-------+--------------------------------+
| sdfData | data | zero or more named data type |
| | | definitions that might be used |
| | | in the above |
+----------------------+-------+--------------------------------+
Table 7: Qualities of sdfAction Table 7: Qualities of sdfAction
"sdfInputData", as refined by "sdfRequiredInputData", define the "sdfInputData" defines the input data of the action. "sdfOutputData"
input data of the action. "sdfOutputData", as refined by defines the output data of the action. As discussed in
"sdfRequired," (a quality defined in Table 3) define the output data Section 2.2.3, a set of data qualities with type "object" can be used
of the action. to substructure either data item, with optionality indicated by the
data quality "required".
5.4. sdfEvent 5.4. sdfEvent
The sdfEvent keyword denotes zero or more Event definitions. The sdfEvent keyword denotes zero or more Event definitions.
Events are used to model asynchronous occurrences that may be Events are used to model asynchronous occurrences that may be
communicated proactively. Events have data elements which are communicated proactively. Events have data elements which are
communicated upon the occurrence of the event. communicated upon the occurrence of the event.
The qualities of sdfEvent include the common qualities, additional The qualities of sdfEvent include the common qualities, additional
qualities are shown in Table 8. qualities are shown in Table 8.
+===============+=======+==========================================+ +===============+===========+============================+
| Quality | Type | Description | | Quality | Type | Description |
+===============+=======+==========================================+ +===============+===========+============================+
| (common) | | Section 4.6 | | (common) | | Section 4.6 |
+---------------+-------+------------------------------------------+ +---------------+-----------+----------------------------+
| sdfOutputData | array | Array of JSON Pointers to Data items in | | sdfOutputData | map | data qualities of the |
| | | the Output data for an Action (mandatory | | | | output data for an Event |
| | | items are listed under sdfRequired) | +---------------+-----------+----------------------------+
+---------------+-------+------------------------------------------+ | sdfData | named-sdq | zero or more named data |
| sdfData | data | zero or more named data type definitions | | | | type definitions that |
| | | that might be used in the above | | | | might be used in the above |
+---------------+-------+------------------------------------------+ +---------------+-----------+----------------------------+
Table 8: Qualities of sdfEvent Table 8: Qualities of sdfEvent
"sdfOutputData", as refined by "sdfRequired" (a quality defined in "sdfOutputData" defines the output data of the action. As discussed
Table 3), define the output data of the action. in Section 2.2.4, a set of data qualities with type "object" can be
used to substructure the output data item, with optionality indicated
by the data quality "required".
5.5. sdfData 5.5. sdfData
The sdfData keyword denotes a group of zero or more Data type The sdfData keyword denotes a group of zero or more named data type
definitions. definitions (named-sdq).
An sdfData definition provides a semantic identifier for a data item
and describes the constraints on the defined data item.
sdfData is used for Action parameters, for Event output data, and for An sdfData definition provides a reusable semantic identifier for a
reusable constraints in Property definitions. type of data item and describes the constraints on the defined type.
It is not itself a declaration, i.e., it does not cause any of these
data items to be included in an affordance definition.
The qualities of sdfData include the common qualities and the data The qualities of sdfData include the data qualities (and thus the
qualities, see Section 4.7. common qualities), see Section 4.7.
6. High Level Composition 6. High Level Composition
The requirements for high level composition include the following: The requirements for high level composition include the following:
* The ability to represent products, standardized product types, and * The ability to represent products, standardized product types, and
modular products while maintaining the atomicity of Objects. modular products while maintaining the atomicity of Objects.
* The ability to compose a reusable definition block from Objects, * The ability to compose a reusable definition block from Objects,
for example a single plug unit of an outlet strip with on/off for example a single plug unit of an outlet strip with on/off
skipping to change at page 25, line 30 skipping to change at page 26, line 26
in the definition files that are present in the namespace. For in the definition files that are present in the namespace. For
example, definitions that originate from an organization or vendor example, definitions that originate from an organization or vendor
are expected to be in a namespace that is specific to that are expected to be in a namespace that is specific to that
organization or vendor. There is expected to be an SDF namespace for organization or vendor. There is expected to be an SDF namespace for
common SDF definitions used in OneDM. common SDF definitions used in OneDM.
The structure of a path in a namespace is defined by the JSON The structure of a path in a namespace is defined by the JSON
Pointers to the definitions in the files in that namespace. For Pointers to the definitions in the files in that namespace. For
example, if there is a file defining an object "Switch" with an example, if there is a file defining an object "Switch" with an
action "on", then the reference to the action would be action "on", then the reference to the action would be
"ns:/sdfObject/Switch/sdfAction/on" where ns is the namespace prefix "ns:/sdfObject/Switch/sdfAction/on" where "ns" is the namespace
(short name for the namespace). prefix (short name for the namespace).
6.2. Modular Composition 6.2. Modular Composition
Modular composition of definitions enables an existing definition Modular composition of definitions enables an existing definition
(could be in the same file or another file) to become part of a new (could be in the same file or another file) to become part of a new
definition by including a reference to the existing definition within definition by including a reference to the existing definition within
the model namespace. the model namespace.
6.2.1. Use of the "sdfRef" keyword to re-use a definition 6.2.1. Use of the "sdfRef" keyword to re-use a definition
skipping to change at page 26, line 9 skipping to change at page 27, line 4
definition. This pattern will use the keyword "sdfRef" as a quality definition. This pattern will use the keyword "sdfRef" as a quality
of a new definition with a value consisting of a reference to the of a new definition with a value consisting of a reference to the
existing definition that is to be used as a template. Optionally, existing definition that is to be used as a template. Optionally,
new qualities may be added and values of optional qualities and new qualities may be added and values of optional qualities and
quality values may be defined. quality values may be defined.
ISSUE: Do we want to enable qualities from the source definition to ISSUE: Do we want to enable qualities from the source definition to
be overridden in future versions? The above only says "added". be overridden in future versions? The above only says "added".
(Yes, we do want to enable overriding, but need to warn specifiers (Yes, we do want to enable overriding, but need to warn specifiers
not to use this in a way that contradicts the referenced semantics.) not to use this in a way that contradicts the referenced semantics.)
"sdfData": "sdfData":
"length" : { "length" : {
"type": "number", "type": "number",
"minimum": 0, "minimum": 0,
"units": "m" "unit": "m"
"description": "There can be no negative lengths." "description": "There can be no negative lengths."
} }
... ...
"cable-length" : { "cable-length" : {
"sdfRef": "#/sdfData/length" "sdfRef": "#/sdfData/length"
"minimum": 0.05, "minimum": 0.05,
"description": "Cables must be at least 5 cm." "description": "Cables must be at least 5 cm."
} }
6.3. sdfThing 6.3. sdfThing
skipping to change at page 27, line 36 skipping to change at page 28, line 36
7.1. Normative References 7.1. Normative References
[I-D.handrews-json-schema-validation] [I-D.handrews-json-schema-validation]
Wright, A., Andrews, H., and B. Hutton, "JSON Schema Wright, A., Andrews, H., and B. Hutton, "JSON Schema
Validation: A Vocabulary for Structural Validation of Validation: A Vocabulary for Structural Validation of
JSON", Work in Progress, Internet-Draft, draft-handrews- JSON", Work in Progress, Internet-Draft, draft-handrews-
json-schema-validation-02, 17 September 2019, json-schema-validation-02, 17 September 2019,
<http://www.ietf.org/internet-drafts/draft-handrews-json- <http://www.ietf.org/internet-drafts/draft-handrews-json-
schema-validation-02.txt>. schema-validation-02.txt>.
[I-D.ietf-cbor-cddl-control]
Bormann, C., "Additional Control Operators for CDDL", Work
in Progress, Internet-Draft, draft-ietf-cbor-cddl-control-
00, 29 September 2020, <http://www.ietf.org/internet-
drafts/draft-ietf-cbor-cddl-control-00.txt>.
[IANA.senml] [IANA.senml]
IANA, "Sensor Measurement Lists (SenML)", IANA, "Sensor Measurement Lists (SenML)",
<http://www.iana.org/assignments/senml>. <http://www.iana.org/assignments/senml>.
[RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80,
RFC 20, DOI 10.17487/RFC0020, October 1969, RFC 20, DOI 10.17487/RFC0020, October 1969,
<https://www.rfc-editor.org/info/rfc20>. <https://www.rfc-editor.org/info/rfc20>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
skipping to change at page 29, line 20 skipping to change at page 30, line 29
currently in use at the One Data Model "playground" repository. currently in use at the One Data Model "playground" repository.
This appendix shows the framework syntax only, i.e., a syntax with This appendix shows the framework syntax only, i.e., a syntax with
liberal extension points. Since this syntax is nearly useless in liberal extension points. Since this syntax is nearly useless in
finding typos in an SDF specification, a second syntax, the finding typos in an SDF specification, a second syntax, the
validation syntax, is defined that does not include the extension validation syntax, is defined that does not include the extension
points. The validation syntax can be generated from the framework points. The validation syntax can be generated from the framework
syntax by leaving out all lines containing the string "EXTENSION- syntax by leaving out all lines containing the string "EXTENSION-
POINT"; as this is trivial, the result is not shown here. POINT"; as this is trivial, the result is not shown here.
This appendix makes use of CDDL "features" as defined in Section 4 of
[I-D.ietf-cbor-cddl-control]. A feature named "1.0" is used to
indicate parts of the syntax being deprecated towards SDF 1.1, and a
feature named "1.1" is used to indicate new syntax intended for SDF
1.1. Features whose names end in "-ext" indicate extension points
for further evolution.
start = sdf-syntax start = sdf-syntax
sdf-syntax = { sdf-syntax = {
info: sdfinfo ; don't *require* this in flexible syntax, though info: sdfinfo ; don't *require* this in flexible syntax, though
? namespace: named<text> ? namespace: named<text>
? defaultNamespace: text ? defaultNamespace: text
? sdfThing: named<thingqualities> ; Thing is a composition of objects that work together in some way ? sdfThing: named<thingqualities> ; Thing is a composition of objects that work together in some way
? sdfProduct: named<productqualities> ; Product is a composition of things and objects that can model a SKU-level instance of a product ? sdfProduct: named<productqualities> ; Product is a composition of things and objects that can model a SKU-level instance of a product
? sdfObject: named<objectqualities> ; Object is a set of Properties, Actions, and Events that together perform a particular function ? sdfObject: named<objectqualities> ; Object is a set of Properties, Actions, and Events that together perform a particular function
? sdfProperty: named<propertyqualities> ; Property represents the state of an instance of an object ? sdfProperty: named<propertyqualities> ; Property represents the state of an instance of an object
? sdfAction: named<actionqualities> ; Action is a directive to invoke an application layer verb associated with an object ? sdfAction: named<actionqualities> ; Action is a directive to invoke an application layer verb associated with an object
? sdfEvent: named<eventqualities> ; Event represents an occurence of something associated with an object ? sdfEvent: named<eventqualities> ; Event represents an occurence of something associated with an object
? sdfData: named<dataqualities> ; Data represents a piece of information that can be the state of a property or a parameter to an action or a signal in an event ? sdfData: named<dataqualities> ; Data represents a piece of information that can be the state of a property or a parameter to an action or a signal in an event
EXTENSION-POINT EXTENSION-POINT<"top-ext">
} }
sdfinfo = { sdfinfo = {
title: text title: text
version: text version: text
copyright: text copyright: text
license: text license: text
EXTENSION-POINT EXTENSION-POINT<"info-ext">
} }
; Shortcut for a map that gives names to instances of X (has text keys and values of type X) ; Shortcut for a map that gives names to instances of X (has text keys and values of type X)
named<X> = { * text => X } named<X> = { * text => X }
EXTENSION-POINT = ( * text => any ) ; only used in framework syntax EXTENSION-POINT<f> = ( * (text .feature f) => any ) ; only used in framework syntax
sdf-pointer = text ; .regexp curie-regexp -- TO DO! sdf-pointer = text ; .regexp curie-regexp -- TO DO!
pointer-list = [* sdf-pointer] ; ISSUE: no point in having an empty list, no? but used for sdfRequired in odmobject-multiple_axis_joystick.sdf.json pointer-list = [* sdf-pointer] ; ISSUE: no point in having an empty list, no? but used for sdfRequired in odmobject-multiple_axis_joystick.sdf.json
commonqualities = ( commonqualities = (
? description: text ; long text (no constraints) ? description: text ; long text (no constraints)
? label: text ; short text (no constraints); default to key ? label: text ; short text (no constraints); default to key
? $comment: text ; source code comments only, no semantics ? $comment: text ; source code comments only, no semantics
? sdfRef: sdf-pointer ? sdfRef: sdf-pointer
? sdfRequired: pointer-list ; applies to qualities of properties, of data ? sdfRequired: pointer-list ; applies to qualities of properties, of data
) )
; for building hierarchy ; for building hierarchy
thingqualities = { thingqualities = {
commonqualities, commonqualities,
? sdfObject: named<objectqualities> ? sdfObject: named<objectqualities>
? sdfThing: named<thingqualities> ? sdfThing: named<thingqualities>
EXTENSION-POINT EXTENSION-POINT<"thing-ext">
} }
productqualities = thingqualities ; ISSUE: get rid of sdfProduct? productqualities = thingqualities ; ISSUE: get rid of sdfProduct?
; for single objects ; for single objects
objectqualities = { objectqualities = {
commonqualities, commonqualities,
? sdfProperty: named<propertyqualities> ? sdfProperty: named<propertyqualities>
? sdfAction: named<actionqualities> ? sdfAction: named<actionqualities>
? sdfEvent: named<eventqualities> ? sdfEvent: named<eventqualities>
? sdfData: named<dataqualities> ? sdfData: named<dataqualities>
EXTENSION-POINT EXTENSION-POINT<"object-ext">
} }
propertyqualities = dataqualities ; the definitions in sdfData are declarations in sdfProperty propertyqualities = dataqualities ; the definitions in sdfData are declarations in sdfProperty
parameter-list =
pointer-list .feature (["1.0", "pointerlist-as-parameter"]) /
dataqualities .feature (["1.1", "dataqualities-as-parameter"])
actionqualities = { actionqualities = {
commonqualities, commonqualities,
? sdfInputData: pointer-list ; sdfRequiredInputData applies here (a bit redundant) ? sdfInputData: parameter-list ; sdfRequiredInputData applies here (a bit redundant)
? sdfRequiredInputData: pointer-list ? sdfRequiredInputData: pointer-list
? sdfOutputData: pointer-list ; sdfRequired applies here ? sdfOutputData: parameter-list ; sdfRequired applies here
? sdfData: named<dataqualities> ; zero or more named data type definitions that might be used in the above ? sdfData: named<dataqualities> ; zero or more named data type definitions that might be used in the above
EXTENSION-POINT EXTENSION-POINT<"action-ext">
} }
eventqualities = { eventqualities = {
commonqualities commonqualities
? sdfOutputData: pointer-list ; sdfRequired applies here ? sdfOutputData: parameter-list ; sdfRequired applies here
? sdfData: named<dataqualities> ; zero or more named data type definitions that might be used in the above ? sdfData: named<dataqualities> ; zero or more named data type definitions that might be used in the above
EXTENSION-POINT EXTENSION-POINT<"event-ext">
} }
dataqualities = { ; also propertyqualities dataqualities = { ; also propertyqualities
commonqualities, commonqualities,
jsonschema, jsonschema,
? units: text ? ("units" .feature "1.0") => text
? ("unit" .feature "1.1") => text
? scaleMinimum: number ? scaleMinimum: number
? scaleMaximum: number ? scaleMaximum: number
? observable: bool ? observable: bool
? readable: bool ? readable: bool
? writable: bool ? writable: bool
? nullable: bool ? nullable: bool
? subtype: "byte-string" / "unix-time" ? subtype: "byte-string" / "unix-time"
/ text ; EXTENSION-POINT / (text .feature "subtype-ext") ; EXTENSION-POINT
? contentFormat: text ? contentFormat: text
EXTENSION-POINT EXTENSION-POINT<"data-ext">
} }
allowed-types = number / text / bool / null allowed-types = number / text / bool / null
/ [* number] / [* text] / [* bool] / [* number] / [* text] / [* bool]
/ any ; EXTENSION-POINT / {* text => any}
/ (any .feature "allowed-ext") ; EXTENSION-POINT
compound-type = (
"type" => ("object" .feature "1.1"),
? required: [+text],
? properties: named<dataqualities>,
)
jsonschema = ( jsonschema = (
? type: "number" / "string" / "boolean" / "integer" / "array" ; / "object" ? (("type" => "number" / "string" / "boolean" / "integer" / "array")
/ text ; EXTENSION-POINT // compound-type
// (type: text .feature "type-ext") ; EXTENSION-POINT
)
? enum: [+ allowed-types] ; should validate against type ? enum: [+ allowed-types] ; should validate against type
? const: allowed-types ? const: allowed-types
? default: allowed-types ? default: allowed-types
; number/integer constraints ; number/integer constraints
? minimum: number ? minimum: number
? maximum: number ? maximum: number
? exclusiveMinimum: bool / number ; jso draft 4/7 ? exclusiveMinimum: bool / number ; jso draft 4/7
? exclusiveMaximum: bool / number ; jso draft 4/7 ? exclusiveMaximum: bool / number ; jso draft 4/7
? multipleOf: number ; ISSUE: Do we need this? ? multipleOf: number ; ISSUE: Do we need this?
; text string constraints ; text string constraints
? minLength: number ? minLength: number
? maxLength: number ? maxLength: number
? pattern: text ; regexp ? pattern: text ; regexp
? format: "date-time" / "date" / "time" ? format: "date-time" / "date" / "time"
/ "uri" / "uri-reference" / "uuid" / "uri" / "uri-reference" / "uuid"
/ text ; EXTENSION-POINT / (text .feature "format-ext") ; EXTENSION-POINT
; expand on demand
; array constraints ; array constraints
? minItems: number ? minItems: number
? maxItems: number ? maxItems: number
? uniqueItems: bool ? uniqueItems: bool
? items: { ;;; ultimately, this will be mostly recursive, but, for now ? items: { ;;; ultimately, this will be mostly recursive, but, for now
;;; let's find out what we actually need ;;; let's find out what we actually need
? sdfRef: sdf-pointer ; import limited to the subset that we allow here... ? sdfRef: sdf-pointer ; import limited to the subset that we allow here...
? description: text ; long text (no constraints) ? description: text ; long text (no constraints)
? $comment: text ; source code comments only, no semantics ? $comment: text ; source code comments only, no semantics
; commonqualities, ; -- ISSUE: should leave this out for non-complex data types, but need the above three ; commonqualities, ; -- ISSUE: should leave this out for non-complex data types, but need the above three
? type: "number" / "string" / "boolean" / "integer" ; no "array" / "object" ? ((type: "number" / "string" / "boolean" / "integer") ; no "array"
/ text ; EXTENSION-POINT // compound-type
// (type: text .feature "itemtype-ext") ; EXTENSION-POINT
)
; jso subset ; jso subset
? minimum: number ? minimum: number
? maximum: number ? maximum: number
? enum: [+ any] ? enum: [+ any]
? format: text ? format: text
? minLength: number ? minLength: number
? maxLength: number ? maxLength: number
EXTENSION-POINT EXTENSION-POINT<"items-ext">
} }
) )
Appendix B. json-schema.org Rendition of SDF Syntax Appendix B. json-schema.org Rendition of SDF Syntax
This appendix describes the syntax of SDF defined in Appendix A, but This appendix describes the syntax of SDF defined in Appendix A, but
using a version of the description techniques advertised on json- using a version of the description techniques advertised on json-
schema.org [I-D.handrews-json-schema-validation]. schema.org [I-D.handrews-json-schema-validation].
The appendix shows both the validation and the framework syntax. The appendix shows both the validation and the framework syntax.
Since most of the lines are the same between these two files, those Since most of the lines are the same between these two files, those
lines are shown only once, with a leading space, in the form of a lines are shown only once, with a leading space, in the form of a
unified diff. Lines leading with a "-" are part of the validation unified diff. Lines leading with a "-" are part of the validation
syntax, and lines leading with a "+" are part of the framework syntax, and lines leading with a "+" are part of the framework
syntax. syntax.
{ (The json-schema.org descriptions need to be regenerated after the
- "title": "sdf-validation.cddl", converter has been upgraded to handle the group choices introduced in
+ "title": "sdf-framework.cddl", the latest CDDL.)
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/sdf-syntax",
"definitions": {
"sdf-syntax": {
"type": "object",
"required": [
"info"
],
"properties": {
"info": {
"$ref": "#/definitions/sdfinfo"
},
"namespace": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"defaultNamespace": {
"type": "string"
},
"sdfThing": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/thingqualities"
}
},
"sdfProduct": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/productqualities"
}
},
"sdfObject": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/objectqualities"
}
},
"sdfProperty": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/propertyqualities"
}
},
"sdfAction": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/actionqualities"
}
},
"sdfEvent": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/eventqualities"
}
},
"sdfData": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/dataqualities"
}
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
},
"sdfinfo": {
"type": "object",
"required": [
"title",
"version",
"copyright",
"license"
],
"properties": {
"title": {
"type": "string"
},
"version": {
"type": "string"
},
"copyright": {
"type": "string"
},
"license": {
"type": "string"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
+ },
+ "EXTENSION-POINT": {
+ "type": "object",
+ "additionalProperties": {
+ }
},
"thingqualities": {
"type": "object",
"properties": {
"sdfObject": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/objectqualities"
}
},
"sdfThing": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/thingqualities"
}
},
"description": {
"type": "string"
},
"label": {
"type": "string"
},
"$comment": {
"type": "string"
},
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"sdfRequired": {
"$ref": "#/definitions/pointer-list"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
},
"commonqualities": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"label": {
"type": "string"
},
"$comment": {
"type": "string"
},
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"sdfRequired": {
"$ref": "#/definitions/pointer-list"
}
},
"additionalProperties": false
},
"sdf-pointer": {
"type": "string"
},
"pointer-list": {
"type": "array",
"items": {
"$ref": "#/definitions/sdf-pointer"
}
},
"objectqualities": {
"type": "object",
"properties": {
"sdfProperty": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/propertyqualities"
}
},
"sdfAction": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/actionqualities"
}
},
"sdfEvent": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/eventqualities"
}
},
"sdfData": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/dataqualities"
}
},
"description": {
"type": "string"
},
"label": {
"type": "string"
},
"$comment": {
"type": "string"
},
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"sdfRequired": {
"$ref": "#/definitions/pointer-list"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
},
"propertyqualities": {
"$ref": "#/definitions/dataqualities"
},
"dataqualities": {
"type": "object",
"properties": {
"units": {
"type": "string"
},
"scaleMinimum": {
"type": "number"
},
"scaleMaximum": {
"type": "number"
},
"observable": {
"type": "boolean"
},
"readable": {
"type": "boolean"
},
"writable": {
"type": "boolean"
},
"nullable": {
"type": "boolean"
},
"subtype": {
- "type": "string",
- "enum": [
- "byte-string",
- "unix-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "const": "byte-string"
+ },
+ {
+ "type": "string",
+ "const": "unix-time"
+ },
+ {
+ "type": "string"
+ }
]
},
"contentFormat": {
"type": "string"
},
"type": {
- "type": "string",
- "enum": [
- "number",
- "string",
- "boolean",
- "integer",
- "array"
+ "anyOf": [
+ {
+ "type": "string",
+ "const": "number"
+ },
+ {
+ "type": "string",
+ "const": "string"
+ },
+ {
+ "type": "string",
+ "const": "boolean"
+ },
+ {
+ "type": "string",
+ "const": "integer"
+ },
+ {
+ "type": "string",
+ "const": "array"
+ },
+ {
+ "type": "string"
+ }
]
},
"enum": {
"type": "array",
"items": {
"$ref": "#/definitions/allowed-types"
},
"minItems": 1
},
"const": {
"$ref": "#/definitions/allowed-types"
},
"default": {
"$ref": "#/definitions/allowed-types"
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
},
"exclusiveMinimum": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "number"
}
]
},
"exclusiveMaximum": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "number"
}
]
},
"multipleOf": {
"type": "number"
},
"minLength": {
"type": "number"
},
"maxLength": {
"type": "number"
},
"pattern": {
"type": "string"
},
"format": {
- "type": "string",
- "enum": [
- "date-time",
- "date",
- "time",
- "uri",
- "uri-reference",
- "uuid"
+ "anyOf": [
+ {
+ "type": "string",
+ "const": "date-time"
+ },
+ {
+ "type": "string",
+ "const": "date"
+ },
+ {
+ "type": "string",
+ "const": "time"
+ },
+ {
+ "type": "string",
+ "const": "uri"
+ },
+ {
+ "type": "string",
+ "const": "uri-reference"
+ },
+ {
+ "type": "string",
+ "const": "uuid"
+ },
+ {
+ "type": "string"
+ }
]
},
"minItems": {
"type": "number"
},
"maxItems": {
"type": "number"
},
"uniqueItems": {
"type": "boolean"
},
"items": {
"type": "object",
"properties": {
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"description": {
"type": "string"
},
"$comment": {
"type": "string"
},
"type": {
- "type": "string",
- "enum": [
- "number",
- "string",
- "boolean",
- "integer"
+ "anyOf": [
+ {
+ "type": "string",
+ "const": "number"
+ },
+ {
+ "type": "string",
+ "const": "string"
+ },
+ {
+ "type": "string",
+ "const": "boolean"
+ },
+ {
+ "type": "string",
+ "const": "integer"
+ },
+ {
+ "type": "string"
+ }
]
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
},
"enum": {
"type": "array",
"minItems": 1
},
"format": {
"type": "string"
},
"minLength": {
"type": "number"
},
"maxLength": {
"type": "number"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
},
"description": {
"type": "string"
},
"label": {
"type": "string"
},
"$comment": {
"type": "string"
},
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"sdfRequired": {
"$ref": "#/definitions/pointer-list"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
},
"jsonschema": {
"type": "object",
"properties": {
"type": {
- "type": "string",
- "enum": [
- "number",
- "string",
- "boolean",
- "integer",
- "array"
+ "anyOf": [
+ {
+ "type": "string",
+ "const": "number"
+ },
+ {
+ "type": "string",
+ "const": "string"
+ },
+ {
+ "type": "string",
+ "const": "boolean"
+ },
+ {
+ "type": "string",
+ "const": "integer"
+ },
+ {
+ "type": "string",
+ "const": "array"
+ },
+ {
+ "type": "string"
+ }
]
},
"enum": {
"type": "array",
"items": {
"$ref": "#/definitions/allowed-types"
},
"minItems": 1
},
"const": {
"$ref": "#/definitions/allowed-types"
},
"default": {
"$ref": "#/definitions/allowed-types"
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
},
"exclusiveMinimum": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "number"
}
]
},
"exclusiveMaximum": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "number"
}
]
},
"multipleOf": {
"type": "number"
},
"minLength": {
"type": "number"
},
"maxLength": {
"type": "number"
},
"pattern": {
"type": "string"
},
"format": {
- "type": "string",
- "enum": [
- "date-time",
- "date",
- "time",
- "uri",
- "uri-reference",
- "uuid"
+ "anyOf": [
+ {
+ "type": "string",
+ "const": "date-time"
+ },
+ {
+ "type": "string",
+ "const": "date"
+ },
+ {
+ "type": "string",
+ "const": "time"
+ },
+ {
+ "type": "string",
+ "const": "uri"
+ },
+ {
+ "type": "string",
+ "const": "uri-reference"
+ },
+ {
+ "type": "string",
+ "const": "uuid"
+ },
+ {
+ "type": "string"
+ }
]
},
"minItems": {
"type": "number"
},
"maxItems": {
"type": "number"
},
"uniqueItems": {
"type": "boolean"
},
"items": {
"type": "object",
"properties": {
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"description": {
"type": "string"
},
"$comment": {
"type": "string"
},
"type": {
- "type": "string",
- "enum": [
- "number",
- "string",
- "boolean",
- "integer"
+ "anyOf": [
+ {
+ "type": "string",
+ "const": "number"
+ },
+ {
+ "type": "string",
+ "const": "string"
+ },
+ {
+ "type": "string",
+ "const": "boolean"
+ },
+ {
+ "type": "string",
+ "const": "integer"
+ },
+ {
+ "type": "string"
+ }
]
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
},
"enum": {
"type": "array",
"minItems": 1
},
"format": {
"type": "string"
},
"minLength": {
"type": "number"
},
"maxLength": {
"type": "number"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
}
},
"additionalProperties": false
},
"allowed-types": {
"anyOf": [
{
"type": "number"
},
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "number"
}
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "boolean"
}
+ },
+ {
}
]
},
"actionqualities": {
"type": "object",
"properties": {
"sdfInputData": {
"$ref": "#/definitions/pointer-list"
},
"sdfRequiredInputData": {
"$ref": "#/definitions/pointer-list"
},
"sdfOutputData": {
"$ref": "#/definitions/pointer-list"
},
"sdfData": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/dataqualities"
}
},
"description": {
"type": "string"
},
"label": {
"type": "string"
},
"$comment": {
"type": "string"
},
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"sdfRequired": {
"$ref": "#/definitions/pointer-list"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
},
"eventqualities": {
"type": "object",
"properties": {
"sdfOutputData": {
"$ref": "#/definitions/pointer-list"
},
"sdfData": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/dataqualities"
}
},
"description": {
"type": "string"
},
"label": {
"type": "string"
},
"$comment": {
"type": "string"
},
"sdfRef": {
"$ref": "#/definitions/sdf-pointer"
},
"sdfRequired": {
"$ref": "#/definitions/pointer-list"
}
},
- "additionalProperties": false
+ "additionalProperties": {
+ }
},
"productqualities": {
"$ref": "#/definitions/thingqualities"
}
}
}
Acknowledgements Acknowledgements
This draft is based on "sdf.md" and "sdf-schema.json" in the old one- This draft is based on "sdf.md" and "sdf-schema.json" in the old one-
data-model "language" repository, as well as Ari Keranen's "alt- data-model "language" repository, as well as Ari Keranen's "alt-
schema" from the Ericsson Research "ipso-odm" repository (which is schema" from the Ericsson Research "ipso-odm" repository (which is
now under subdirectory "sdflint" in the one-data model "tools" now under subdirectory "sdflint" in the one-data model "tools"
repository). repository).
Contributors Contributors
 End of changes. 77 change blocks. 
1033 lines changed or deleted 290 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/