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

allowEmptyValue not implemented? #1934

Closed
rick22sun opened this issue Jan 29, 2016 · 1 comment · Fixed by #4788
Closed

allowEmptyValue not implemented? #1934

rick22sun opened this issue Jan 29, 2016 · 1 comment · Fixed by #4788

Comments

@rick22sun
Copy link

Looks like allowEmptyValue not implemented. The goal is to produce a query parameter ?param1 without any value and the '=' sign. Tried the following

{
        in: "query",
        name: "param1",
        type: "string",
        required: false,
        allowEmptyValue : true
}

with different type, but can't send ?param1 in the URL. The closest I can get is ?param1=true using:

{
        in: "query",
        name: "param1",
        type: "string",
        required: false,
        enum : ["true"]
}

Ideally, if allowEmptyValue = true, then ui presents a checkbox: when checked send ?param1, else just do not include the parameter.

@Hronom
Copy link

Hronom commented Jul 19, 2018

Same here, very useful to implement reset logic for values, otherwise it can't be implemented.

For case:

required: false,
allowEmptyValue : true

need to draw checkbox. If you check it - the swagger ui will send ?param1 or ?param1=, otherwise there no be parameter in request.

Is there any progress on this?

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