swagger-api/swagger-codegen

[Groovy] Gradle build error

オープン

#5,046 opened on 2017/03/13

 (4 件のコメント) (1 件のリアクション) (0 人の担当者)HTML (5,474 件のフォーク)batch import
Client: GroovyIssue: Bughelp wanted

Repository metrics

Stars
 (12,701 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド