Skip to content

Add form struct tag for x-www-form-urlencoded request schemas#1000

Merged
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
ivan1993spb:support-x-www-form-urlencoded
Mar 14, 2023
Merged

Add form struct tag for x-www-form-urlencoded request schemas#1000
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
ivan1993spb:support-x-www-form-urlencoded

Conversation

@ivan1993spb
Copy link
Copy Markdown
Contributor

Fixes #997

If a request schema was defined in the operations section, and if its content type is application/x-www-form-urlencoded, the corresponding model needs to be tagged with the form struct tag, so that it could be unmarshalled properly.

GenerateBodyDefinitions knows exactly which content type needs to be applied to which schema type, and perhaps this adjustment could be made to the generated code at that point.

@deepmap-marcinr deepmap-marcinr merged commit f921602 into oapi-codegen:master Mar 14, 2023
@ivan1993spb ivan1993spb deleted the support-x-www-form-urlencoded branch March 14, 2023 19:42
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
danicc097 pushed a commit to danicc097/oapi-codegen that referenced this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong struct tags for application/x-www-form-urlencoded

2 participants