来自文档compojure-api ... 给定
(s/defschema Pizza
{:name s/Str
:size (s/enum :L :M :S)
:origin {:country (s/enum :FI :PO)
:city s/Str}})
您可以稍后在代码中执行以下操作:
(defapi app
...
...
(POST* "/pizza" []
:return Pizza
:body [pizza Pizza]
:summary "echoes a pizza"
(ok pizza))))
我的问题是如何为form-params
路线实现这一目标?
IE
(defapi app
...
...
(POST* "/pizza" []
:return Pizza
:form-params [pizza Pizza] ; <---------------- here
:summary "echoes a pizza"
(ok pizza))))