UNPKG

@autorest/codemodel

Version:
1,182 lines 32.6 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "Schema": { "type": "object", "properties": { "language": { "$ref": "./master.json#/definitions/Languages", "description": "per-language information for Schema" }, "type": { "$ref": "./types.json#/definitions/AllSchemaTypes", "description": "the schema type" }, "summary": { "description": "a short description", "type": "string" }, "example": { "description": "example information" }, "defaultValue": { "description": "If the value isn't sent on the wire, the service will assume this" }, "serialization": { "$ref": "./master.json#/definitions/SerializationFormats", "description": "per-serialization information for this Schema" }, "apiVersions": { "description": "API versions that this applies to. Undefined means all versions", "type": "array", "items": { "$ref": "./master.json#/definitions/ApiVersion" } }, "deprecated": { "$ref": "./master.json#/definitions/Deprecation", "description": "Represent the deprecation information if api is deprecated.", "default": "undefined" }, "origin": { "description": "where did this aspect come from (jsonpath or 'modelerfour:<soemthing>')", "type": "string" }, "externalDocs": { "$ref": "./master.json#/definitions/ExternalDocumentation", "description": "External Documentation Links" }, "protocol": { "$ref": "./master.json#/definitions/Protocols", "description": "per-protocol information for this aspect" }, "extensions": { "$ref": "./master.json#/definitions/Record<string,any>", "description": "additional metadata extensions dictionary" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ] }, "ValueSchema": { "description": "schema types that are non-object or complex types", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "PrimitiveSchema": { "description": "Schema types that are primitive language values", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ValueSchema" } ] }, "ComplexSchema": { "description": "schema types that can be objects", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "AnySchema": { "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "AnyObjectSchema": { "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "ArraySchema": { "description": "a Schema that represents and array of values", "type": "object", "properties": { "elementType": { "$ref": "./schemas.json#/definitions/Schema", "description": "elementType of the array" }, "maxItems": { "description": "maximum number of elements in the array", "type": "number" }, "minItems": { "description": "minimum number of elements in the array", "type": "number" }, "uniqueItems": { "description": "if the elements in the array should be unique", "type": "boolean" }, "nullableItems": { "description": "if elements in the array should be nullable", "type": "boolean" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "elementType", "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ValueSchema" } ] }, "ByteArraySchema": { "description": "a schema that represents a ByteArray value", "type": "object", "properties": { "format": { "description": "date-time format", "enum": [ "base64url", "byte" ], "type": "string" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "format", "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ValueSchema" } ] }, "BinarySchema": { "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "StringSchema": { "description": "a Schema that represents a string value", "type": "object", "properties": { "maxLength": { "description": "the maximum length of the string", "type": "number" }, "minLength": { "description": "the minimum length of the string", "type": "number" }, "pattern": { "description": "a regular expression that the string must be validated against", "type": "string" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "ODataQuerySchema": { "description": "a schema that represents a ODataQuery value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "CredentialSchema": { "description": "a schema that represents a Credential value", "type": "object", "properties": { "maxLength": { "description": "the maximum length of the string", "type": "number" }, "minLength": { "description": "the minimum length of the string", "type": "number" }, "pattern": { "description": "a regular expression that the string must be validated against", "type": "string" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "UriSchema": { "description": "a schema that represents a Uri value", "type": "object", "properties": { "maxLength": { "description": "the maximum length of the string", "type": "number" }, "minLength": { "description": "the minimum length of the string", "type": "number" }, "pattern": { "description": "a regular expression that the string must be validated against", "type": "string" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "UuidSchema": { "description": "a schema that represents a Uuid value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "ArmIdSchema": { "description": "a schema that represents a Uuid value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "ConditionalSchema": { "description": "a schema that represents a value dependent on another", "type": "object", "properties": { "conditionalType": { "$ref": "./schemas.json#/definitions/PrimitiveSchema", "description": "the primitive type for the conditional" }, "conditions": { "description": "the possible conditinal values", "type": "array", "items": { "$ref": "./master.json#/definitions/ConditionalValue" } }, "sourceValue": { "$ref": "./master.json#/definitions/Value", "description": "the source value that drives the target value (property or parameter)" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "conditionalType", "conditions", "language", "protocol", "sourceValue", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ValueSchema" } ] }, "SealedConditionalSchema": { "description": "a schema that represents a value dependent on another (not overridable)", "type": "object", "properties": { "conditionalType": { "$ref": "./schemas.json#/definitions/PrimitiveSchema", "description": "the primitive type for the condition" }, "conditions": { "description": "the possible conditional values", "type": "array", "items": { "$ref": "./master.json#/definitions/ConditionalValue" } }, "sourceValue": { "$ref": "./master.json#/definitions/Value", "description": "the source value that drives the target value" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "conditionalType", "conditions", "language", "protocol", "sourceValue", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ValueSchema" } ] }, "ConstantSchema": { "description": "a schema that represents a constant value", "type": "object", "properties": { "valueType": { "$ref": "./schemas.json#/definitions/Schema", "description": "the schema type of the constant value (ie, StringSchema, NumberSchema, etc)" }, "value": { "$ref": "./schemas.json#/definitions/ConstantValue", "description": "the actual constant value" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type", "value", "valueType" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "DictionarySchema": { "description": "a schema that represents a key-value collection", "type": "object", "properties": { "elementType": { "$ref": "./schemas.json#/definitions/Schema", "description": "the element type of the dictionary. (Keys are always strings)" }, "nullableItems": { "description": "if elements in the dictionary should be nullable", "type": "boolean" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "elementType", "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ComplexSchema" } ] }, "FlagSchema": { "type": "object", "properties": { "choices": { "description": "the possible choices for in the set", "type": "array", "items": { "$ref": "./master.json#/definitions/FlagValue" } } }, "defaultProperties": [], "additionalProperties": false, "required": [ "choices", "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ValueSchema" } ] }, "NumberSchema": { "description": "a Schema that represents a Number value", "type": "object", "properties": { "precision": { "description": "precision (# of bits?) of the number", "type": "number" }, "multipleOf": { "description": "if present, the number must be an exact multiple of this value", "type": "number" }, "maximum": { "description": "if present, the value must be lower than or equal to this (unless exclusiveMaximum is true)", "type": "number" }, "exclusiveMaximum": { "description": "if present, the value must be lower than maximum", "type": "boolean" }, "minimum": { "description": "if present, the value must be highter than or equal to this (unless exclusiveMinimum is true)", "type": "number" }, "exclusiveMinimum": { "description": "if present, the value must be higher than minimum", "type": "boolean" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "precision", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "GroupSchema": { "type": "object", "properties": { "properties": { "type": "array", "items": { "$ref": "./master.json#/definitions/GroupProperty" } } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" }, { "$ref": "./schemas.json#/definitions/SchemaUsage" } ] }, "ObjectSchema": { "description": "a schema that represents a type with child properties.", "type": "object", "properties": { "discriminator": { "$ref": "./master.json#/definitions/Discriminator", "description": "the property of the polymorphic descriminator for this type, if there is one" }, "properties": { "description": "the collection of properties that are in this object", "type": "array", "items": { "$ref": "./master.json#/definitions/Property" } }, "maxProperties": { "description": "maximum number of properties permitted", "type": "number" }, "minProperties": { "description": "minimum number of properties permitted", "type": "number" }, "parents": { "$ref": "./master.json#/definitions/Relations" }, "children": { "$ref": "./master.json#/definitions/Relations" }, "discriminatorValue": { "type": "string" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ComplexSchema" }, { "$ref": "./schemas.json#/definitions/SchemaUsage" } ] }, "BooleanSchema": { "description": "a schema that represents a boolean value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "CharSchema": { "description": "a schema that represents a Char value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "OrSchema": { "description": "an OR relationship between several schemas", "type": "object", "properties": { "anyOf": { "description": "the set of schemas that this schema is composed of. Every schema is optional", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ComplexSchema" } } }, "defaultProperties": [], "additionalProperties": false, "required": [ "anyOf", "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/ComplexSchema" } ] }, "XorSchema": { "description": "an XOR relationship between several schemas", "type": "object", "properties": { "oneOf": { "description": "the set of schemas that this must be one and only one of.", "type": "array", "items": { "$ref": "./schemas.json#/definitions/Schema" } } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "oneOf", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "NotSchema": { "description": "a NOT relationship between schemas", "type": "object", "properties": { "not": { "$ref": "./schemas.json#/definitions/Schema", "description": "the schema that this may not be." } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "not", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/Schema" } ] }, "DurationSchema": { "description": "a schema that represents a Duration value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "DateTimeSchema": { "description": "a schema that represents a DateTime value", "type": "object", "properties": { "format": { "description": "date-time format", "enum": [ "date-time", "date-time-rfc1123" ], "type": "string" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "format", "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "DateSchema": { "description": "a schema that represents a Date value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "TimeSchema": { "description": "a schema that represents a Date value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "UnixTimeSchema": { "description": "a schema that represents a UnixTime value", "type": "object", "properties": {}, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ], "allOf": [ { "$ref": "./schemas.json#/definitions/PrimitiveSchema" } ] }, "Schemas": { "description": "the full set of schemas for a given service, categorized into convenient collections", "type": "object", "properties": { "arrays": { "description": "a collection of items", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ArraySchema" } }, "dictionaries": { "description": "an associative array (ie, dictionary, hashtable, etc)", "type": "array", "items": { "$ref": "./schemas.json#/definitions/DictionarySchema" } }, "booleans": { "description": "a true or false value", "type": "array", "items": { "$ref": "./schemas.json#/definitions/BooleanSchema" } }, "numbers": { "description": "a number value", "type": "array", "items": { "$ref": "./schemas.json#/definitions/NumberSchema" } }, "objects": { "description": "an object of some type", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ObjectSchema" } }, "strings": { "description": "a string of characters", "type": "array", "items": { "$ref": "./schemas.json#/definitions/StringSchema" } }, "unixtimes": { "description": "UnixTime", "type": "array", "items": { "$ref": "./schemas.json#/definitions/UnixTimeSchema" } }, "byteArrays": { "description": "ByteArray -- an array of bytes", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ByteArraySchema" } }, "streams": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/Schema" } }, "chars": { "description": "a single character", "type": "array", "items": { "$ref": "./schemas.json#/definitions/CharSchema" } }, "dates": { "description": "a Date", "type": "array", "items": { "$ref": "./schemas.json#/definitions/DateSchema" } }, "times": { "description": "a time", "type": "array", "items": { "$ref": "./schemas.json#/definitions/TimeSchema" } }, "dateTimes": { "description": "a DateTime", "type": "array", "items": { "$ref": "./schemas.json#/definitions/DateTimeSchema" } }, "durations": { "description": "a Duration", "type": "array", "items": { "$ref": "./schemas.json#/definitions/DurationSchema" } }, "uuids": { "description": "a universally unique identifier", "type": "array", "items": { "$ref": "./schemas.json#/definitions/UuidSchema" } }, "uris": { "description": "an URI of some kind", "type": "array", "items": { "$ref": "./schemas.json#/definitions/UriSchema" } }, "armIds": { "description": "an URI of some kind", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ArmIdSchema" } }, "credentials": { "description": "a password or credential", "type": "array", "items": { "$ref": "./schemas.json#/definitions/CredentialSchema" } }, "odataQueries": { "description": "OData Query", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ODataQuerySchema" } }, "choices": { "description": "- this is essentially can be thought of as an 'enum'\nthat is a choice between one of several items, but an unspecified value is permitted.", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ChoiceSchema" } }, "sealedChoices": { "description": "- this is essentially can be thought of as an 'enum'\nthat is a choice between one of several items, but an unknown value is not allowed.", "type": "array", "items": { "$ref": "./schemas.json#/definitions/SealedChoiceSchema" } }, "conditionals": { "description": "ie, when 'profile' is 'production', use '2018-01-01' for apiversion", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ConditionalSchema" } }, "sealedConditionals": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/SealedConditionalSchema" } }, "flags": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/FlagSchema" } }, "constants": { "description": "a constant value", "type": "array", "items": { "$ref": "./schemas.json#/definitions/ConstantSchema" } }, "ors": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/OrSchema" } }, "xors": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/XorSchema" } }, "binaries": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/BinarySchema" } }, "unknowns": { "description": "it's possible that we just may make this an error\nin representation.", "type": "array", "items": { "$ref": "./schemas.json#/definitions/Schema" } }, "groups": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/GroupSchema" } }, "any": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/AnySchema" } }, "anyObjects": { "type": "array", "items": { "$ref": "./schemas.json#/definitions/AnyObjectSchema" } } }, "defaultProperties": [], "additionalProperties": false }, "ChoiceValue": { "description": "an individual choice in a ChoiceSchema", "type": "object", "properties": { "language": { "$ref": "./master.json#/definitions/Languages", "description": "per-language information for this value" }, "value": { "description": "the actual value", "type": [ "string", "number", "boolean" ] }, "extensions": { "$ref": "./master.json#/definitions/Record<string,any>", "description": "additional metadata extensions dictionary" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "value" ] }, "ConstantType": { "type": "object", "properties": { "language": { "$ref": "./master.json#/definitions/Languages", "description": "per-language information for Schema" }, "type": { "$ref": "./types.json#/definitions/AllSchemaTypes", "description": "the schema type" }, "summary": { "description": "a short description", "type": "string" }, "example": { "description": "example information" }, "defaultValue": { "description": "If the value isn't sent on the wire, the service will assume this" }, "serialization": { "$ref": "./master.json#/definitions/SerializationFormats", "description": "per-serialization information for this Schema" }, "apiVersions": { "description": "API versions that this applies to. Undefined means all versions", "type": "array", "items": { "$ref": "./master.json#/definitions/ApiVersion" } }, "deprecated": { "$ref": "./master.json#/definitions/Deprecation", "description": "Represent the deprecation information if api is deprecated.", "default": "undefined" }, "origin": { "description": "where did this aspect come from (jsonpath or 'modelerfour:<soemthing>')", "type": "string" }, "externalDocs": { "$ref": "./master.json#/definitions/ExternalDocumentation", "description": "External Documentation Links" }, "protocol": { "$ref": "./master.json#/definitions/Protocols", "description": "per-protocol information for this aspect" }, "extensions": { "$ref": "./master.json#/definitions/Record<string,any>", "description": "additional metadata extensions dictionary" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "language", "protocol", "type" ] }, "ConstantValue": { "description": "a container for the actual constant value", "type": "object", "properties": { "language": { "$ref": "./master.json#/definitions/Languages", "description": "per-language information for this value" }, "value": { "description": "the actual constant value to use" }, "extensions": { "$ref": "./master.json#/definitions/Record<string,any>", "description": "additional metadata extensions dictionary" } }, "defaultProperties": [], "additionalProperties": false, "required": [ "value" ] } } }