Skip to content

CodegenConfigurator systemProperties are reused between code generation invokations #4788

@JLLeitschuh

Description

@JLLeitschuh

I'm using the swagger CodegenConfigurator in a gradle build where the swagger codegen project is loaded as a library and is being directly passed into the DefaultGenerator.

This usage in this gradle plugin is very similar to my usage.

If I configure one CodegenConfigurator object with systemProperties being set, these settings seem to be being stored somewhere statically.

I'm observing that if I use a new DefaultGenerator again in the same JVM I end up having files not get generated because of input from a previous run of the generator.

I know that the two CodegenConfigurator objects that I'm passing in are different because I've tested logging the systemProperties variable just before passing it in and for the first call it is populated and the second time it is empty.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions