I have swagger definition file having the below snippet for POST request
parameters:
- name: responseXML
in: query
required: true
schema:
type: string
responses:
'302':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/TestResponse'
I'm using gradle plugin 'org.openapi.generator' version '4.3.1' to auto generate the spring boot REST API
Here is the auto generated code snippet
@ApiResponses(value = {
@ApiResponse(code = 302, message = "successful operation", response = TestResponse.class) })
@RequestMapping(value = "/public/v1/test",
produces = { "application/json" },
method = RequestMethod.POST)
default ResponseEntity<Void> testResponse() {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
but it is generating ResponseEntity<Void>
, I was expecting ResponseEntity<TestResponse>
.
is there way to achieve this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…