Packages
open_api_spex
3.21.2
3.22.3
3.22.2
3.22.1
3.22.0
3.21.5
3.21.4
3.21.3
3.21.2
3.21.1
3.21.0
3.20.1
3.20.0
3.19.1
3.19.0
3.18.3
3.18.2
3.18.1
3.18.0
3.17.3
3.17.2
3.17.1
3.17.0
3.16.4
3.16.3
3.16.2
3.16.1
3.16.0
3.15.0
3.14.0
3.13.0
3.12.0
3.11.0
3.10.0
3.9.0
3.8.0
3.7.0
3.6.0
3.5.2
3.5.1
3.5.0
3.4.0
3.3.0
3.2.1
3.2.0
3.1.0
3.0.0
2.3.1
2.3.0
2.2.0
2.1.1
2.1.0
2.0.0
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
Leverage Open Api Specification 3 (swagger) to document, test, validate and explore your Plug and Phoenix APIs.
Current section
Files
Jump to
Current section
Files
lib/open_api_spex/components.ex
defmodule OpenApiSpex.Components do
@moduledoc """
Defines the `OpenApiSpex.Components.t` type.
"""
alias OpenApiSpex.{
Callback,
Components,
Example,
Header,
Link,
Parameter,
Reference,
RequestBody,
Response,
Schema,
SecurityScheme
}
defstruct [
:schemas,
:responses,
:parameters,
:examples,
:requestBodies,
:headers,
:securitySchemes,
:links,
:callbacks,
:extensions
]
@type schemas_map :: %{String.t() => Schema.t() | Reference.t()}
@type responses_map :: %{String.t() => Response.t() | Reference.t()}
@typedoc """
[Components Object](https://swagger.io/specification/#componentsObject)
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.
"""
@type t :: %Components{
schemas: schemas_map | nil,
responses: responses_map | nil,
parameters: %{String.t() => Parameter.t() | Reference.t()} | nil,
examples: %{String.t() => Example.t() | Reference.t()} | nil,
requestBodies: %{String.t() => RequestBody.t() | Reference.t()} | nil,
headers: %{String.t() => Header.t() | Reference.t()} | nil,
securitySchemes: %{String.t() => SecurityScheme.t() | Reference.t()} | nil,
links: %{String.t() => Link.t() | Reference.t()} | nil,
callbacks: %{String.t() => Callback.t() | Reference.t()} | nil,
extensions: %{String.t() => any()} | nil
}
end