View Source OpenAPI.Spec.Schema (OpenAPI Generator v0.1.1)

Raw JSON schema specification from the OpenAPI spec

Link to this section Summary

Types

t()

JSON Schema specification

Link to this section Types

@type t() :: %OpenAPI.Spec.Schema{
  "$oag_base_file": String.t(),
  "$oag_base_file_path": [OpenAPI.Spec.path_segment()],
  "$oag_last_ref_file": String.t() | nil,
  "$oag_last_ref_path": [OpenAPI.Spec.path_segment()],
  "$oag_schema_context": [tuple()],
  additional_properties: boolean() | t() | OpenAPI.Spec.ref(),
  all_of: [t() | OpenAPI.Spec.ref()] | nil,
  any_of: [t() | OpenAPI.Spec.ref()] | nil,
  const: any(),
  default: any(),
  deprecated: boolean(),
  description: String.t() | nil,
  discriminator: OpenAPI.Spec.Schema.Discriminator.t(),
  enum: [any()] | nil,
  example: any(),
  exclusive_maximum: boolean(),
  exclusive_minimum: boolean(),
  external_docs: OpenAPI.Spec.ExternalDocumentation.t() | nil,
  format: String.t() | nil,
  items: t() | OpenAPI.Spec.ref() | nil,
  max_items: non_neg_integer() | nil,
  max_length: non_neg_integer() | nil,
  max_properties: non_neg_integer() | nil,
  maximum: integer() | nil,
  min_items: non_neg_integer() | nil,
  min_length: non_neg_integer() | nil,
  min_properties: non_neg_integer() | nil,
  minimum: integer() | nil,
  multiple_of: pos_integer() | nil,
  not: t() | OpenAPI.Spec.ref() | nil,
  nullable: boolean(),
  one_of: [t() | OpenAPI.Spec.ref()] | nil,
  pattern: String.t() | nil,
  properties: %{optional(String.t()) => t() | OpenAPI.Spec.ref()},
  read_only: boolean(),
  required: [String.t()] | nil,
  title: String.t() | nil,
  type: String.t() | nil,
  unique_items: boolean(),
  write_only: boolean(),
  xml: OpenAPI.Spec.Schema.XML.t()
}

JSON Schema specification

In addition to the data derived from the JSON or Yaml specification, this struct also contains some contextual information including its absolute and referenced location in the spec. All such fields are prefixed with $oag_.