Skip to main content

Module openapi

Module openapi 

Source
Expand description

What every service’s OpenAPI description shares: the token routes need, and the error responses any route may give.

Structs§

Conventions
Applies the conventions every service keeps to its description: a route needs a token unless it says otherwise (security(())), and then may answer 401; any route may answer 429, over the limits; and operations are named after their tag and handler (combats.list), as handlers’ names repeat.
ErrorBody
An error, from any route: {"error": "..."}.

Constants§

TOKEN
The name of the token in Conventions’ security scheme.

Functions§

add_error
An error response, unless the route describes that status itself.
error
An error response with description.