doc: deprecated openapi parameters in docs & example

This commit is contained in:
Joel Kaasinen 2025-04-25 15:07:52 +03:00
parent 9534f6df8b
commit 3c6139950c
2 changed files with 7 additions and 0 deletions

View file

@ -139,6 +139,7 @@ Malli:
[:x [:x
{:title "X parameter" {:title "X parameter"
:description "Description for X parameter" :description "Description for X parameter"
:json-schema/deprecated true
:json-schema/default 42} :json-schema/default 42}
int?] int?]
[:y int?]]}}}] [:y int?]]}}}]
@ -151,6 +152,7 @@ Schema:
{:post {:post
{:parameters {:parameters
{:body {:x (schema-tools.core/schema s/Num {:description "Description for X parameter" {:body {:x (schema-tools.core/schema s/Num {:description "Description for X parameter"
:openapi/deprecated true
:openapi/example 13 :openapi/example 13
:openapi/default 42}) :openapi/default 42})
:y int?}}}}] :y int?}}}}]
@ -165,6 +167,7 @@ Spec:
{:body (spec-tools.data-spec/spec ::foo {:body (spec-tools.data-spec/spec ::foo
{:x (schema-tools.core/spec {:spec int? {:x (schema-tools.core/spec {:spec int?
:description "Description for X parameter" :description "Description for X parameter"
:openapi/deprecated true
:openapi/example 13 :openapi/example 13
:openapi/default 42}) :openapi/default 42})
:y int?}}}}}] :y int?}}}}}]

View file

@ -97,6 +97,10 @@
:json-schema/default 30 :json-schema/default 30
:json-schema/example 10} :json-schema/example 10}
int?] int?]
[:charset {:title "Which charset to use?"
:optional true
:json-schema/deprecated true}
string?]
[:email {:title "Email address to search for" [:email {:title "Email address to search for"
:json-schema/format "email"} :json-schema/format "email"}
string?]]} string?]]}