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