[BUG] Params named "default" get replaced with "_default", resulting in incompatible clients
Created by: seanlaff
Description
My api has a request object that contains a key called default
, however when I generate client code from this spec, it gets converted to _default
. Since my api expects default
, the generated client code does not work.
I'm guessing this is escaping that happens in java since default
is a java keyword. Is there any way around this?
Expected generated:
export interface RbacAddRoleRequest {
default?: boolean;
Actual generated:
export interface RbacAddRoleRequest {
_default?: boolean;
openapi-generator version
4.0.0
OpenAPI declaration file content or url
https://gist.github.com/seanlaff/d2aef0244adeeea95c1396952b28d987
Command line used for generation
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v4.0.0-beta generate \
-i /local/test.yaml \
-g typescript-axios \
-o /local/out/ts