add enums to Java Spring path, query, and header params#3198
add enums to Java Spring path, query, and header params#3198thebignet wants to merge 1 commit intoswagger-api:masterfrom
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.