swagger-maven-plugin
swagger-maven-plugin copied to clipboard
Tags and other information aren't being generated
Steps to reproduce: clone https://github.com/kongchen/swagger-maven-example set version in pom to 3.1.7 (3.1.8 not working because of https://github.com/kongchen/swagger-maven-plugin/issues/729)
Then tags aren't generated
"paths" : {
"/pet" : {
"post" : {
"operationId" : "addPet",
"consumes" : [ "application/json", "application/xml" ],
"produces" : [ "application/json", "application/xml" ],
"responses" : {
"default" : {
"description" : "successful operation"
}
}
},
This is how it looks when I change the version to 3.0.1 (the original version in the example)
"paths" : {
"/pet" : {
"post" : {
"tags" : [ "pet" ],
"summary" : "Add a new pet to the store",
"description" : "",
"operationId" : "addPet",
"consumes" : [ "application/json", "application/xml" ],
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
"description" : "Pet object that needs to be added to the store",
"required" : true,
"schema" : {
"$ref" : "#/definitions/Pet"
}
} ],
"responses" : {
"405" : {
"description" : "Invalid input"
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
},
Is this intended?
Hi , did you find a solution for that @Alddar ?
Same problem: Here is an example of the version generated by springfox and this maven plugin (3.1.8)
- Missing tags
- @RequestBody, must be required
- Missing parameter name: pedido
- Missing consumes: application/json
@RestController
@RequestMapping(value = "/pedido")
public class PedidoController {
@PostMapping
public ResponseEntity<DetailSuccess> salvarPedido(@RequestBody Pedido pedido) throws ParseException {
return ResponseEntity.status(HttpStatus.OK).body(xxx);
}