View Source OpenApiSpex.Components (open_api_spex v3.21.2)

Defines the OpenApiSpex.Components.t type.

Summary

Types

@type responses_map() :: %{
  required(String.t()) => OpenApiSpex.Response.t() | OpenApiSpex.Reference.t()
}
@type schemas_map() :: %{
  required(String.t()) => OpenApiSpex.Schema.t() | OpenApiSpex.Reference.t()
}
@type t() :: %OpenApiSpex.Components{
  callbacks:
    %{
      required(String.t()) =>
        OpenApiSpex.Callback.t() | OpenApiSpex.Reference.t()
    }
    | nil,
  examples:
    %{
      required(String.t()) =>
        OpenApiSpex.Example.t() | OpenApiSpex.Reference.t()
    }
    | nil,
  extensions: %{required(String.t()) => any()} | nil,
  headers:
    %{
      required(String.t()) => OpenApiSpex.Header.t() | OpenApiSpex.Reference.t()
    }
    | nil,
  links:
    %{required(String.t()) => OpenApiSpex.Link.t() | OpenApiSpex.Reference.t()}
    | nil,
  parameters:
    %{
      required(String.t()) =>
        OpenApiSpex.Parameter.t() | OpenApiSpex.Reference.t()
    }
    | nil,
  requestBodies:
    %{
      required(String.t()) =>
        OpenApiSpex.RequestBody.t() | OpenApiSpex.Reference.t()
    }
    | nil,
  responses: responses_map() | nil,
  schemas: schemas_map() | nil,
  securitySchemes:
    %{
      required(String.t()) =>
        OpenApiSpex.SecurityScheme.t() | OpenApiSpex.Reference.t()
    }
    | nil
}

Components Object

Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.