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

support boolean false value in extension #927

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

HurSungYun
Copy link
Contributor

Describe the PR
This change supports to use boolean false value as extension values. Currently, extensions field only supports boolean true and string values. However, boolean false value is needed for some frequently used extensions such as x-omitempty.

All swagger extensions should start with x-, so prefix ! does not break anything and it can be a good rule.

Relation issue

None

Additional context

My first approach was like x-omitempty=false, but it may break some extensions that uses false as string value.

Copy link
Member

@sdghchj sdghchj left a comment

Choose a reason for hiding this comment

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

LGTM

@sdghchj sdghchj merged commit 485f917 into swaggo:master Aug 17, 2021
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.

2 participants