[][src]Attribute Macro saphir_macro::openapi

#[openapi]

Saphir OpenAPI macro which can be put on top of a struct or enum definition. Allow specifying informations for the corresponding type when generating OpenAPI documentation through saphir's CLI.

The syntax looks like this : #[openapi(mime = "application/json")]. mime can either be a full mimetype, or one of the following keywords:

  • json (application/json)
  • form (application/x-www-form-urlencoded)
  • any (/)