mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Ensure generated enum values are valid, resolves #2457
This commit is contained in:
parent
282f497839
commit
3fba32573c
@ -33,7 +33,7 @@ export namespace {{classname}} {
|
||||
{{#vars}}
|
||||
{{#isEnum}}
|
||||
export enum {{datatypeWithEnum}} { {{#allowableValues}}{{#values}}
|
||||
{{.}} = <any> '{{.}}'{{^-last}},{{/-last}}{{/values}}{{/allowableValues}}
|
||||
VALUE_{{.}} = <any> '{{.}}'{{^-last}},{{/-last}}{{/values}}{{/allowableValues}}
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
||||
|
Loading…
Reference in New Issue
Block a user