mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
doc: remove redundant examples
This commit is contained in:
parent
38547e4ad2
commit
7b41882e6c
2 changed files with 0 additions and 32 deletions
|
|
@ -112,22 +112,6 @@
|
|||
{:status 200
|
||||
:body {:total (+ x y)}})}
|
||||
:post {:summary "plus with data-spec body parameters"
|
||||
;; OpenAPI3 named examples for request & response
|
||||
:openapi {:requestBody
|
||||
{:content
|
||||
{"application/json"
|
||||
{:examples {"add-one-one" {:summary "1+1"
|
||||
:value {:x 1 :y 1}}
|
||||
"add-one-two" {:summary "1+2"
|
||||
:value {:x 1 :y 2}}}}}}
|
||||
:responses
|
||||
{200
|
||||
{:content
|
||||
{"application/json"
|
||||
{:examples {"two" {:summary "2"
|
||||
:value {:total 2}}
|
||||
"three" {:summary "3"
|
||||
:value {:total 3}}}}}}}}
|
||||
:parameters {:body {:x int?, :y int?}}
|
||||
:responses {200 {:body {:total int?}}}
|
||||
:handler (fn [{{{:keys [x y]} :body} :parameters}]
|
||||
|
|
|
|||
|
|
@ -93,22 +93,6 @@
|
|||
:json-schema/default 42}
|
||||
int?]
|
||||
[:y int?]]}
|
||||
;; OpenAPI3 named examples for request & response
|
||||
:openapi {:requestBody
|
||||
{:content
|
||||
{"application/json"
|
||||
{:examples {"add-one-one" {:summary "1+1"
|
||||
:value {:x 1 :y 1}}
|
||||
"add-one-two" {:summary "1+2"
|
||||
:value {:x 1 :y 2}}}}}}
|
||||
:responses
|
||||
{200
|
||||
{:content
|
||||
{"application/json"
|
||||
{:examples {"two" {:summary "2"
|
||||
:value {:total 2}}
|
||||
"three" {:summary "3"
|
||||
:value {:total 3}}}}}}}}
|
||||
:responses {200 {:body [:map [:total int?]]}}
|
||||
:handler (fn [{{{:keys [x y]} :body} :parameters}]
|
||||
{:status 200
|
||||
|
|
|
|||
Loading…
Reference in a new issue