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

Add OpenAPI :requestBody for :form request schema #703

Conversation

mpenttila
Copy link
Contributor

@mpenttila mpenttila commented Oct 10, 2024

Ring Coercion functionality allows defining a request schema with {:parameters {:form some-schema}}. This resulted in that schema being transformed to OpenAPI parameters, which was supported in OAS 2 (Swagger), but is not supported in OAS 3. Now they must be defined as a requestBody schema like any other kind of body.

:form parameter coercion also implies that the request content type must be application/x-www-form-urlencoded.

OpenAPI Specification 3 requires defining form parameters, i.e. classic
application/x-www-form-urlencoded type body as a :requestBody. They are
not supported as regular parameters like in OAS 2.
Copy link
Member

@opqdonut opqdonut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is great. Sorry for the long response time :(

@opqdonut opqdonut merged commit 86e0441 into metosin:master Nov 1, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants