-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Property name with dashes cause incorrect typescript conversion #1969
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I'm encountering a weird problem where property names with
-
a dash are not converted to camel case.Sample 1
Looking at a very basic yaml:
Gets converted to:
Typescript doesn't allow dashes in property names, but OpenAPI does (see the 'Components Object' section). The enum
api-version
is therefore invalid and cannot be used.Comparison: Testing with Swagger Codegen
When testing this with the swagger-codegen tool it converts the model to:
Sample 2
will result in:
Swagger just obliterates the type here... 🤷, but at least the code is not invalid.
I'm not in control of the swagger/openapi definition file, so unfortunately I can't get it changed. Is there something else I can do short from manually fixing the generated file?
The text was updated successfully, but these errors were encountered: