swagger-api/swagger-codegen

[Groovy] Gradle build error

Open

#5,046 创建于 2017年3月13日

在 GitHub 查看
 (4 评论) (1 反应) (0 负责人)HTML (12,701 star) (5,474 fork)batch import
Client: GroovyIssue: Bughelp wanted

描述

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.

贡献者指南