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

Parameters with enum and required produces wired output #1113

Closed
beatjoerg opened this issue Apr 2, 2015 · 7 comments
Closed

Parameters with enum and required produces wired output #1113

beatjoerg opened this issue Apr 2, 2015 · 7 comments
Milestone

Comments

@beatjoerg
Copy link

If a parameter is set to enum and also required, the output is wrong (param name listed twice)

image

            "parameters": [
                {
                    "name": "prg",
                    "in": "path",
                    "description": "Programm",
                    "required": true,
                    "type": "string",
                    "enum": ["rsj","rsp"]
                },
                {
                    "name": "lang",
                    "in": "path",
                    "description": "Language",
                    "type": "string",
                    "enum": ["de","fr","it","en"]
                }
            ],
@webron
Copy link
Contributor

webron commented Apr 2, 2015

Can you please confirm which version you're using? Should be at the top of the swagger-ui.js file.

@beatjoerg
Copy link
Author

Just cloned today from master:

@beatjoerg beatjoerg changed the title Parameters with enum and reqiured produces wired output Parameters with enum and required produces wired output Apr 2, 2015
@krutkowski86
Copy link

+1

@freak4pc
Copy link

Happening for me as well, cloned from master

"parameters": [
                    {
                        "name": "gender",
                        "in": "formData",
                        "description": "Gender of the user",
                        "required": true,
                        "type": "string",
                        "enum": ["m", "f"]
                    }
                ],

image

@webron webron added this to the v2.1 milestone Apr 16, 2015
mgttlinger added a commit to mgttlinger/swagger-ui that referenced this issue Apr 17, 2015
@mgttlinger
Copy link
Contributor

Created a pull request for this issue #1180

@swarupe04
Copy link

Hi. May I know which version/tag should i use to get this fix

fehguy added a commit that referenced this issue Apr 21, 2015
@webron
Copy link
Contributor

webron commented Apr 21, 2015

Fixed in develop_2.0.

@swarupe04 - currently there's no official version with it, but if you need it you can check out the develop_2.0 branch and use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants