-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected handling of empty body response. #691
Comments
Either the malli coercion or -get-apidocs-openapi doesn't handle a missing |
Based on my testing, it looks like it should work if you use |
The problem seems to be that when there is no
Then, when it is time to coerce the response,
The fix would be to create an |
Thanks for investigating. According to the OpenAPI Spec 3.1.0, the recommended way to specify an empty response body is to leave off the In the OpenAPI Spec 3.1.0, the |
Hi folks
The following code does not behave as expected.
When I call the endpoint with a GET of
/test/2
, I get a 500 response code with the following bodyI was expecting a 400 response code with an empty body.
According to OpenAPI spec for a Response Object and the Swagger docs on an empty response body, to specify an empty response body, you just leave off the
content
property, which is what I did.However, if I uncomment the two
#_
s in the Reitit specification, and use:content {:default {:schema nil?}}
then it does work as expected.What is the recommended way of specifying an empty response body in Reitit?
Thanks.
The text was updated successfully, but these errors were encountered: