-
Notifications
You must be signed in to change notification settings - Fork 37
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
Enums in query and MULTI #75
Comments
Hi @carlosefonseca, thanks for reporting this issue.
To answer your first question: yes, it's a bug. To support this we would need to extend the
An enum class: no, as this won't comply with the specs. fun requestGet(
@retrofit2.http.Query("State") @MULTI state: List<StateEnum>?
): Single<List<RequestDTO>> This unfortunately comes with the complexity of having to define an inline anonymous enum ( So the workaround is to probably deal with I'd love to keep this issue opened in case someone wants to pick it up. |
If you have this issue I would recommend for now as a workaround use explicit type of parameters separation instead of |
Hi,
The code generated ended up with an import
import …yelpcodegen.tools.MULTI
that does not exist.I checked the swagger and the only places I found "multi" was on a query parameter that is an enum and contains
"collectionFormat": "multi",
(I didn't check what this meant). Looking at the generated code, the request contains a List in the place of the enum.So, two questions. Is the
import
a bug? And could the request be generated with the enum class instead of a List?Here's the generated code vs the swagger.
The text was updated successfully, but these errors were encountered: