swagger-api/swagger-codegen

CodegenConfigurator systemProperties are reused between code generation invokations

Open

#4.788 aberto em 13 de fev. de 2017

Ver no GitHub
 (14 comments) (0 reactions) (0 assignees)HTML (5.474 forks)batch import
Feature: CodegenIssue: Usage/Installationhelp wanted

Métricas do repositório

Stars
 (12.701 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador