swagger-api/swagger-codegen

[Groovy] Gradle build error

Open

#5 046 ouverte le 13 mars 2017

Voir sur GitHub
 (4 commentaires) (1 réaction) (0 assignés)HTML (5 474 forks)batch import
Client: GroovyIssue: Bughelp wanted

Métriques du dépôt

Stars
 (12 701 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Description

When running gradle test with Groovy Pestore client, we get the following errors:

$ gradle test
:compileJava UP-TO-DATE
:compileGroovy
startup failed:
/Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/groovy/src/main/groovy/io/swagger/api/PetApi.groovy: 8: unable to resolve class io.swagger.model.File
 @ line 8, column 1.
   import io.swagger.model.File
   ^

/Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/groovy/src/main/groovy/io/swagger/api/StoreApi.groovy: 8: unable to resolve class io.swagger.model.Map
 @ line 8, column 1.
   import io.swagger.model.Map
   ^

/Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/groovy/src/main/groovy/io/swagger/model/Order.groovy: 6: unable to resolve class io.swagger.model.Date
 @ line 6, column 1.
   import io.swagger.model.Date;
   ^

/Users/williamcheng/Code/jan2017/swagger-codegen/samples/client/petstore/groovy/src/main/groovy/io/swagger/model/Pet.groovy: 6: unable to resolve class io.swagger.model.ArrayList
 @ line 6, column 1.
   import io.swagger.model.ArrayList;
   ^

4 errors
Swagger-codegen version

Latest master

Steps to reproduce

cd samples/client/petstore/groovy && gradle test

Suggest a Fix

The issue probably has to do with type mapping for File, Map, Date and ArrayList so we will need to revise the primitive type as well as type mapping for Groovy generator. (one may also find the fix in the Abstract Java generator)

If anyone wants to work on this fix, please reply to let us know.

Guide contributeur