Open stefanbartos opened 2 years ago
You'd still need a conversion from what the api returns to your casing though. I was looking for a option to set the casing to camelcase, but the api returns snake_case. If you then generate the types in CamelCase, the conversion from the snake_case json to your CamelCase types would fail.
I would love to see this problem worked out though!
You'd still need a conversion from what the api returns to your casing though. I was looking for a option to set the casing to camelcase, but the api returns snake_case. If you then generate the types in CamelCase, the conversion from the snake_case json to your CamelCase types would fail.
I would love to see this problem worked out though!
And then there's the complexity of tracking fields in request bodies which are actually part of the schema, to not just blindly camelCase everything recursively, but just those keys that are part of the OAS (additionalProperties: true)
Hi,
I have a question about changing the case of generated schema properties.
Our OpenApi specification is generated from .NET API. Since all exported object properties have pascal case by default, generated schemas have also pascal, which is not TS/JS convention. It can be solved by these suggestions.
Changing the case in
config.ts
file. This method is not ideal, but works.