type: object
description: the model that contains all the information required to generate a service api
$schema: http://json-schema.org/draft-07/schema#
additionalProperties: false
definitions:
  AADTokenSecurityScheme:
    type: object
    additionalProperties: false
    allOf:
      - $ref: ./http.yaml#/definitions/SecurityScheme
    properties:
      scopes:
        type: array
        items:
          type: string
    required:
      - scopes
      - type
  ApiVersion:
    type: object
    description: |-
      - since API version formats range from
      Azure ARM API date style (2018-01-01) to semver (1.2.3)
      and virtually any other text, this value tends to be an
      opaque string with the possibility of a modifier to indicate
      that it is a range.

      options:
      - prepend a dash or append a plus to indicate a range
      (ie, '2018-01-01+' or '-2019-01-01', or '1.0+' )

      - semver-range style (ie, '^1.0.0' or '~1.0.0' )
    additionalProperties: false
    properties:
      range:
        type: string
        enum:
          - +
          - '-'
      version:
        type: string
        description: the actual api version string used in the API
    required:
      - version
  ApiVersions:
    type: array
    description: a collection of api versions
    items:
      $ref: ./master.yaml#/definitions/ApiVersion
  AzureKeySecurityScheme:
    type: object
    additionalProperties: false
    allOf:
      - $ref: ./http.yaml#/definitions/SecurityScheme
    properties:
      headerName:
        type: string
    required:
      - headerName
      - type
  BinaryResponse:
    type: object
    description: a response where the content should be treated as a binary instead of a value or object
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Response
    properties:
      binary:
        type: boolean
        description: indicates that this response is a binary stream
        const: true
    required:
      - binary
      - language
      - protocol
  CSharpLanguage:
    type: object
    additionalProperties: false
  ConditionalValue:
    type: object
    description: an individual value in a ConditionalSchema
    additionalProperties: false
    properties:
      source:
        type:
          - string
          - number
          - boolean
        description: the actual value
      target:
        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
      - source
      - target
  Contact:
    type: object
    description: contact information
    additionalProperties: false
    properties:
      name:
        type: string
      email:
        type: string
      url:
        type: string
        description: an URI
      extensions:
        description: additional metadata extensions dictionary
        $ref: ./master.yaml#/definitions/Record<string,any>
  Default:
    type: string
    description: A catch-all for all un-handled response codes.
    const: default
  Deprecation:
    type: object
    description: Represent information about a deprecation
    additionalProperties: false
    properties:
      reason:
        type: string
        description: Reason why this was deprecated.
  Discriminator:
    type: object
    additionalProperties: false
    properties:
      all:
        $ref: ./master.yaml#/definitions/Record<string,ComplexSchema>
      immediate:
        $ref: ./master.yaml#/definitions/Record<string,ComplexSchema>
      property:
        $ref: ./master.yaml#/definitions/Property
    required:
      - all
      - immediate
      - property
  Example:
    type: object
    description: example data [UNFINISHED]
    additionalProperties: false
    properties:
      description:
        type: string
      externalValue:
        type: string
        description: an URI
      summary:
        type: string
  Extensions:
    type: object
    description: A dictionary of open-ended 'x-*' extensions propogated from the original source document.
    additionalProperties: false
    properties:
      extensions:
        description: additional metadata extensions dictionary
        $ref: ./master.yaml#/definitions/Record<string,any>
  ExternalDocumentation:
    type: object
    description: a reference to external documentation
    additionalProperties: false
    properties:
      description:
        type: string
      url:
        type: string
        description: an URI
      extensions:
        description: additional metadata extensions dictionary
        $ref: ./master.yaml#/definitions/Record<string,any>
    required:
      - url
  FlagValue:
    type: object
    additionalProperties: false
    properties:
      value:
        type: number
      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
  GroupProperty:
    type: object
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Property
    properties:
      originalParameter:
        type: array
        items:
          $ref: ./master.yaml#/definitions/Parameter
    required:
      - language
      - originalParameter
      - protocol
      - schema
      - serializedName
  Info:
    type: object
    description: code model information
    additionalProperties: false
    properties:
      description:
        type: string
        description: a text description of the service
      contact:
        description: contact information for the service
        $ref: ./master.yaml#/definitions/Contact
      externalDocs:
        description: External Documentation
        $ref: ./master.yaml#/definitions/ExternalDocumentation
      license:
        description: license information for th service
        $ref: ./master.yaml#/definitions/License
      termsOfService:
        type: string
        description: an uri to the terms of service specified to access the service
      title:
        type: string
        description: the title of this service.
      extensions:
        description: additional metadata extensions dictionary
        $ref: ./master.yaml#/definitions/Record<string,any>
    required:
      - title
  KeySecurityScheme:
    type: object
    additionalProperties: false
    allOf:
      - $ref: ./http.yaml#/definitions/SecurityScheme
    properties:
      name:
        type: string
      in:
        type: string
        const: header
    required:
      - in
      - name
      - type
  Language:
    type: object
    description: the bare-minimum fields for per-language metadata on a given aspect
    additionalProperties:
      type: object
    properties:
      name:
        type: string
        description: name used in actual implementation
      description:
        type: string
        description: description text - describes this node.
    required:
      - description
      - name
  Languages:
    type: object
    description: custom extensible metadata for individual language generators
    additionalProperties: false
    properties:
      default:
        $ref: ./master.yaml#/definitions/Language
      c:
        $ref: ./master.yaml#/definitions/Language
      cpp:
        $ref: ./master.yaml#/definitions/Language
      csharp:
        $ref: ./master.yaml#/definitions/Language
      go:
        $ref: ./master.yaml#/definitions/Language
      java:
        $ref: ./master.yaml#/definitions/Language
      javascript:
        $ref: ./master.yaml#/definitions/Language
      objectivec:
        $ref: ./master.yaml#/definitions/Language
      powershell:
        $ref: ./master.yaml#/definitions/Language
      python:
        $ref: ./master.yaml#/definitions/Language
      ruby:
        $ref: ./master.yaml#/definitions/Language
      sputnik:
        $ref: ./master.yaml#/definitions/Language
      swift:
        $ref: ./master.yaml#/definitions/Language
      typescript:
        $ref: ./master.yaml#/definitions/Language
    required:
      - default
  License:
    type: object
    description: license information
    additionalProperties: false
    properties:
      name:
        type: string
        description: the nameof the license
      url:
        type: string
        description: an uri pointing to the full license text
      extensions:
        description: additional metadata extensions dictionary
        $ref: ./master.yaml#/definitions/Record<string,any>
    required:
      - name
  Metadata:
    type: object
    description: common pattern for Metadata on aspects
    additionalProperties: false
    properties:
      extensions:
        description: additional metadata extensions dictionary
        $ref: ./master.yaml#/definitions/Record<string,any>
      language:
        description: per-language information for this aspect
        $ref: ./master.yaml#/definitions/Languages
      protocol:
        description: per-protocol information for this aspect
        $ref: ./master.yaml#/definitions/Protocols
    required:
      - language
      - protocol
  Operation:
    type: object
    description: represents a single callable endpoint with a discrete set of inputs, and any number of output possibilities (responses or exceptions)
    additionalProperties: false
    properties:
      operationId:
        type: string
        description: |-
          Original Operation ID if present.
          This can be used to identify the original id of an operation before it is styled.
          THIS IS NOT the name of the operation that should be used in the generator. Use `.language.default.name` for this
      apiVersions:
        type: array
        description: API versions that this applies to. Undefined means all versions
        items:
          $ref: ./master.yaml#/definitions/ApiVersion
      deprecated:
        description: Represent the deprecation information if api is deprecated.
        default: undefined
        $ref: ./master.yaml#/definitions/Deprecation
      exceptions:
        type: array
        description: responses that indicate a failed call
        items:
          $ref: ./master.yaml#/definitions/Response
      externalDocs:
        description: External Documentation Links
        $ref: ./master.yaml#/definitions/ExternalDocumentation
      origin:
        type: string
        description: where did this aspect come from (jsonpath or 'modelerfour:<soemthing>')
      parameters:
        type: array
        description: common parameters when there are multiple requests
        items:
          $ref: ./master.yaml#/definitions/Parameter
      profile:
        description: the apiVersion to use for a given profile name
        $ref: ./master.yaml#/definitions/Record<string,ApiVersion>
      requestMediaTypes:
        description: Mapping of all the content types available for this operation to the coresponding request.
        $ref: ./master.yaml#/definitions/Record<string,Request>
      requests:
        type: array
        description: the different possibilities to build the request.
        items:
          $ref: ./master.yaml#/definitions/Request
      responses:
        type: array
        description: responses that indicate a successful call
        items:
          $ref: ./master.yaml#/definitions/Response
      signatureParameters:
        type: array
        description: a common filtered list of parameters that is (assumably) the actual method signature parameters
        items:
          $ref: ./master.yaml#/definitions/Parameter
      specialHeaders:
        type: array
        description: |-
          List of headers that parameters should not handle as parameters but with special logic.
          See https://github.com/Azure/autorest/tree/main/packages/extensions/modelerfour for configuration `skip-special-headers` to exclude headers.
        items:
          type: string
      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 this aspect
        $ref: ./master.yaml#/definitions/Languages
      protocol:
        description: per-protocol information for this aspect
        $ref: ./master.yaml#/definitions/Protocols
    required:
      - language
      - protocol
  OperationGroup:
    type: object
    description: an operation group represents a container around set of operations
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Metadata
    properties:
      $key:
        type: string
      operations:
        type: array
        items:
          $ref: ./master.yaml#/definitions/Operation
    required:
      - $key
      - language
      - operations
      - protocol
  Parameter:
    type: object
    description: a definition of an discrete input for an operation
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Value
    properties:
      flattened:
        type: boolean
        description: When a parameter is flattened, it will be left in the list, but marked hidden (so, don't generate those!)
      groupedBy:
        description: When a parameter is grouped into another, this will tell where the parameter got grouped into.
        $ref: ./master.yaml#/definitions/Parameter
      implementation:
        description: suggested implementation location for this parameter
        $ref: ./enums.yaml#/definitions/ImplementationLocation
      isPartialBody:
        type: boolean
        description: If this parameter is only part of the body request(for multipart and form bodies.)
    required:
      - language
      - protocol
      - schema
  Property:
    type: object
    description: a property is a child value in an object
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Value
    properties:
      flattenedNames:
        type: array
        description: |-
          when a property is flattened, the property will be the set of serialized names to get to that target property.

          If flattenedName is present, then this property is a flattened property.

          (ie, ['properties','name'] )
        items:
          type: string
      isDiscriminator:
        type: boolean
        description: if this property is used as a discriminator for a polymorphic type
      readOnly:
        type: boolean
        description: if the property is marked read-only (ie, not intended to be sent to the service)
      serializedName:
        type: string
        description: the wire name of this property
    required:
      - language
      - protocol
      - schema
      - serializedName
  Protocol:
    type: object
    description: the bare-minimum fields for per-protocol metadata on a given aspect
    additionalProperties: false
  Protocols:
    type: object
    description: custom extensible metadata for individual protocols (ie, HTTP, etc)
    additionalProperties: false
    properties:
      amqp:
        $ref: ./master.yaml#/definitions/Protocol
      jsonrpc:
        $ref: ./master.yaml#/definitions/Protocol
      mqtt:
        $ref: ./master.yaml#/definitions/Protocol
      http:
        $ref: ./master.yaml#/definitions/Protocol
  Record<string,ApiVersion>:
    type: object
    additionalProperties: false
  Record<string,ComplexSchema>:
    type: object
    additionalProperties:
      $ref: ./schemas.yaml#/definitions/ComplexSchema
  Record<string,Request>:
    type: object
    additionalProperties: false
  Record<string,any>:
    type: object
    additionalProperties:
      type: object
  Record<string,string>:
    type: object
    additionalProperties:
      type: string
  Relations:
    type: object
    additionalProperties: false
    properties:
      all:
        type: array
        items:
          $ref: ./schemas.yaml#/definitions/ComplexSchema
      immediate:
        type: array
        items:
          $ref: ./schemas.yaml#/definitions/ComplexSchema
    required:
      - all
      - immediate
  Request:
    type: object
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Metadata
    properties:
      parameters:
        type: array
        description: the parameter inputs to the operation
        items:
          $ref: ./master.yaml#/definitions/Parameter
      signatureParameters:
        type: array
        description: a filtered list of parameters that is (assumably) the actual method signature parameters
        items:
          $ref: ./master.yaml#/definitions/Parameter
    required:
      - language
      - protocol
  Response:
    type: object
    description: a response from a service.
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Metadata
    required:
      - language
      - protocol
  SchemaResponse:
    type: object
    description: a response that should be deserialized into a result of type(schema)
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Response
    properties:
      schema:
        description: the content returned by the service for a given operaiton
        $ref: ./schemas.yaml#/definitions/Schema
      nullable:
        type: boolean
        description: indicates whether the response can be 'null'
    required:
      - language
      - protocol
      - schema
  SchemaUsage:
    type: object
    additionalProperties: false
    properties:
      serializationFormats:
        type: array
        description: Known media types in which this schema can be serialized
        items:
          $ref: ./enums.yaml#/definitions/KnownMediaType
      usage:
        type: array
        description: contexts in which the schema is used
        items:
          $ref: ./schemas.yaml#/definitions/SchemaContext
  Scheme:
    type: string
    const: bearer
  Security:
    type: object
    description: The security information for the API surface
    additionalProperties: false
    properties:
      authenticationRequired:
        type: boolean
        description: indicates that the API surface requires authentication
      schemes:
        type: array
        items:
          type: SecuritySchemeFull
    required:
      - authenticationRequired
      - schemes
  SerializationFormat:
    type: object
    additionalProperties: false
    properties:
      extensions:
        description: additional metadata extensions dictionary
        $ref: ./master.yaml#/definitions/Record<string,any>
  SerializationFormats:
    type: object
    description: custom extensible metadata for individual serialization formats
    additionalProperties: false
    properties:
      binary:
        $ref: ./master.yaml#/definitions/SerializationFormat
      json:
        $ref: ./master.yaml#/definitions/SerializationFormat
      protobuf:
        $ref: ./master.yaml#/definitions/SerializationFormat
      xml:
        $ref: ./master.yaml#/definitions/XmlSerlializationFormat
  Value:
    type: object
    description: common base interface for properties, parameters and the like.
    additionalProperties: false
    properties:
      schema:
        description: the schema of this Value
        $ref: ./schemas.yaml#/definitions/Schema
      apiVersions:
        type: array
        description: API versions that this applies to. Undefined means all versions
        items:
          $ref: ./master.yaml#/definitions/ApiVersion
      assumedValue:
        description: the value that the remote will assume if this value is not present
      clientDefaultValue:
        description: the value that the client should provide if the consumer doesn't provide one
      deprecated:
        description: Represent the deprecation information if api is deprecated.
        default: undefined
        $ref: ./master.yaml#/definitions/Deprecation
      externalDocs:
        description: External Documentation Links
        $ref: ./master.yaml#/definitions/ExternalDocumentation
      nullable:
        type: boolean
        description: can null be passed in instead
      origin:
        type: string
        description: where did this aspect come from (jsonpath or 'modelerfour:<soemthing>')
      required:
        type: boolean
        description: if the value is marked 'required'.
      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 this aspect
        $ref: ./master.yaml#/definitions/Languages
      protocol:
        description: per-protocol information for this aspect
        $ref: ./master.yaml#/definitions/Protocols
    required:
      - language
      - protocol
      - schema
  ValueOrFactory:
    anyOf:
      - $ref: ./master.yaml#/definitions/ApiVersion
      - type: object
        additionalProperties: false
  VirtualParameter:
    type: object
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/Parameter
    properties:
      originalParameter:
        description: the original body parameter that this parameter is in effect replacing
        $ref: ./master.yaml#/definitions/Parameter
      pathToProperty:
        type: array
        description: if this parameter is for a nested property, this is the path of properties it takes to get there
        items:
          $ref: ./master.yaml#/definitions/Property
      targetProperty:
        description: the target property this virtual parameter represents
        $ref: ./master.yaml#/definitions/Property
    required:
      - language
      - originalParameter
      - pathToProperty
      - protocol
      - schema
      - targetProperty
  XmlSerlializationFormat:
    type: object
    additionalProperties: false
    allOf:
      - $ref: ./master.yaml#/definitions/SerializationFormat
    properties:
      name:
        type: string
      attribute:
        type: boolean
      namespace:
        type: string
      prefix:
        type: string
      text:
        type: boolean
      wrapped:
        type: boolean
    required:
      - attribute
      - text
      - wrapped
  email:
    type: string
  uri:
    type: string
    description: an URI
properties:
  schemas:
    description: All schemas for the model
    $ref: ./schemas.yaml#/definitions/Schemas
  globalParameters:
    type: array
    description: all global parameters (ie, ImplementationLocation = client )
    items:
      $ref: ./master.yaml#/definitions/Parameter
  info:
    description: Code model information
    $ref: ./master.yaml#/definitions/Info
  operationGroups:
    type: array
    description: All operations
    items:
      $ref: ./master.yaml#/definitions/OperationGroup
  security:
    $ref: ./master.yaml#/definitions/Security
  extensions:
    description: additional metadata extensions dictionary
    $ref: ./master.yaml#/definitions/Record<string,any>
  language:
    description: per-language information for this aspect
    $ref: ./master.yaml#/definitions/Languages
  protocol:
    description: per-protocol information for this aspect
    $ref: ./master.yaml#/definitions/Protocols
required:
  - info
  - language
  - operationGroups
  - protocol
  - schemas
  - security
title: CodeModel
