mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 17:01:11 +00:00
doc: update docstring of openapi-feature
This commit is contained in:
parent
50c1af9a5b
commit
ae55b6628c
1 changed files with 11 additions and 7 deletions
|
|
@ -22,14 +22,16 @@
|
||||||
Works both with Middleware & Interceptors. Does not participate
|
Works both with Middleware & Interceptors. Does not participate
|
||||||
in actual request processing, just provides specs for the new
|
in actual request processing, just provides specs for the new
|
||||||
documentation keys for the route data. Should be accompanied by a
|
documentation keys for the route data. Should be accompanied by a
|
||||||
[[openapi-spec-handler]] to expose the openapi spec.
|
[[create-openapi-handler]] to expose the openapi spec.
|
||||||
|
|
||||||
New route data keys contributing to openapi docs:
|
New route data keys contributing to openapi docs:
|
||||||
|
|
||||||
| key | description |
|
| key | description |
|
||||||
| --------------|-------------|
|
| ---------------|-------------|
|
||||||
| :openapi | map of any openapi-data. Must have `:id` (keyword or sequence of keywords) to identify the api
|
| :openapi | map of any openapi-data. Can contain keys like `:deprecated`.
|
||||||
|
| :content-types | vector of supported content types. Defaults to `[\"application/json\"]`
|
||||||
| :no-doc | optional boolean to exclude endpoint from api docs
|
| :no-doc | optional boolean to exclude endpoint from api docs
|
||||||
|
| :tags | optional set of string or keyword tags for an endpoint api docs
|
||||||
| :summary | optional short string summary of an endpoint
|
| :summary | optional short string summary of an endpoint
|
||||||
| :description | optional long description of an endpoint. Supports http://spec.commonmark.org/
|
| :description | optional long description of an endpoint. Supports http://spec.commonmark.org/
|
||||||
|
|
||||||
|
|
@ -40,6 +42,8 @@
|
||||||
| :parameters | optional input parameters for a route, in a format defined by the coercion
|
| :parameters | optional input parameters for a route, in a format defined by the coercion
|
||||||
| :responses | optional descriptions of responses, in a format defined by coercion
|
| :responses | optional descriptions of responses, in a format defined by coercion
|
||||||
|
|
||||||
|
Use `:request` parameter coercion (instead of `:body`) to unlock per-content-type coercions.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
[\"/api\"
|
[\"/api\"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue