swagger-codegen is referencing a non-existent Java class

86 views Asked by At

I'm using swagger-codegen to create a Java stub around a Hyperledger Composer REST Server, but codegen is referencing a class that it hasn't generated.

Sample input:

 "responses": {
     "200": {
         "description": "Request was successful", 
         "schema": {
             "$ref": "#/definitions/Long"
         }
      }
 },

Checking the definitions section of the swagger.json file, there is no definition for Long.

The Java stub created includes this import, but there is no corresponding ModelLong class in that package:

import io.swagger.client.model.ModelLong; 

The API stub code itself looks like this:

public ModelLong allowanceCreatePostAllowance(Allowance data) throws ApiException {
    ApiResponse<ModelLong> resp = allowanceCreatePostAllowanceWithHttpInfo(data);
    return resp.getData();
}

Is this a class I should expect to be writing myself or could there be some error in the mapping?

0

There are 0 answers