Skip to content

[BUG] Typescript axios withSeparateModelsAndApi param can't be used from cli #2709

@seanlaff

Description

@seanlaff

The withSeparateModelsAndApi param given as a cli argument cannot be typecast. Not sure if this is a problem with openapi-generator itself or just the axios generator.

Version: 4.0.0beta3

What I ran

docker run --rm -v ${PWD}:/output openapitools/openapi-generator-cli generate \
    -i /output/my_swagger.json \
    -g typescript-axios \
    --additional-properties=withSeparateModelsAndApi=true \
    -o /output/src \

Error

Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
	at org.openapitools.codegen.languages.TypeScriptAxiosClientCodegen.processOpts(TypeScriptAxiosClientCodegen.java:135)

@mvniekerk I see you originally added this param. Do you know if Im using it correctly?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions