swagger-api/swagger-codegen

[Groovy] Gradle build error

Aberta

#5.046 aberto em 13 de mar. de 2017

 (4 comentários) (1 reação) (0 responsável)HTML (5.474 forks)batch import
Client: GroovyIssue: Bughelp wanted

Métricas do repositório

Stars
 (12.701 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

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.

Guia do colaborador