diff --git a/src/schema-validation.json b/src/schema-validation.json index a6b34b1c608..b91536140a1 100644 --- a/src/schema-validation.json +++ b/src/schema-validation.json @@ -224,6 +224,7 @@ "lsdlschema-3.3.json", "lsdlschema-3.4.json", "lsdlschema-3.5.json", + "lsdlschema-4.0.json", "lsdlschema.json", "nodemon.json", "partial-pyright.json", @@ -309,6 +310,7 @@ "lsdlschema-3.3.json", "lsdlschema-3.4.json", "lsdlschema-3.5.json", + "lsdlschema-4.0.json", "sarif-2.0.0-csd.2.beta.2018-10-10.json", "sarif-2.0.0-csd.2.beta.2019-01-09.json", "sarif-2.0.0-csd.2.beta.2019-01-24.json", @@ -684,6 +686,9 @@ "lsdlschema-3.5.json": { "unknownFormat": ["language", "identifier"] }, + "lsdlschema-4.0.json": { + "unknownFormat": ["language", "identifier"] + }, "lsdlschema.json": { "externalSchema": [ "lsdlschema-0.7.json", @@ -695,7 +700,8 @@ "lsdlschema-3.2.json", "lsdlschema-3.3.json", "lsdlschema-3.4.json", - "lsdlschema-3.5.json" + "lsdlschema-3.5.json", + "lsdlschema-4.0.json" ], "unknownFormat": ["language", "identifier-properties", "identifier"] }, diff --git a/src/schemas/json/lsdlschema-4.0.json b/src/schemas/json/lsdlschema-4.0.json new file mode 100644 index 00000000000..abfaab51ce1 --- /dev/null +++ b/src/schemas/json/lsdlschema-4.0.json @@ -0,0 +1,1710 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/lsdlschema-4.0.json", + "title": "LSDL Schema", + "description": "Linguistic Schema Definition Language schema", + "type": "object", + "properties": { + "Version": { + "description": "Version of LSDL", + "enum": ["4.0.0"] + }, + "Language": { + "description": "Target language for the linguistic schema", + "type": "string", + "pattern": "^[A-Za-z][A-Za-z]+(-[A-Za-z0-9][A-Za-z0-9]+)*$", + "format": "language" + }, + "DynamicImprovement": { + "$ref": "#/definitions/dynamicImprovement", + "description": "Dynamic improvement settings for the linguistic schema." + }, + "MinResultConfidence": { + "description": "Indicates the confidence score required for an interpretation of an utterance to be returned.", + "enum": ["Default", "VeryHigh", "High", "Medium", "Low"], + "default": "Default" + }, + "Namespaces": { + "$ref": "#/definitions/namespaces", + "description": "Additional linguistic schemas referenced by objects within this linguistic schema" + }, + "Entities": { + "$ref": "#/definitions/entities", + "description": "The entities in the linguistic schema." + }, + "Relationships": { + "$ref": "#/definitions/relationships", + "description": "The relationships in the linguistic schema." + }, + "GlobalSubstitutions": { + "$ref": "#/definitions/globalSubstitutions", + "description": "The global text substitutions in the linguistic schema." + }, + "Examples": { + "$ref": "#/definitions/examples", + "description": "Examples associated with the linguistic schema." + }, + "Agents": { + "$ref": "#/definitions/agents", + "description": "A list of agents that have modified this linguistic schema." + } + }, + "required": ["Version", "Language"], + "additionalProperties": false, + "definitions": { + "identifier": { + "description": "Identifier for a linguistic schema object", + "type": "string", + "pattern": "^.+$", + "format": "identifier" + }, + "modelItemReference": { + "description": "Name of the conceptual model object to which the linguistic schema object is bound", + "type": "string" + }, + "nonEmptyString": { + "type": "string", + "minLength": 1 + }, + "state": { + "description": "Indicates the state of an object in the linguistic schema.", + "enum": ["Authored", "Generated", "Suggested", "Deleted"], + "default": "Authored" + }, + "propertyState": { + "description": "Indicates the state of a property on a linguistic schema item.", + "enum": ["Default", "Authored", "Generated", "Suggested"], + "default": "Default" + }, + "agentState": { + "description": "Indicates whether a modeling environment should use the agent to improve the linguistic schema.", + "enum": ["Enabled", "Disabled"], + "default": "Enabled" + }, + "visibility": { + "description": "Indicates whether the entity is hidden.", + "enum": ["Visible", "Hidden", "Children"], + "default": "Visible" + }, + "visibilityProperty": { + "description": "Indicates whether the entity is hidden.", + "oneOf": [ + { + "$ref": "#/definitions/visibility" + }, + { + "$ref": "#/definitions/fullVisibilityProperty" + } + ] + }, + "fullVisibilityProperty": { + "description": "Indicates whether the entity is hidden.", + "type": "object", + "properties": { + "Value": { + "$ref": "#/definitions/visibility" + }, + "State": { + "$ref": "#/definitions/propertyState", + "description": "The state of the visibility property" + } + }, + "required": ["Value"] + }, + "source": { + "description": "Indicates who/what created the object in the linguistic schema.", + "oneOf": [ + { + "$ref": "#/definitions/sourceType" + }, + { + "$ref": "#/definitions/fullSource" + } + ] + }, + "fullSource": { + "description": "Indicates who/what created the object in the linguistic schema.", + "type": "object", + "properties": { + "Type": { + "$ref": "#/definitions/sourceType" + }, + "Agent": { + "description": "Specific name of the agent that created the object.", + "type": "string" + } + } + }, + "sourceType": { + "description": "Indicates the type of the creator of the object", + "enum": ["Default", "User", "Internal", "External"], + "default": "Default" + }, + "weight": { + "description": "Indicates a weight to apply to an object when selecting between ambiguous alternatives. A higher weight is a stronger preference for selecting the object.", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1 + }, + "templateSchema": { + "description": "Identifies the shared template schema from which an object in the linguistic schema is derived", + "type": "string" + }, + "dateTime": { + "description": "Date and time in UTC", + "type": "string", + "format": "date-time" + }, + "dynamicImprovement": { + "description": "Dynamic improvement settings for the linguistic schema.", + "type": "object", + "properties": { + "Schema": { + "description": "Indicates which heuristics should be run to automatically improve the linguistic schema.", + "enum": ["Default", "Full", "None"], + "default": "Default" + }, + "RuntimeUnderstanding": { + "description": "Indicates which heuristics and external data should be used to interpret parts of the user utterance that are not understood.", + "enum": ["Default", "Full", "None"], + "default": "Default" + } + }, + "additionalProperties": false + }, + "namespaces": { + "description": "A set of references to additional linguistic schemas that may be referenced by objects in this linguistic schema", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/lsdlReference" + }, + "propertyNames": { + "$ref": "#/definitions/identifier" + } + }, + "lsdlReference": { + "description": "A reference to an additional linguistic schema.", + "type": "object", + "additionalProperties": false + }, + "entities": { + "description": "The entities in the linguistic schema", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/entity" + }, + "propertyNames": { + "$ref": "#/definitions/identifier" + }, + "minProperties": 1 + }, + "entity": { + "description": "An entity in the linguistic schema", + "type": "object", + "properties": { + "Definition": { + "$ref": "#/definitions/entityDefinition" + }, + "State": { + "$ref": "#/definitions/state", + "description": "The state of the entity" + }, + "Visibility": { + "$ref": "#/definitions/visibilityProperty", + "description": "Indicates whether the entity is hidden. Hidden entities are ignored for all purposes other than being available nodes along paths between other related entities." + }, + "Weight": { + "$ref": "#/definitions/weight", + "description": "The weight to apply to this entity" + }, + "TemplateSchema": { + "$ref": "#/definitions/templateSchema", + "description": "Identifies the shared template schema from which this entity is derived" + }, + "Terms": { + "$ref": "#/definitions/terms", + "description": "Terms which can be used to refer to this entity" + }, + "SemanticType": { + "description": "The overall semantic category of the entity", + "enum": [ + "Person", + "Animate", + "Inanimate", + "Location", + "Time", + "Duration" + ] + }, + "NameType": { + "description": "Indicates whether this entity represents the Name or ID of something", + "enum": ["None", "Name", "Identifier"], + "default": "None" + }, + "Units": { + "$ref": "#/definitions/terms", + "description": "Nouns which indicate the units represented in this numeric property entity." + }, + "Instances": { + "$ref": "#/definitions/instances", + "description": "Defines how instance values from the model are recognized" + }, + "ImplicitGroupings": { + "$ref": "#/definitions/entityReferences", + "description": "A list of related entities which are used to group the query when this entity is shown" + } + }, + "required": ["Definition"], + "additionalProperties": false + }, + "entityDefinition": { + "description": "The definition for an entity", + "oneOf": [ + { + "$ref": "#/definitions/bindingEntityDefinition" + }, + { + "$ref": "#/definitions/textEntityDefinition" + } + ] + }, + "bindingEntityDefinition": { + "type": "object", + "properties": { + "Binding": { + "$ref": "#/definitions/entityBinding", + "description": "The conceptual model object binding" + } + }, + "required": ["Binding"], + "additionalProperties": false + }, + "entityBinding": { + "description": "The conceptual model object binding for an entity", + "oneOf": [ + { + "$ref": "#/definitions/conceptualEntityBinding" + }, + { + "$ref": "#/definitions/conceptualPropertyBinding" + }, + { + "$ref": "#/definitions/hierarchyBinding" + }, + { + "$ref": "#/definitions/hierarchyLevelBinding" + } + ] + }, + "textEntityDefinition": { + "type": "object", + "properties": { + "Text": { + "$ref": "#/definitions/nonEmptyString", + "description": "The textual definition" + } + }, + "required": ["Text"], + "additionalProperties": false + }, + "conceptualEntityBinding": { + "description": "A conceptual entity or table in the conceptual model to which a linguistic schema object is bound", + "oneOf": [ + { + "type": "object", + "properties": { + "Table": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the table." + } + }, + "required": ["Table"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "ConceptualEntity": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the conceptual entity (e.g. table or pod)" + } + }, + "required": ["ConceptualEntity"], + "additionalProperties": false + } + ] + }, + "conceptualPropertyBinding": { + "description": "A conceptual property, column, or measure in the conceptual model to which a linguistic schema object is bound.", + "oneOf": [ + { + "type": "object", + "properties": { + "Table": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the table containing the column or measure" + }, + "VariationSource": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property containing the variation set that contains the column or measure" + }, + "VariationSet": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the variation set that contains the column or measure" + }, + "Column": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the column" + } + }, + "required": ["Table", "Column"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "Table": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the table containing the column or measure" + }, + "VariationSource": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property containing the variation set that contains the column or measure" + }, + "VariationSet": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the variation set that contains the column or measure" + }, + "Measure": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the measure" + } + }, + "required": ["Table", "Measure"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "ConceptualEntity": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the conceptual entity containing the property" + }, + "VariationSource": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property containing the variation set that contains the property" + }, + "VariationSet": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the variation set that contains the property" + }, + "ConceptualProperty": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property" + } + }, + "required": ["ConceptualEntity", "ConceptualProperty"], + "additionalProperties": false + } + ] + }, + "hierarchyBinding": { + "description": "A hierarchy in the conceptual model to which a linguistic schema object is bound", + "oneOf": [ + { + "type": "object", + "properties": { + "Table": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the table containing the hierarchy" + }, + "VariationSource": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property containing the variation set that contains the hierarchy" + }, + "VariationSet": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the variation set that contains the hierarchy" + }, + "Hierarchy": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the hierarchy" + } + }, + "required": ["Table", "Hierarchy"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "ConceptualEntity": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the conceptual entity containing the hierarchy" + }, + "VariationSource": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property containing the variation set that contains the hierarchy" + }, + "VariationSet": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the variation set that contains the hierarchy" + }, + "Hierarchy": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the hierarchy" + } + }, + "required": ["ConceptualEntity", "Hierarchy"], + "additionalProperties": false + } + ] + }, + "hierarchyLevelBinding": { + "description": "A hierarchy level in the conceptual model to which a linguistic schema object is bound", + "oneOf": [ + { + "type": "object", + "properties": { + "Table": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the table containing the hierarchy" + }, + "VariationSource": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property containing the variation set that contains the hierarchy" + }, + "VariationSet": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the variation set that contains the hierarchy" + }, + "Hierarchy": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the hierarchy" + }, + "HierarchyLevel": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the hierarchy level" + } + }, + "required": ["Table", "Hierarchy", "HierarchyLevel"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "ConceptualEntity": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the conceptual entity containing the hierarchy" + }, + "VariationSource": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the property containing the variation set that contains the hierarchy" + }, + "VariationSet": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the variation set that contains the hierarchy" + }, + "Hierarchy": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the hierarchy" + }, + "HierarchyLevel": { + "$ref": "#/definitions/modelItemReference", + "description": "The name of the hierarchy level" + } + }, + "required": ["ConceptualEntity", "Hierarchy", "HierarchyLevel"], + "additionalProperties": false + } + ] + }, + "terms": { + "description": "A list of terms in the linguistic schema", + "type": "array", + "items": { + "$ref": "#/definitions/term" + }, + "minItems": 1 + }, + "term": { + "description": "A term in the linguistic schema", + "oneOf": [ + { + "$ref": "#/definitions/nonEmptyString" + }, + { + "$ref": "#/definitions/fullTerm" + } + ] + }, + "fullTerm": { + "description": "A term in the linguistic schema", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/termProperties" + }, + "propertyNames": { + "$ref": "#/definitions/nonEmptyString" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "termProperties": { + "description": "Properties of a term in the linguistic schema", + "type": "object", + "properties": { + "Type": { + "description": "The part of speech of the term", + "enum": ["Noun", "Verb", "Adverb", "Adjective", "Preposition"] + }, + "State": { + "$ref": "#/definitions/state", + "description": "The state of the term" + }, + "Source": { + "$ref": "#/definitions/source", + "description": "The source of the term" + }, + "Weight": { + "$ref": "#/definitions/weight", + "description": "The weight to apply to the term" + }, + "TemplateSchema": { + "$ref": "#/definitions/templateSchema", + "description": "Identifies the shared template schema from which the term is derived" + }, + "LastModified": { + "$ref": "#/definitions/dateTime", + "description": "Indicates the last date and time (in UTC) that this term was modified." + } + }, + "additionalProperties": false + }, + "instances": { + "description": "Defines how instance values from the model are recognized", + "type": "object", + "properties": { + "Index": { + "description": "Indicates whether the values of this entity should be available in the term index, enabling recognition, completion, and suggestions.", + "enum": ["Default", "All", "None"], + "default": "Default" + }, + "PluralNormalization": { + "description": "Indicates whether values that appear to be plural should match singular words in the utterance.", + "enum": ["Default", "Normalized", "None"], + "default": "Default" + }, + "Synonyms": { + "$ref": "#/definitions/instanceSynonyms", + "description": "Defines a set of values which are synonyms of instances of this entity." + }, + "Weights": { + "$ref": "#/definitions/instanceWeights", + "description": "Reference to property in the model which contains the weight to apply to instances of this entity." + } + }, + "additionalProperties": false + }, + "instanceSynonyms": { + "description": "A pair of properties that contain synonyms for the instances of an entity.", + "type": "object", + "properties": { + "SynonymBinding": { + "$ref": "#/definitions/conceptualPropertyBinding", + "description": "The conceptual model object which contains terms that can be used to refer to values of the entity" + }, + "ValueBinding": { + "$ref": "#/definitions/conceptualPropertyBinding", + "description": "The conceptual model object which contains the corresponding values of the entity" + }, + "State": { + "$ref": "#/definitions/state", + "description": "The state of the instance synonyms" + } + }, + "required": ["SynonymBinding", "ValueBinding"], + "additionalProperties": false + }, + "instanceWeights": { + "description": "A reference to column in the model that contains the weight to apply to instances of this entity when selecting between ambiguous alternative instances. A higher weight is a stronger preference for selecting this instance of this entity.", + "type": "object", + "properties": { + "Binding": { + "$ref": "#/definitions/conceptualPropertyBinding", + "description": "The conceptual model object which contains the instance weights corresponding to instances of the entity" + } + }, + "required": ["Binding"], + "additionalProperties": false + }, + "entityReferences": { + "description": "The list of entity references", + "type": "array", + "items": { + "$ref": "#/definitions/entityReference" + }, + "minItems": 1 + }, + "relationships": { + "description": "The relationships in the linguistic schema", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/relationship" + }, + "propertyNames": { + "$ref": "#/definitions/identifier" + }, + "minProperties": 1 + }, + "relationship": { + "description": "A relationship in the linguistic schema", + "type": "object", + "properties": { + "Binding": { + "description": "The conceptual model object which embodies the relationship", + "oneOf": [ + { + "$ref": "#/definitions/conceptualEntityBinding" + } + ] + }, + "State": { + "$ref": "#/definitions/state", + "description": "The state of the relationship" + }, + "Weight": { + "$ref": "#/definitions/weight", + "description": "The weight to apply to this relationship" + }, + "TemplateSchema": { + "$ref": "#/definitions/templateSchema", + "description": "Identifies the shared template schema from which this relationship is derived" + }, + "LastModified": { + "$ref": "#/definitions/dateTime", + "description": "Indicates the last date and time (in UTC) that this relationship was modified." + }, + "Roles": { + "$ref": "#/definitions/roles", + "description": "References to linguistic entities which participate in the relationship" + }, + "SemanticSlots": { + "$ref": "#/definitions/semanticSlots", + "description": "Defines how roles fill common semantic slots in the relationship" + }, + "Conditions": { + "$ref": "#/definitions/conditions", + "description": "A set of conditions which are required to be true for instances of the relationship represented in the semantic model" + }, + "Phrasings": { + "$ref": "#/definitions/phrasings", + "description": "A set of syntactic frames which define the types of language used to describe the relationship" + } + }, + "additionalProperties": false + }, + "roles": { + "description": "The roles in a linguistic relationship", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/role" + }, + "propertyNames": { + "$ref": "#/definitions/identifier" + }, + "minProperties": 1 + }, + "role": { + "description": "A role in a linguistic relationship.", + "oneOf": [ + { + "$ref": "#/definitions/identifier" + }, + { + "$ref": "#/definitions/fullRole" + } + ] + }, + "fullRole": { + "description": "A role in a linguistic relationship.", + "type": "object", + "properties": { + "Target": { + "$ref": "#/definitions/entityReference", + "description": "The linguistic entity which is the target of the role" + }, + "Nouns": { + "$ref": "#/definitions/terms", + "description": "Nouns which can be used to refer to the entity which is the target of the role, when used in the context of the relationship" + }, + "Quantity": { + "$ref": "#/definitions/roleReference", + "description": "A role which indicates the quantity of this role's entity which participates in the relationship" + }, + "Amount": { + "$ref": "#/definitions/roleReference", + "description": "A role which indicates the amount of this role's entity which participates in the relationship" + } + }, + "required": ["Target"], + "additionalProperties": false + }, + "entityReference": { + "description": "A reference to an entity in a linguistic relationship", + "oneOf": [ + { + "$ref": "#/definitions/identifier" + }, + { + "$ref": "#/definitions/fullEntityReference" + } + ] + }, + "fullEntityReference": { + "description": "A reference to an entity in a linguistic relationship", + "type": "object", + "properties": { + "Entity": { + "$ref": "#/definitions/identifier", + "description": "The name of the entity" + }, + "Namespace": { + "$ref": "#/definitions/identifier", + "description": "The name of the namespace of the linguistic schema that contains the entity" + } + }, + "required": ["Entity"], + "additionalProperties": false + }, + "semanticSlots": { + "description": "Defines how roles fill certain common semantic slots (aka thematic relations) in the relationship", + "type": "object", + "properties": { + "Where": { + "$ref": "#/definitions/roleReference", + "description": "A role which indicates where the relationship takes place" + }, + "When": { + "$ref": "#/definitions/roleReference", + "description": "A role which indicates when the relationship takes place" + }, + "Duration": { + "$ref": "#/definitions/roleReference", + "description": "A role which indicates how long the relationship occurred" + }, + "Occurrences": { + "$ref": "#/definitions/roleReference", + "description": "A role which indicates the number of times the relationship occurred" + } + }, + "additionalProperties": false + }, + "conditions": { + "description": "The conditions on a relationship", + "type": "array", + "items": { + "$ref": "#/definitions/condition" + }, + "minItems": 1, + "maxItems": 1 + }, + "condition": { + "description": "A filter on a relationship that defines the circumstances under which a row in the semantic model represents an instance of the relationship", + "type": "object", + "properties": { + "Target": { + "$ref": "#/definitions/roleReference", + "description": "A role in the relationship to compare to the value" + }, + "Aggregation": { + "description": "An aggregate function applied to the role", + "enum": [ + "None", + "Sum", + "Average", + "Count", + "Min", + "Max", + "Median", + "Variance", + "StandardDeviation" + ] + }, + "Operator": { + "description": "The operator with which to compare the value and the role", + "enum": [ + "Equals", + "NotEquals", + "GreaterThan", + "LessThan", + "GreaterThanOrEquals", + "LessThanOrEquals", + "Contains", + "NotContains", + "StartsWith", + "NotStartsWith" + ] + }, + "Value": { + "$ref": "#/definitions/value", + "description": "The value to which the role is compared" + } + }, + "required": ["Target", "Operator", "Value"], + "additionalProperties": false + }, + "value": { + "description": "A literal value to use in a condition", + "anyOf": [ + { + "type": "object", + "properties": { + "Text": { + "$ref": "#/definitions/textValues", + "description": "A text value to use in a condition" + } + }, + "required": ["Text"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "Number": { + "$ref": "#/definitions/numberValues", + "description": "A number value to use in a condition" + } + }, + "required": ["Number"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "Boolean": { + "$ref": "#/definitions/booleanValues", + "description": "A Boolean value to use in a condition" + } + }, + "required": ["Boolean"], + "additionalProperties": false + }, + { + "$ref": "#/definitions/textValues" + }, + { + "$ref": "#/definitions/numberValues" + }, + { + "$ref": "#/definitions/booleanValues" + }, + { + "type": "null" + } + ] + }, + "textValues": { + "description": "One or more text values to use in a condition", + "oneOf": [ + { + "$ref": "#/definitions/nullableTextValue" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/nullableTextValue" + }, + "minItems": 1, + "maxItems": 1 + } + ] + }, + "nullableTextValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "numberValues": { + "description": "One or more number values to use in a condition", + "oneOf": [ + { + "$ref": "#/definitions/nullableNumberValue" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/nullableNumberValue" + }, + "minItems": 1, + "maxItems": 1 + } + ] + }, + "nullableNumberValue": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "booleanValues": { + "description": "One or more Boolean values to use in a condition", + "oneOf": [ + { + "$ref": "#/definitions/nullableBooleanValue" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/nullableBooleanValue" + }, + "minItems": 1, + "maxItems": 1 + } + ] + }, + "nullableBooleanValue": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "phrasings": { + "type": "array", + "items": { + "$ref": "#/definitions/phrasing" + }, + "minItems": 1 + }, + "phrasing": { + "description": "The phrasings on a linguistic relationship", + "oneOf": [ + { + "$ref": "#/definitions/attributePhrasing" + }, + { + "$ref": "#/definitions/namePhrasing" + }, + { + "$ref": "#/definitions/adjectivePhrasing" + }, + { + "$ref": "#/definitions/dynamicAdjectivePhrasing" + }, + { + "$ref": "#/definitions/nounPhrasing" + }, + { + "$ref": "#/definitions/dynamicNounPhrasing" + }, + { + "$ref": "#/definitions/prepositionPhrasing" + }, + { + "$ref": "#/definitions/verbPhrasing" + } + ] + }, + "phrasingProperties": { + "type": "object", + "properties": { + "State": { + "$ref": "#/definitions/state", + "description": "The state of the phrasing" + }, + "Weight": { + "$ref": "#/definitions/weight", + "description": "The weight to apply to the phrasing" + }, + "TemplateSchema": { + "$ref": "#/definitions/templateSchema", + "description": "Identifies the shared template schema from which the phrasing is derived" + }, + "LastModified": { + "$ref": "#/definitions/dateTime", + "description": "Indicates the last date and time (in UTC) that this phrasing was modified." + }, + "ID": { + "$ref": "#/definitions/identifier", + "description": "The ID of the phrasing" + }, + "Source": { + "$ref": "#/definitions/source", + "description": "The source of the phrasing" + } + } + }, + "phrasingPropertyNames": { + "enum": [ + "State", + "Weight", + "TemplateSchema", + "LastModified", + "ID", + "Source" + ] + }, + "attributePhrasing": { + "description": "An attribute phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "Attribute": { + "$ref": "#/definitions/attributePhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "Attribute" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["Attribute"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "attributePhrasingProperties": { + "description": "Properties of an attribute phrasing", + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the subject of the phrasing" + }, + "Object": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the object of the phrasing" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Subject", "Object"], + "additionalProperties": false + }, + "namePhrasing": { + "description": "A name phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "Name": { + "$ref": "#/definitions/namePhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "Name" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["Name"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "namePhrasingProperties": { + "description": "Properties of a name phrasing", + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the subject of the phrasing" + }, + "Name": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the name of the Subject" + } + }, + "required": ["Subject", "Name"], + "additionalProperties": false + }, + "adjectivePhrasing": { + "description": "An adjective phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "Adjective": { + "$ref": "#/definitions/adjectivePhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "Adjective" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["Adjective"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "adjectivePhrasingProperties": { + "description": "Properties of an adjective phrasing", + "oneOf": [ + { + "$ref": "#/definitions/adjectivePhrasingProperty" + }, + { + "$ref": "#/definitions/antonymPhrasingProperty" + } + ] + }, + "adjectivePhrasingProperty": { + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is described via an adjective" + }, + "Adjectives": { + "$ref": "#/definitions/terms", + "description": "Adjectives used to describe the Subject (with a high measurement)" + }, + "Antonyms": { + "$ref": "#/definitions/terms", + "description": "Adjectives used to describe the Subject (with a low measurement)" + }, + "Measurement": { + "$ref": "#/definitions/roleReference", + "description": "The entity which measures the extent to which the Adjectives apply" + }, + "AdverbPhrases": { + "$ref": "#/definitions/adverbPhrases", + "description": "Additional adverb phrases which apply to the phrasing" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Subject", "Adjectives"], + "additionalProperties": false + }, + "antonymPhrasingProperty": { + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is described via an adjective" + }, + "Antonyms": { + "$ref": "#/definitions/terms", + "description": "Adjectives used to describe the Subject (with a low measurement)" + }, + "Measurement": { + "$ref": "#/definitions/roleReference", + "description": "The entity which measures the extent to which the Adjectives apply" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Subject", "Antonyms"], + "additionalProperties": false + }, + "dynamicAdjectivePhrasing": { + "description": "A dynamic adjective phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "DynamicAdjective": { + "$ref": "#/definitions/dynamicAdjectivePhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "DynamicAdjective" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["DynamicAdjective"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "dynamicAdjectivePhrasingProperties": { + "description": "Properties of a dynamic adjective phrasing", + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is described via an adjective" + }, + "Adjective": { + "$ref": "#/definitions/roleReference", + "description": "The column entity (or table entity with a name phrasing) which is used to describe the Subject" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Subject", "Adjective"], + "additionalProperties": false + }, + "nounPhrasing": { + "description": "A noun phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "Noun": { + "$ref": "#/definitions/nounPhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "Noun" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["Noun"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "nounPhrasingProperties": { + "description": "Properties of a noun phrasing", + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is described via a noun" + }, + "Nouns": { + "$ref": "#/definitions/terms", + "description": "Nouns used to describe the Subject" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Subject", "Nouns"], + "additionalProperties": false + }, + "dynamicNounPhrasing": { + "description": "A dynamic noun phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "DynamicNoun": { + "$ref": "#/definitions/dynamicNounPhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "DynamicNoun" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["DynamicNoun"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "dynamicNounPhrasingProperties": { + "description": "Properties of a dynamic noun phrasing", + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is described via a noun" + }, + "Noun": { + "$ref": "#/definitions/roleReference", + "description": "The column entity (or table entity with a name phrasing) which is the used to describe the Subject" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Subject", "Noun"], + "additionalProperties": false + }, + "prepositionPhrasing": { + "description": "A preposition phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "Preposition": { + "$ref": "#/definitions/prepositionPhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "Preposition" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["Preposition"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "prepositionPhrasingProperties": { + "description": "Properties of a preposition phrasing", + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the subject of the prepositional phrase" + }, + "Prepositions": { + "$ref": "#/definitions/terms", + "description": "Prepositions used in the prepositional phrase" + }, + "Object": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the object of the prepositional phrase" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Subject", "Prepositions", "Object"], + "additionalProperties": false + }, + "verbPhrasing": { + "description": "A verb phrasing on a linguistic relationship", + "type": "object", + "allOf": [ + { + "properties": { + "Verb": { + "$ref": "#/definitions/verbPhrasingProperties" + } + }, + "propertyNames": { + "anyOf": [ + { + "const": "Verb" + }, + { + "$ref": "#/definitions/phrasingPropertyNames" + } + ] + }, + "required": ["Verb"] + }, + { + "$ref": "#/definitions/phrasingProperties" + } + ] + }, + "verbPhrasingProperties": { + "description": "Properties of a verb phrasing", + "type": "object", + "properties": { + "Subject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the subject of the verb" + }, + "Verbs": { + "$ref": "#/definitions/terms", + "description": "Verbs used to describe the relationship" + }, + "IndirectObject": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the indirect object of the verb" + }, + "Object": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the direct object of the verb" + }, + "AdverbPhrases": { + "$ref": "#/definitions/adverbPhrases", + "description": "Additional adverb phrases which apply to the phrasing" + }, + "PrepositionalPhrases": { + "$ref": "#/definitions/prepPhrases", + "description": "Additional prepositional phrases which apply to the phrasing" + } + }, + "required": ["Verbs"], + "additionalProperties": false + }, + "adverbPhrases": { + "description": "Adverb phrases used in a phrasing", + "type": "array", + "items": { + "$ref": "#/definitions/adverbPhrase" + }, + "minItems": 1 + }, + "adverbPhrase": { + "description": "An adverb phrase in a linguistic relationship", + "oneOf": [ + { + "$ref": "#/definitions/adverbPhraseProperty" + }, + { + "$ref": "#/definitions/adverbAntonymPhraseProperty" + } + ] + }, + "adverbPhraseProperty": { + "type": "object", + "properties": { + "Adverbs": { + "$ref": "#/definitions/terms", + "description": "Adverbs used to describe the relationship (high measurement)" + }, + "Antonyms": { + "$ref": "#/definitions/terms", + "description": "Adverbs used to describe the relationship (low measurement)" + }, + "Measurement": { + "$ref": "#/definitions/roleReference", + "description": "The measure which the adverb pertains to" + } + }, + "required": ["Adverbs"], + "additionalProperties": false + }, + "adverbAntonymPhraseProperty": { + "type": "object", + "properties": { + "Antonyms": { + "$ref": "#/definitions/terms", + "description": "Adverbs used to describe the relationship (low measurement)" + }, + "Measurement": { + "$ref": "#/definitions/roleReference", + "description": "The measure which the adverb pertains to" + } + }, + "required": ["Antonyms"], + "additionalProperties": false + }, + "prepPhrases": { + "description": "Prepositional phrases used in a phrasing", + "type": "array", + "items": { + "$ref": "#/definitions/prepPhrase" + }, + "minItems": 1 + }, + "prepPhrase": { + "description": "A prepositional phrase used in a phrasing", + "type": "object", + "properties": { + "Prepositions": { + "$ref": "#/definitions/terms", + "description": "Prepositions used in the prepositional phrase" + }, + "Object": { + "$ref": "#/definitions/roleReference", + "description": "The entity which is the object of the prepositional phrase" + } + }, + "required": ["Prepositions", "Object"], + "additionalProperties": false + }, + "roleReference": { + "description": "A reference to a role in a linguistic relationship", + "oneOf": [ + { + "$ref": "#/definitions/identifier" + }, + { + "$ref": "#/definitions/fullRoleReference" + } + ] + }, + "fullRoleReference": { + "description": "A reference to a role in a linguistic relationship", + "type": "object", + "properties": { + "Role": { + "$ref": "#/definitions/identifier" + } + }, + "required": ["Role"], + "additionalProperties": false + }, + "globalSubstitutions": { + "description": "Global text substitutions in the linguistic schema.", + "type": "array", + "items": { + "$ref": "#/definitions/globalSubstitution" + }, + "minItems": 1 + }, + "globalSubstitution": { + "description": "A global text substitution in the linguistic schema.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/globalSubstitutionProperties" + }, + "propertyNames": { + "$ref": "#/definitions/nonEmptyString" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "globalSubstitutionProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/fullGlobalSubstitutionProperties" + } + ] + }, + "fullGlobalSubstitutionProperties": { + "type": "object", + "properties": { + "Substitute": { + "description": "The sequence of words to substitute into the utterance.", + "type": "string" + }, + "State": { + "$ref": "#/definitions/state", + "description": "The state of the global substitution" + }, + "TemplateSchema": { + "$ref": "#/definitions/templateSchema", + "description": "Identifies the shared template schema from which this global substitution is derived" + } + }, + "required": ["Substitute"], + "additionalProperties": false + }, + "examples": { + "description": "Examples associated with the linguistic schema", + "type": "array", + "items": { + "$ref": "#/definitions/example" + }, + "minItems": 1 + }, + "example": { + "description": "An example utterance associated with the linguistic schema", + "oneOf": [ + { + "$ref": "#/definitions/nonEmptyString" + }, + { + "$ref": "#/definitions/fullExample" + } + ] + }, + "fullExample": { + "description": "An example utterance associated with the linguistic schema", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/exampleProperties" + }, + "propertyNames": { + "$ref": "#/definitions/nonEmptyString" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "exampleProperties": { + "description": "Metadata properties about an example utterance", + "type": "object", + "properties": { + "TemplateSchema": { + "$ref": "#/definitions/templateSchema", + "description": "Identifies the shared template schema from which the example is derived" + } + }, + "additionalProperties": false + }, + "agents": { + "description": "A list of agents that have modified this linguistic schema", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/agentProperties" + }, + "propertyNames": { + "$ref": "#/definitions/nonEmptyString" + }, + "minProperties": 1 + }, + "agentProperties": { + "description": "Properties of an agent in the linguistic schema", + "type": "object", + "properties": { + "LastModified": { + "$ref": "#/definitions/dateTime", + "description": "Indicates the last date and time (in UTC) that this agent modified the linguistic schema." + }, + "State": { + "$ref": "#/definitions/agentState", + "description": "Indicates whether a modeling environment should use the agent to improve the linguistic schema." + } + }, + "additionalProperties": false + } + } +} diff --git a/src/schemas/json/lsdlschema.json b/src/schemas/json/lsdlschema.json index 643800f3aea..2357973730d 100644 --- a/src/schemas/json/lsdlschema.json +++ b/src/schemas/json/lsdlschema.json @@ -4,6 +4,9 @@ "title": "LSDL Schema", "description": "Linguistic Schema Definition Language schema", "anyOf": [ + { + "$ref": "https://json.schemastore.org/lsdlschema-4.0.json" + }, { "$ref": "https://json.schemastore.org/lsdlschema-3.5.json" },