Skip to content
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

Automatically publish Swagger :consumes for :form params #217

Closed
ikitommi opened this issue Feb 19, 2019 · 1 comment · Fixed by #417
Closed

Automatically publish Swagger :consumes for :form params #217

ikitommi opened this issue Feb 19, 2019 · 1 comment · Fixed by #417

Comments

@ikitommi
Copy link
Member

ikitommi commented Feb 19, 2019

Currently, on has to add manually :swagger {:consumes ["application/x-www-form-urlencoded"]} to endpoints that accept :form params. This can be automated:

example how to do that in the muuntaja-middleware

#84 will outdate this. But a quick-win while waiting for that.

EDIT: I think the Muuntaja Middleware/Interceptor should also be changed that if there are is :form, but no :body parameters defined, it will not push it's own swagger-data. Otherwise, the order of the mw matters (the last one overrides), which would be awful.

@Koura
Copy link
Contributor

Koura commented Jun 29, 2020

I'll take a go at this unless someone else is already working on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants