Skip to content

Throw an error when unknown key-value arguments are passed with -D #499

Open
@langston-barrett

Description

@langston-barrett
Description

When attempting to use the golang codegen with the option withXml=true, I mistakenly typed withXML (#490). My error was silently ignored and I spent a few minutes trying to figure out why it wasn't working. It might be more user-friendly to throw an error.

openapi-generator version

Docker

Command line used for generation
sudo docker run --rm -v ${PWD}:/local \
     openapitools/openapi-generator-cli generate \
     -i /local/swagger.yml \
     -g go \
     -o /local/generated/client \
     -D withXML=true

vs

sudo docker run --rm -v ${PWD}:/local \
     openapitools/openapi-generator-cli generate \
     -i /local/swagger.yml \
     -g go \
     -o /local/generated/client \
     -D withXml=true
Steps to reproduce

Run the above incorrect command

Related issues/PRs
Suggest a fix/enhancement

Throw an error!

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