swagger-api/swagger-codegen

[java-play-framework] Error building the project when config parameters are overridden

Open

#6.867 geöffnet am 2. Nov. 2017

Auf GitHub ansehen
 (14 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)HTML (5.474 Forks)batch import
Issue: BugServer: Javahelp wanted

Repository-Metriken

Stars
 (12.701 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

We generated the Source code from swagger.yaml , we also have config.json that overrides certain parameters (mentioned below) , When we try to build the code it fails due to overridden params are not reflecting in "Module.java"

Swagger-codegen version

2.3.0

Swagger declaration file content or url

can try with any swagger file (say petstore.yaml)

Command line used for generation

java -jar swagger-codegen-2.3.0 jar -i petstore.yaml -c config.json -l java-play-framework

in config.json add below line to override "apiPackage":"com.puppies.store.apis",

Steps to reproduce

This generates the code , when we build it fails , the cause is because in which Module.java has still older statement

import controllers.*;

ideally , since we overridden "apiPackage" it should be import com.puppies.store.apis.*;

once we changed this manually , we could build it fine . so ideally code generator need to be fixed !

Related issues/PRs
Suggest a fix/enhancement

Contributor Guide