You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ng-swagger-gen only supports the enumModule for string enums, not numeric enums.
Also, the x-enumNames extension isn't supported.
All of these are supported in https://github.com/cyclosproject/ng-openapi-gen.
If you can switch the descriptor to OpenAPI 3 instead of Swagger 2, you can switch to the newer project.
Otherwise, this will only be implemented if a PR is submitted, because ng-swagger-gen no longer receives new features, except for community contributions.
luisfpg
changed the title
Does not generate constants from enum
Support enum constants for numeric values, and support x-enumNames extension
Mar 31, 2020
ng-swagger-gen version 2.2.0
I have set "enumModule": true
This is my enum definition:
"MetadataVersionStatusType": { "type": "integer", "description": "", "x-enumNames": [ "Draft", "Published" ], "enum": [ 0, 1 ] }
This only produces
How am I supposed to get the string constants generated ("Draft" and "Published")?
The text was updated successfully, but these errors were encountered: