Skip to content

fix(openapi3): omit form tags from schemas - #2206

Open
cyphercodes wants to merge 1 commit into
swaggo:v2from
cyphercodes:fix/2195-omit-form-schema-extension
Open

fix(openapi3): omit form tags from schemas#2206
cyphercodes wants to merge 1 commit into
swaggo:v2from
cyphercodes:fix/2195-omit-form-schema-extension

Conversation

@cyphercodes

Copy link
Copy Markdown

Describe the PR

Stop copying Gin form struct tags into OpenAPI 3.1 schema extensions. The tag was serialized as a bare form sibling, which strict OpenAPI validators reject. Field-name fallback behavior for form-only fields remains unchanged.

Adds a regression covering a field with json, binding, and form tags.

Relation issue

Fixes #2195

Additional context

Tested with:

  • go test . -run '^TestParserParseDefinitionV3OmitsGinBindingFormTagFromSchema$' -count=1
  • go test . -run 'V3|Form' -count=1
  • go vet ./...
  • git diff --check

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.

1 participant