Body parameters are always an array
jdkealy opened this issue · comments
I can't seem to make any endpoint receive just a regular map. Everything is an array. As you can see, I have a key "test" and swagger UI is showing it as an array. Any idea how to resolve this ?
(def account-handlers
["/accounts" {:coercion reitit.coercion.spec/coercion
:swagger {:tags ["accounts"]}}
[""
{:get {:summary "All Accounts"
:handler accounts-handler}
:post {:parameters {:body {:test int?}}
:summary "Create Account"
:handler create-account-handler}}]])
![Screenshot 2024-05-25 at 1 21 09 PM](https://private-user-images.githubusercontent.com/386993/333820700-ab8b3309-5be6-41d4-8ae1-344288ac12b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MTQ2NDIsIm5iZiI6MTcyMTcxNDM0MiwicGF0aCI6Ii8zODY5OTMvMzMzODIwNzAwLWFiOGIzMzA5LTViZTYtNDFkNC04YWUxLTM0NDI4OGFjMTJiMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyM1QwNTU5MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNzVhNTlkZWZmOTlmNDNjNzJlY2FiNmM1N2I5YjMwMjVjNDZmMTUxNGU1YTFmMmY0OWVhODYwMjlkM2ZmOGRiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wRcNFheOuF-VCZ8mN2IYAhgbfBb35lcYj8rFRI_3YW0)