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.
OptionalinfoInformation about the API.
OpenAPI version number.
OptionalpathsThe available paths and operations for the API.
The 1st key is the path, and the 2nd key is the HTTP method.
OptionalsecurityA declaration of which security mechanisms can be used across the API.
When this property is configured, it will be overwritten in every API route.
For reference, the key means the name of the security scheme and the
value means the scopes. The scopes can be used only when the target
security scheme is oauth2 type, especially for
ISwaggerSecurityScheme.IOAuth2.IFlow.scopes property.
OptionalserversList of servers that provide the API.
OptionaltagsList of tag names with descriptions.
It is possible to omit this property or skip some tag names even if the tag name is used in the API routes. In that case, the tag name will be displayed (in Swagger-UI) without description.
OptionalwebhooksAn object to hold Webhooks.
Its structure is the same as paths, so the first key is the path, and the second key is the HTTP method.
Flag for indicating this document is emended by @samchon/openapi v4.
OpenAPI document.
OpenApi.IDocumentrepresents an OpenAPI document of emended OpenAPI v3.1.In other words,
OpenApi.IDocumentis a structure ofswagger.jsonfile 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.