OptionaladditionalWhether to include additional information or not.
If configured to be true, those properties would be added into each API
endpoint.
x-nestia-method: the HTTP method, such as "GET"x-nestia-namespace: the SDK function's accessor, such as
"bbs.articles.index"x-nestia-jsDocTags: the JSDoc tags of the controller methodOptionalbeautifyWhether to beautify JSON content or not.
If you configure this property to be true, the swagger.json file
would be beautified with indentation (2 spaces) and line breaks. If you
configure numeric value instead, the indentation would be specified by
the number.
OptionaldecomposeDecompose query DTO.
If you configure this property to be true, the query DTO would be
decomposed into individual query parameters per each property. Otherwise
you set it to be false, the query DTO would be one object type which
contains all of query parameters, spread into its keys by style: form
and explode: true.
Swagger 2.0 has no object query parameter, and no OpenAPI version can spread an object into headers, so a query DTO of a Swagger 2.0 document and a headers DTO are decomposed regardless of this property.
OptionalinfoAPI information.
If omitted, package.json content would be used instead.
OptionalopenapiOpenAPI version.
If you configure this property to be 2.0, 3.0, or 3.1, the newly
generated swagger.json file would follow the specified OpenAPI version,
downgraded from the OpenAPI v3.2 specification.
Response path of the swagger.json.
If you've configured only directory, the file name would be the
swagger.json. Otherwise you've configured the full path with file name
and extension, the swagger.json file would be renamed to it.
OptionalsecuritySecurity schemes.
When generating swagger.json file through nestia, if your controllers
or theirs methods have a security key which is not enrolled in here
property, it would be an error. So would an OAuth2 scope none of the
scheme's flows declares, and, for an OpenAPI 3.0 or 2.0 document,
scopes on a scheme other than OAuth2 or OpenID Connect, which those
versions require to be empty; from 3.1 on they list role names.
OptionalserversList of server addresses.
OptionaltagsList 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 used without description.
Of course, if you've written a comment like @tag {name} {description},
you can entirely replace this property specification.
OptionaloperationOperation ID generator.
Properties of the API endpoint.
Operation ID.
Building
swagger.jsonis also possible.