An object to hold reusable data structures.
It stores both DTO schemas and security schemes.
For reference, nestia
defines every object and alias types as reusable DTO
schemas. The alias type means that defined by type
keyword in TypeScript.
Optional
infoInformation about the API.
OpenAPI version number.
Optional
pathsThe available paths and operations for the API.
The 1st key is the path, and the 2nd key is the HTTP method.
Optional
securityA declaration of which security mechanisms can be used across the API.
When this property be configured, it would be overwritten in every API routes.
For reference, key means the name of security scheme and value means the scopes
.
The scopes
can be used only when target security scheme is oauth2
type,
especially for ISwaggerSecurityScheme.IOAuth2.IFlow.scopes property.
Optional
serversList of servers that provide the API.
Optional
tagsList of tag names with description.
It is possible to omit this property or skip some tag name even if the tag name is used in the API routes. In that case, the tag name would be displayed (in Swagger-UI) without description.
Optional
webhooksAn object to hold Webhooks.
Its structure is same with paths, so that the 1st key is the path, and the 2nd key is the HTTP method.
Flag for indicating this document is emended by @samchon/openapi
.
OpenAPI document.
OpenApi.IDocument
represents an OpenAPI document of emended OpenAPI v3.1.In other words,
OpenApi.IDocument
is a structure ofswagger.json
file of OpenAPI v3.1 specification, but a little bit shrunk to remove ambiguous and duplicated expressions of OpenAPI v3.1 for the convenience and clarity.