oas
Types
pub type Components {
Components(schemas: Dict(String, Schema))
}
Constructors
-
Components(schemas: Dict(String, Schema))
This is the root object of the OpenAPI document.
pub type Document {
Document(
version: String,
info: Info,
paths: Dict(String, PathItem),
components: Components,
)
}
Constructors
-
Document( version: String, info: Info, paths: Dict(String, PathItem), components: Components, )
pub type Header {
Header(
description: Option(String),
required: Bool,
schema: Schema,
)
}
Constructors
-
Header( description: Option(String), required: Bool, 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(version: String)
}
Constructors
-
Info(version: String)
pub type MediaType {
MediaType(schema: Schema)
}
Constructors
-
MediaType(schema: Schema)
pub type Operation {
Operation(
tags: List(String),
summary: Option(String),
description: Option(String),
operation_id: String,
parameters: List(Parameter),
request_body: Option(RequestBody),
responses: Dict(Status, Response),
)
}
Constructors
-
Operation( tags: List(String), summary: Option(String), description: Option(String), operation_id: String, parameters: List(Parameter), request_body: Option(RequestBody), responses: Dict(Status, Response), )
pub type Parameter {
QueryParameter(
name: String,
description: Option(String),
required: Bool,
schema: Schema,
)
PathParameter(name: String, schema: Schema)
HeaderParameter(
name: String,
description: Option(String),
required: Bool,
schema: Schema,
)
CookieParameter(
name: String,
description: Option(String),
required: Bool,
schema: Schema,
)
}
Constructors
-
QueryParameter( name: String, description: Option(String), required: Bool, schema: Schema, )
-
PathParameter(name: String, schema: Schema)
-
HeaderParameter( name: String, description: Option(String), required: Bool, schema: Schema, )
-
CookieParameter( name: String, description: Option(String), required: Bool, schema: Schema, )
Describes the operations available on a single path.
pub type PathItem {
PathItem(
summary: Option(String),
description: Option(String),
parameters: List(Parameter),
operations: List(#(http.Method, Operation)),
)
}
Constructors
-
PathItem( summary: Option(String), description: Option(String), parameters: List(Parameter), operations: List(#(http.Method, Operation)), )
pub type RequestBody {
RequestBody(
description: Option(String),
content: Dict(String, MediaType),
required: Bool,
)
}
Constructors
-
RequestBody( description: Option(String), content: Dict(String, MediaType), required: Bool, )
pub type Response {
Response(
description: String,
headers: Dict(String, Header),
content: Option(Dict(String, MediaType)),
)
}
Constructors
-
Response( description: String, headers: Dict(String, Header), content: Option(Dict(String, MediaType)), )
pub type Schema {
Boolean
Integer
Number
String
Array(Schema)
Object(properties: Dict(String, Schema))
}
Constructors
-
Boolean
-
Integer
-
Number
-
String
-
Array(Schema)
-
Object(properties: Dict(String, Schema))