diff --git a/WoT/WoT-Definitions.cs b/WoT/WoT-Definitions.cs index ddbf705..50a2718 100644 --- a/WoT/WoT-Definitions.cs +++ b/WoT/WoT-Definitions.cs @@ -7,15 +7,21 @@ namespace WoT.Definitions { /// - /// A Map providing a set of human-readable texts in different languages identified by language tags described in [BCP47]. See 6.3.2 Human-Readable Metadata for example usages of this container in a Thing Description instance. - /// - /// Each name of the MultiLanguage Map MUST be a language tag as defined in [BCP47]. Each value of the MultiLanguage Map MUST be of type string. - /// + /// A Map providing a set of human-readable texts in different languages identified by language tags described in [BCP47]. /// + /// + /// See 6.3.2 Human-Readable Metadata for example usages of this container in a Thing Description instance. + /// Each name of the MultiLanguage Map MUST be a language tag as defined in [BCP47]. + /// Each value of the MultiLanguage Map MUST be of type string. + /// public class MultiLanguage : Dictionary { } + + /// + /// + /// public interface IDataSchema { [JsonProperty("@type")] @@ -103,25 +109,103 @@ public interface IInteractionAffordance } + + /// + /// Metadata that describes the data format used. It can be used for validation. + /// [JsonConverter(typeof(DataSchemaConverter))] public class DataSchema : IDataSchema { + /// + /// Base Constructor + /// public DataSchema() { } + + /// + /// JSON-LD keyword to label the object with semantic tags (or types) + /// [JsonProperty("@type")] public string[] AtType { get; set; } + + /// + /// Provides a human-readable title (e.g., display a text for UI representation) based on a default language. + /// public string Title { get; set; } + + /// + /// Provides multi-language human-readable titles (e.g., display a text for UI representation in different languages). + /// + /// public MultiLanguage Titles { get; set; } + + /// + /// Provides additional (human-readable) information based on a default language. + /// public string Description { get; set; } + + /// + /// Can be used to support (human-readable) information in different languages. + /// + /// public MultiLanguage Descriptions { get; set; } + + /// + /// Provides a constant value. + /// public object Const { get; set; } + + /// + /// Supply a default value. + /// + /// + /// The value SHOULD validate against the data schema in which it resides. + /// public object Default { get; set; } + + /// + /// Provides unit information that is used, e.g., in international science, engineering, and business. + /// + /// + /// To preserve uniqueness, it is recommended that the value of the unit points to a semantic definition (also see Section Semantic Annotations). + /// public string Unit { get; set; } + + /// + /// Used to ensure that the data is valid against one of the specified schemas in the array. + /// + /// + /// This can be used to describe multiple input or output schemas. + /// public IDataSchema[] OneOf { get; set; } + + /// + /// Used to ensure that the data is valid against all of the specified schemas in the array. + /// public IDataSchema[] AllOf { get; set; } + + /// + /// Restricted set of values provided as an array. + /// public object[] Enum { get; set; } + + /// + /// Boolean value that is a hint to indicate whether a property interaction / value is read only (=true) or not (=false). + /// public bool ReadOnly { get; set; } + + /// + /// Boolean value that is a hint to indicate whether a property interaction / value is write only (=true) or not (=false). + /// public bool WriteOnly { get; set; } + + /// + /// Allows validation based on a format pattern such as "date-time", "email", "uri", etc. + /// public string Format { get; set; } + + /// + /// Assignment of JSON-based data types compatible with JSON Schema (one of boolean, integer, number, string, object, array, or null). + /// public string Type { get; } @@ -451,19 +535,19 @@ public class ThingDescription /// Base Constructor /// public ThingDescription() { } - - [JsonProperty("@context")] - [JsonConverter(typeof(AtContextConverter))] + /// /// JSON-LD keyword to define short-hand names called terms that are used throughout a TD document. /// + [JsonProperty("@context")] + [JsonConverter(typeof(AtContextConverter))] public object[] AtContext { get; set; } - [JsonProperty("@type")] - [JsonConverter(typeof(StringTypeConverter))] /// ///JSON-LD keyword to label the object with semantic tags (or types). /// + [JsonProperty("@type")] + [JsonConverter(typeof(StringTypeConverter))] public string[] AtType { get; set; } ///