-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
Description
ISSUE:
I use language jaxrs-cxf-client and inside json file there is not specified a response class for HTTP Status code 401.
After generation, the api class contains several errors about @apiresponse. In detail the plugin generates this line in error "response = .class"
API class generated (Java code)
...
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = ResponseBody.class),
@ApiResponse(code = 401, message = "Unauthorized", response = .class)
})
...Swagger-codegen version
2.2.3 and 2.3.1
Swagger declaration file content
...
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/ResponseBody"
}
},
"401":{
"description":"Unauthorized"
}
}
...Command line used for generation
I use maven generate goals with this configuration:
<configuration>
<inputSpec>scr/main/resources/file.json</inputSpec>
<language>jaxrs-cxf-client</language>
<configOptions>
<sourceFolder>codegen</sourceFolder>
<apiPackage>com.example.rest.api</apiPackage>
<modelPackage>com.example.rest.model</modelPackage>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<useJaxbAnnotations>true</useJaxbAnnotations>
</configOptions>
</configuration>Metadata
Metadata
Assignees
Labels
No labels