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

Multi-selection in query parameter 'allowableValues' listbox for 'array' param type. #414

Merged
merged 1 commit into from
Mar 12, 2014

Conversation

valdemon
Copy link
Contributor

@valdemon valdemon commented Mar 5, 2014

Updates the #304 behaviour - now it checks the 'array' param type instead of 'allowMultiple' attribute.
Partly adresses also the #118. It's also associated with swagger-api/swagger-js#83, but can live without it, though.
I haven't attached the generated swagger-ui.js to the pull request.

@fehguy
Copy link
Contributor

fehguy commented Mar 6, 2014

based on our discussion in swagger-core, does this still apply?

Brings backward compatibility for the 'allowMultiple' attribute.
@valdemon
Copy link
Contributor Author

valdemon commented Mar 6, 2014

Hi,
yes, it does.
Based on our discussion I've slightly modified the commit, adding backward compatibility for the allowMultiple attribute. Now the list box will be multi selectable for both cases: array type query parameter and a query parameter annotated with allowMultiple attribute.

@valdemon
Copy link
Contributor Author

@fehguy: what is your opinion? At least swagger-jaxrs users won't experience the list multiselect feature without this fix.

@fehguy
Copy link
Contributor

fehguy commented Mar 12, 2014

Looks good, thanks for submitting

fehguy added a commit that referenced this pull request Mar 12, 2014
Multi-selection in query parameter 'allowableValues' listbox for 'array' param type.
@fehguy fehguy merged commit 8f665f7 into swagger-api:master Mar 12, 2014
fehguy added a commit to swagger-api/swagger-core that referenced this pull request Mar 12, 2014
@fehguy
Copy link
Contributor

fehguy commented Mar 12, 2014

Note, there was also a bug in swagger-core that affects the generation of the drop-down, see swagger-api/swagger-core#483

@valdemon
Copy link
Contributor Author

So it seems that was a root cause of the issue. Nevertheless, I prefer current state of the art, because it's now enough to declare the jaxrs resource method query param as an array or List of enum type and you have a multiselectable list out of the box without a superfluous 'allowMultiple' attr.
When the 'format' for an array type param will be in future spec then we'll be done without a need for any jaxrs (or other) framework interceptor for converting CSV param value to requested multiple value query param format. Cheers :)

jessekoska pushed a commit to jessekoska/SwaggerLume that referenced this pull request Aug 7, 2016
Brings backward compatibility for the 'allowMultiple' attribute.
vincent-zurczak pushed a commit to roboconf/swagger-ui that referenced this pull request Aug 18, 2016
Brings backward compatibility for the 'allowMultiple' attribute.
vincent-zurczak pushed a commit to roboconf/swagger-ui that referenced this pull request Aug 18, 2016
Multi-selection in query parameter 'allowableValues' listbox for 'array' param type.
JuanSW18 pushed a commit to Digital-Paw/digital-paw-swagger-ui that referenced this pull request Aug 23, 2024
Brings backward compatibility for the 'allowMultiple' attribute.
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