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
add enums to Java Spring path, query, and header params #3198
Conversation
72d1821
to
5ec02e2
Compare
Can you generate the samples ? |
Do you have a command for generating samples ? I don't think that it is documented |
|
5ec02e2
to
4933640
Compare
Samples stayed the same. In samples, enums in parameters are wrapped in lists. Changes so far only generate java enum if params are enums. Could use some help to make it work for enums wrapped in lists |
@thebignet coincidentally I'm working on better enum support for list (or list of list) and map (or map of map). Stay tuned. |
UPDATE: I've filed #3199 to support array/map (any dimensions) of enum (for C# in particular) |
@thebignet about updating the Petstore sample or testing the change, please refer to https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md#testing for more information. |
About "files changed"... |
@radik-sabirov I agree that defining the enum as model is better as it can be reused by different endpoints or model properties but that's up to the spec owner on how they define the enum (using enum model or inline) |
@wing328 model.mustache
This template can create enum if it is enum... created new modelEnum.mustache
About pathParams.mustache and queryParams.mustache
service.mustache
|
Can you make a PR for this ? I'd be interested in testing it. |
@radik-sabirov may I know if you've cycle to submit a PR with the enhancement? |
Any news on that? |
Closed for inactivity |
Enums in header, query or path parameters where not generated as enums for Java Spring.
Inline enums are used for each api operation.