Open aidy1991 opened 2 years ago
If this would be a configurable option, I think we'd accept a PR for this.
I just started using the codegen functionality today and similar to above, we have snake_case on the Python backend and camelCase on the TypeScript clients.
I see that generate.ts
does perform some camelCase conversion, but as I'm new to the package, the scope and intention of this conversion isn't clear to me. Which aspects of codegen does the camelCase conversion currently affect? That is, what does the existing conversion enable if the generated types are not being converted to camelCase?
I'd like to make a PR for this as a configurable option in the future. I'm just wondering what the best approach is in this mixed-case situation when using the codegen functionality as it stands.
I also read through this issue, so it seems like some users are getting conversions (though undesired), so I'm not clear about the intended behavior and use.
When generating codes from OpenAPI schema, the parameters of request body and response use the names defined in the schema as they are. For example, if a parameter is defined as a snake case, it is necessary to exceptionally write snake case in the TypeScript code. Since it is common to use camel case in TypeScript and JavaScript, we would like to use camel case in the code generated from OpenAPI schema.