Teasim has first-class support and follows OpenAPI schema by default.
Allowing any Teasim server to generate a Swagger page and serve as documentation automatically by using just 1 line of the Teasim Swagger plugin.
To generate the Swagger page, install the plugin:
And register the plugin to the server:
For more information about Swagger plugin, see the Swagger plugin page.
schema
is used to customize the route definition, not only that it will generate an OpenAPI schema and Swagger definitions, but also type validation, type-inference and auto-completion.
However, sometime defining a type only isn't clear what the route might work. You can use schema.detail
fields to explictly define what the route is all about.
The detail fields follows an OpenAPI V3 definition with auto-completion and type-safety by default.
Detail is then passed to Swagger to put the description to Swagger route.