oas
Types
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.
pub type Components {
  Components(
    schemas: dict.Dict(String, json_schema.Schema),
    responses: dict.Dict(String, json_schema.Ref(Response)),
    parameters: dict.Dict(String, json_schema.Ref(Parameter)),
    request_bodies: dict.Dict(
      String,
      json_schema.Ref(RequestBody),
    ),
  )
}Constructors
- 
          Components( schemas: dict.Dict(String, json_schema.Schema), responses: dict.Dict(String, json_schema.Ref(Response)), parameters: dict.Dict(String, json_schema.Ref(Parameter)), request_bodies: dict.Dict(String, json_schema.Ref(RequestBody)), )
Contact information for the exposed API.
pub type Contact {
  Contact(
    name: option.Option(String),
    url: option.Option(String),
    email: option.Option(String),
  )
}Constructors
- 
          Contact( name: option.Option(String), url: option.Option(String), email: option.Option(String), )
This is the root object of the OpenAPI document.
pub type Document {
  Document(
    openapi: String,
    info: Info,
    json_schema_dialect: option.Option(String),
    servers: List(Server),
    paths: dict.Dict(String, PathItem),
    components: Components,
  )
}Constructors
- 
          Document( openapi: String, info: Info, json_schema_dialect: option.Option(String), servers: List(Server), paths: dict.Dict(String, PathItem), components: Components, )
pub type Header {
  Header(
    description: option.Option(String),
    required: Bool,
    schema: json_schema.Schema,
  )
}Constructors
- 
          Header( description: option.Option(String), required: Bool, schema: json_schema.Schema, )
The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
pub type Info {
  Info(
    title: String,
    summary: option.Option(String),
    description: option.Option(String),
    terms_of_service: option.Option(String),
    contact: option.Option(Contact),
    license: option.Option(Licence),
    version: String,
  )
}Constructors
- 
          Info( title: String, summary: option.Option(String), description: option.Option(String), terms_of_service: option.Option(String), contact: option.Option(Contact), license: option.Option(Licence), version: String, )
License information for the exposed API.
pub type Licence {
  Licence(
    name: String,
    identifier: option.Option(String),
    url: option.Option(String),
  )
}Constructors
- 
          Licence( name: String, identifier: option.Option(String), url: option.Option(String), )
Each Media Type Object provides schema and examples for the media type identified by its key.
pub type MediaType {
  MediaType(
    schema: option.Option(json_schema.Ref(json_schema.Schema)),
  )
}Constructors
- 
          MediaType( schema: option.Option(json_schema.Ref(json_schema.Schema)), )
Describes a single API operation on a path.
pub type Operation {
  Operation(
    tags: List(String),
    summary: option.Option(String),
    description: option.Option(String),
    operation_id: String,
    parameters: List(json_schema.Ref(Parameter)),
    request_body: option.Option(json_schema.Ref(RequestBody)),
    responses: dict.Dict(Status, json_schema.Ref(Response)),
  )
}Constructors
- 
          Operation( tags: List(String), summary: option.Option(String), description: option.Option(String), operation_id: String, parameters: List(json_schema.Ref(Parameter)), request_body: option.Option(json_schema.Ref(RequestBody)), responses: dict.Dict(Status, json_schema.Ref(Response)), )
Describes a single operation parameter.
There are four possible parameter locations specified by the in field:
path, query, header and cookie.
A unique parameter is defined by a combination of a name and location.
pub type Parameter {
  QueryParameter(
    name: String,
    description: option.Option(String),
    required: Bool,
    schema: json_schema.Ref(json_schema.Schema),
  )
  PathParameter(
    name: String,
    schema: json_schema.Ref(json_schema.Schema),
  )
  HeaderParameter(
    name: String,
    description: option.Option(String),
    required: Bool,
    schema: json_schema.Ref(json_schema.Schema),
  )
  CookieParameter(
    name: String,
    description: option.Option(String),
    required: Bool,
    schema: json_schema.Ref(json_schema.Schema),
  )
}Constructors
- 
          QueryParameter( name: String, description: option.Option(String), required: Bool, schema: json_schema.Ref(json_schema.Schema), )
- 
          PathParameter( name: String, schema: json_schema.Ref(json_schema.Schema), )
- 
          HeaderParameter( name: String, description: option.Option(String), required: Bool, schema: json_schema.Ref(json_schema.Schema), )
- 
          CookieParameter( name: String, description: option.Option(String), required: Bool, schema: json_schema.Ref(json_schema.Schema), )
Describes the operations available on a single path.
pub type PathItem {
  PathItem(
    summary: option.Option(String),
    description: option.Option(String),
    parameters: List(json_schema.Ref(Parameter)),
    operations: List(#(http.Method, Operation)),
  )
}Constructors
- 
          PathItem( summary: option.Option(String), description: option.Option(String), parameters: List(json_schema.Ref(Parameter)), operations: List(#(http.Method, Operation)), )
Describes a single request body.
pub type RequestBody {
  RequestBody(
    description: option.Option(String),
    content: dict.Dict(String, MediaType),
    required: Bool,
  )
}Constructors
- 
          RequestBody( description: option.Option(String), content: dict.Dict(String, MediaType), required: Bool, )
Describes a single response from an API Operation
pub type Response {
  Response(
    description: option.Option(String),
    headers: dict.Dict(String, json_schema.Ref(Header)),
    content: dict.Dict(String, MediaType),
  )
}Constructors
- 
          Response( description: option.Option(String), headers: dict.Dict(String, json_schema.Ref(Header)), content: dict.Dict(String, MediaType), )
pub type Segment {
  FixedSegment(content: String)
  MatchSegment(name: String, schema: json_schema.Schema)
}Constructors
- 
          FixedSegment(content: String)
- 
          MatchSegment(name: String, schema: json_schema.Schema)
An object representing a Server.
pub type Server {
  Server(
    url: String,
    description: option.Option(String),
    variables: dict.Dict(String, ServerVariable),
  )
}Constructors
- 
          Server( url: String, description: option.Option(String), variables: dict.Dict(String, ServerVariable), )
An object representing a Server Variable for server URL template substitution.
pub type ServerVariable {
  ServerVariable(
    enum: option.Option(non_empty_list.NonEmptyList(String)),
    default: String,
    description: option.Option(String),
  )
}Constructors
- 
          ServerVariable( enum: option.Option(non_empty_list.NonEmptyList(String)), default: String, description: option.Option(String), )
Values
pub fn decoder() -> decode.Decoder(Document)pub fn fetch_parameter(
  ref: json_schema.Ref(a),
  parameters: dict.Dict(String, json_schema.Ref(a)),
) -> apub fn fetch_request_body(
  ref: json_schema.Ref(a),
  request_bodies: dict.Dict(String, json_schema.Ref(a)),
) -> apub fn fetch_response(
  ref: json_schema.Ref(a),
  responses: dict.Dict(String, json_schema.Ref(a)),
) -> apub fn fetch_schema(
  ref: json_schema.Ref(a),
  schemas: dict.Dict(String, a),
) -> apub fn gather_match(
  pattern: String,
  parameters: List(Parameter),
  components: Components,
) -> Result(List(Segment), String)pub fn query_parameters(
  parameters: List(Parameter),
) -> List(#(String, Bool, json_schema.Ref(json_schema.Schema)))