enhancementhelp wanted
描述
... would allow easy swagger -> reitit conversion.
Something like:
(require '[reitit.coercion.json-schema])
["/api"
{:coercion reitit.coercion.json-schema/coercion}
["/order"
{:post
{:parameters
{:body
{:title "Order"
:properties {:petId {:format "int64"
:type "integer"},
:status {:description "Order Status"
:enum ["placed" "approved" "delivered"]
:type "string"},
:id {:format "int64"
:type "integer"},
:shipDate {:format "date-time"
:type "string"},
:complete {:default false
:type "boolean"},
:quantity {:format "int32"
:type "integer"}},
:type "object",
:xml {:name "Order"}}}
:handler (fn [req]
{:status 200
:body {:id (-> req :parameters :body :petId)}})}}]]