OpenAPI
WithReference
Section titled “WithReference”reference
Section titled “reference”type reference<'a> = { ref: string, summary?: string, description?: string,}
src/OpenAPI.res:7:3
tagged
Section titled “tagged”type tagged<'a> = Object('a) | Reference(reference<'a>)
src/OpenAPI.res:16:3
reference
Section titled “reference”let reference: reference<'a> => t<'a>
src/OpenAPI.res:21:3
isReference
Section titled “isReference”let isReference: t<'a> => bool
src/OpenAPI.res:23:7
classify
Section titled “classify”let classify: t<'item> => tagged<'item>
src/OpenAPI.res:27:7
src/OpenAPI.res:5:8
contact
Section titled “contact”type contact = {name?: string, url?: string, email?: string}
Contact information for the exposed API.
src/OpenAPI.res:39:1
license
Section titled “license”type license = { name: string, identifier?: string, url?: string,}
License information for the exposed API.
src/OpenAPI.res:51:1
type info = { title: string, summary?: string, description?: string, termsOfService?: string, contact?: contact, license?: license, version: string,}
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.
src/OpenAPI.res:63:1
serverVariable
Section titled “serverVariable”type serverVariable = { default: string, enum?: array<string>, description?: string,}
An object representing a Server Variable for server URL template substitution.
src/OpenAPI.res:83:1
server
Section titled “server”type server = { url: string, description?: string, variables?: dict<serverVariable>,}
An object representing a Server.
src/OpenAPI.res:95:1
externalDocumentation
Section titled “externalDocumentation”type externalDocumentation = { description?: string, url: string,}
src/OpenAPI.res:104:1
parameterLocation
Section titled “parameterLocation”type parameterLocation = | @as("query") Query | @as("header") Header | @as("path") Path | @as("cookie") Cookie
There are four possible parameter locations specified by the in field: path - Used together with Path Templating, where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId. query - Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id. header - Custom headers that are expected as part of the request. Note that RFC7230 states header names are case insensitive. cookie - Used to pass a specific cookie value to the API.
src/OpenAPI.res:119:1
parameterStyle
Section titled “parameterStyle”type parameterStyle = [ | #deepObject | #form | #label | #matrix | #pipeDelimited | #simple | #spaceDelimited]
The style of a parameter.
Describes how the parameter value will be serialized.
(serialization is not implemented yet)
Specification:
https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
src/OpenAPI.res:132:1
example
Section titled “example”type example = { summary?: string, description?: string, value?: unknown, externalValue?: string,}
src/OpenAPI.res:142:1
baseParameter
Section titled “baseParameter”type baseParameter = { description?: string, required?: bool, deprecated?: bool, allowEmptyValue?: bool, style?: parameterStyle, explode?: bool, allowReserved?: bool, schema?: schema, examples?: dict<WithReference.t<example>>, example?: option<Js.Json.t>, content?: dict<WithReference.t<mediaType>>,}
Base fields for parameter object
src/OpenAPI.res:158:1
encoding
Section titled “encoding”type encoding = { contentType?: string, headers?: dict<WithReference.t<header>>, style?: string, explode?: bool, allowReserved?: bool,}
src/OpenAPI.res:194:1
mediaType
Section titled “mediaType”type mediaType = { schema?: schema, example?: unknown, examples?: dict<WithReference.t<example>>, encoding?: dict<encoding>,}
src/OpenAPI.res:210:1
parameter
Section titled “parameter”type parameter = { name: string, in_: parameterLocation, description?: string, required?: bool, deprecated?: bool, allowEmptyValue?: bool, style?: parameterStyle, explode?: bool, allowReserved?: bool, schema?: schema, examples?: dict<WithReference.t<example>>, example?: option<Js.Json.t>, content?: dict<WithReference.t<mediaType>>,}
Describes a single operation parameter. A unique parameter is defined by a combination of a name and location.
src/OpenAPI.res:226:1
requestBody
Section titled “requestBody”type requestBody = { description?: string, content: dict<mediaType>, required?: bool,}
Describes a single request body.
src/OpenAPI.res:241:1
type link = { operationRef?: string, operationId?: string, parameters?: dict<unknown>, requestBody?: unknown, description?: string, server?: server,}
The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
src/OpenAPI.res:257:1
response
Section titled “response”type response = { description: string, headers?: dict<WithReference.t<header>>, content?: dict<mediaType>, links?: dict<WithReference.t<link>>,}
Describes a single response from an API Operation, including design-time, static links to operations based on the response.
src/OpenAPI.res:275:1
securityRequirement
Section titled “securityRequirement”type securityRequirement = dict<array<string>>
src/OpenAPI.res:287:1
pathItem
Section titled “pathItem”type pathItem = { ref?: string, summary?: string, description?: string, get?: operation, put?: operation, post?: operation, delete?: operation, options?: operation, head?: operation, patch?: operation, trace?: operation, servers?: array<server>, parameters?: array<WithReference.t<parameter>>,}
Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
src/OpenAPI.res:292:1
operation
Section titled “operation”type operation = { tags?: array<string>, summary?: string, description?: string, externalDocs?: externalDocumentation, operationId?: string, parameters?: array<WithReference.t<parameter>>, requestBody?: WithReference.t<requestBody>, responses?: dict<WithReference.t<response>>, callbacks?: dict<WithReference.t<callback>>, deprecated?: bool, security?: array<securityRequirement>, servers?: array<server>,}
src/OpenAPI.res:324:1
callback
Section titled “callback”type callback = dict<WithReference.t<pathItem>>
src/OpenAPI.res:350:1
oauthFlow
Section titled “oauthFlow”type oauthFlow = { authorizationUrl: string, tokenUrl: string, refreshUrl?: string, scopes: dict<string>,}
Configuration details for a supported OAuth Flow
src/OpenAPI.res:355:1
oauthFlows
Section titled “oauthFlows”type oauthFlows = { implicit?: oauthFlow, password?: oauthFlow, clientCredentials?: oauthFlow, authorizationCode?: oauthFlow,}
Allows configuration of the supported OAuth Flows.
src/OpenAPI.res:369:1
securityScheme
Section titled “securityScheme”type securityScheme = { type_: string, description?: string, name: string, in_: string, scheme: string, bearerFormat?: string, flows: oauthFlows, openIdConnectUrl: string,}
Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery. Please note that as of 2020, the implicit flow is about to be deprecated by OAuth 2.0 Security Best Current Practice. Recommended for most use case is Authorization Code Grant flow with PKCE.
src/OpenAPI.res:385:1
components
Section titled “components”type components = { schemas?: dict<schema>, responses?: dict<WithReference.t<response>>, parameters?: dict<WithReference.t<parameter>>, examples?: dict<WithReference.t<example>>, requestBodies?: dict<WithReference.t<requestBody>>, headers?: dict<WithReference.t<header>>, securitySchemes?: dict<WithReference.t<securityScheme>>, links?: dict<WithReference.t<link>>, callbacks?: dict<WithReference.t<callback>>, pathItems?: dict<WithReference.t<pathItem>>,}
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.
src/OpenAPI.res:409:1
type tag = { name: string, description?: string, externalDocs?: externalDocumentation,}
Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
src/OpenAPI.res:435:1
type t = { openapi: string, info: info, jsonSchemaDialect?: string, servers?: array<server>, paths?: dict<pathItem>, webhooks?: dict<WithReference.t<pathItem>>, components?: components, security?: array<securityRequirement>, tags?: array<tag>, externalDocs?: externalDocumentation,}
Typed interfaces for OpenAPI 3.1.0 see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md This is the root object of the OpenAPI document.
src/OpenAPI.res:450:1
Mutable
Section titled “Mutable”WithReference
Section titled “WithReference”reference
Section titled “reference”type reference<'a> = { mutable ref: string, mutable summary?: string, mutable description?: string,}
src/OpenAPI.res:478:5
tagged
Section titled “tagged”type tagged<'a> = Object('a) | Reference(reference<'a>)
src/OpenAPI.res:484:5
reference
Section titled “reference”let reference: reference<'a> => t<'a>
src/OpenAPI.res:489:5
isReference
Section titled “isReference”let isReference: t<'a> => bool
src/OpenAPI.res:491:9
classify
Section titled “classify”let classify: t<'item> => tagged<'item>
src/OpenAPI.res:495:9
src/OpenAPI.res:476:10
contact
Section titled “contact”type contact = { mutable name?: string, mutable url?: string, mutable email?: string,}
src/OpenAPI.res:504:3
license
Section titled “license”type license = { mutable name: string, mutable identifier?: string, mutable url?: string,}
src/OpenAPI.res:510:3
type info = { mutable title: string, mutable summary?: string, mutable description?: string, mutable termsOfService?: string, mutable contact?: contact, mutable license?: license, mutable version: string,}
src/OpenAPI.res:516:3
serverVariable
Section titled “serverVariable”type serverVariable = { mutable default: string, mutable enum?: array<string>, mutable description?: string,}
src/OpenAPI.res:526:3
server
Section titled “server”type server = { mutable url: string, mutable description?: string, mutable variables?: dict<serverVariable>,}
src/OpenAPI.res:532:3
externalDocumentation
Section titled “externalDocumentation”type externalDocumentation = { mutable description?: string, mutable url: string,}
src/OpenAPI.res:538:3
example
Section titled “example”type example = { mutable summary?: string, mutable description?: string, mutable value?: unknown, mutable externalValue?: string,}
src/OpenAPI.res:543:3
baseParameter
Section titled “baseParameter”type baseParameter = { mutable description?: string, mutable required?: bool, mutable deprecated?: bool, mutable allowEmptyValue?: bool, mutable style?: parameterStyle, mutable explode?: bool, mutable allowReserved?: bool, mutable schema?: schema, mutable examples?: dict<WithReference.t<example>>, mutable example?: option<Js.Json.t>, mutable content?: dict<WithReference.t<mediaType>>,}
src/OpenAPI.res:550:3
encoding
Section titled “encoding”type encoding = { mutable contentType?: string, mutable headers?: dict<WithReference.t<header>>, mutable style?: string, mutable explode?: bool, mutable allowReserved?: bool,}
src/OpenAPI.res:566:3
mediaType
Section titled “mediaType”type mediaType = { mutable schema?: schema, mutable example?: unknown, mutable examples?: dict<WithReference.t<example>>, mutable encoding?: dict<encoding>,}
src/OpenAPI.res:574:3
parameter
Section titled “parameter”type parameter = { mutable name: string, mutable in_: parameterLocation, mutable description?: string, mutable required?: bool, mutable deprecated?: bool, mutable allowEmptyValue?: bool, mutable style?: parameterStyle, mutable explode?: bool, mutable allowReserved?: bool, mutable schema?: schema, mutable examples?: dict<WithReference.t<example>>, mutable example?: option<Js.Json.t>, mutable content?: dict<WithReference.t<mediaType>>,}
src/OpenAPI.res:581:3
requestBody
Section titled “requestBody”type requestBody = { mutable description?: string, mutable content: dict<mediaType>, mutable required?: bool,}
src/OpenAPI.res:588:3
type link = { mutable operationRef?: string, mutable operationId?: string, mutable parameters?: dict<unknown>, mutable requestBody?: unknown, mutable description?: string, mutable server?: server,}
src/OpenAPI.res:594:3
response
Section titled “response”type response = { mutable description: string, mutable headers?: dict<WithReference.t<header>>, mutable content?: dict<mediaType>, mutable links?: dict<WithReference.t<link>>,}
src/OpenAPI.res:603:3
pathItem
Section titled “pathItem”type pathItem = { mutable ref?: string, mutable summary?: string, mutable description?: string, mutable get?: operation, mutable put?: operation, mutable post?: operation, mutable delete?: operation, mutable options?: operation, mutable head?: operation, mutable patch?: operation, mutable trace?: operation, mutable servers?: array<server>, mutable parameters?: array<WithReference.t<parameter>>,}
src/OpenAPI.res:610:3
operation
Section titled “operation”type operation = { mutable tags?: array<string>, mutable summary?: string, mutable description?: string, mutable externalDocs?: externalDocumentation, mutable operationId?: string, mutable parameters?: array<WithReference.t<parameter>>, mutable requestBody?: WithReference.t<requestBody>, mutable responses?: dict<WithReference.t<response>>, mutable callbacks?: dict<WithReference.t<callback>>, mutable deprecated?: bool, mutable security?: array<securityRequirement>, mutable servers?: array<server>,}
src/OpenAPI.res:626:3
callback
Section titled “callback”type callback = dict<WithReference.t<pathItem>>
src/OpenAPI.res:640:3
oauthFlow
Section titled “oauthFlow”type oauthFlow = { mutable authorizationUrl: string, mutable tokenUrl: string, mutable refreshUrl?: string, mutable scopes: dict<string>,}
src/OpenAPI.res:642:3
oauthFlows
Section titled “oauthFlows”type oauthFlows = { mutable implicit?: oauthFlow, mutable password?: oauthFlow, mutable clientCredentials?: oauthFlow, mutable authorizationCode?: oauthFlow,}
src/OpenAPI.res:649:3
securityScheme
Section titled “securityScheme”type securityScheme = { mutable type_: string, mutable description?: string, mutable name: string, mutable in_: string, mutable scheme: string, mutable bearerFormat?: string, mutable flows: oauthFlows, mutable openIdConnectUrl: string,}
src/OpenAPI.res:656:3
components
Section titled “components”type components = { mutable schemas?: dict<schema>, mutable responses?: dict<WithReference.t<response>>, mutable parameters?: dict<WithReference.t<parameter>>, mutable examples?: dict<WithReference.t<example>>, mutable requestBodies?: dict< WithReference.t<requestBody>, >, mutable headers?: dict<WithReference.t<header>>, mutable securitySchemes?: dict< WithReference.t<securityScheme>, >, mutable links?: dict<WithReference.t<link>>, mutable callbacks?: dict<WithReference.t<callback>>, mutable pathItems?: dict<WithReference.t<pathItem>>,}
src/OpenAPI.res:669:3
type tag = { mutable name: string, mutable description?: string, mutable externalDocs?: externalDocumentation,}
src/OpenAPI.res:682:3
type t = { mutable openapi: string, mutable info: info, mutable jsonSchemaDialect?: string, mutable servers?: array<server>, mutable paths?: dict<pathItem>, mutable webhooks?: dict<WithReference.t<pathItem>>, mutable components?: components, mutable security?: array<securityRequirement>, mutable tags?: array<tag>, mutable externalDocs?: externalDocumentation,}
src/OpenAPI.res:688:3
fromReadOnly
Section titled “fromReadOnly”let fromReadOnly: readOnly => t
src/OpenAPI.res:701:3
toReadOnly
Section titled “toReadOnly”let toReadOnly: t => readOnly
src/OpenAPI.res:702:3
src/OpenAPI.res:473:8