swagger-ui

Swagger-ui anchor link to model definitions

社会主义新天地 提交于 2020-08-24 06:43:59
问题 Is it possible to access a model definition of via swagger-ui directly via an anchor? In the example page http://petstore.swagger.io/ I see that the anchor works for a groups of endpoints, e.g. http://petstore.swagger.io/#/pet. Hovering the mouse over a model description shows me an anchor (e.g. #/definitions/Category for the Category model), but http://petstore.swagger.io/#/definitions/Category does not bring me there. If I inspect the elements, I see a real link to anchor pet : <a class=

Swagger-ui anchor link to model definitions

浪尽此生 提交于 2020-08-24 06:43:06
问题 Is it possible to access a model definition of via swagger-ui directly via an anchor? In the example page http://petstore.swagger.io/ I see that the anchor works for a groups of endpoints, e.g. http://petstore.swagger.io/#/pet. Hovering the mouse over a model description shows me an anchor (e.g. #/definitions/Category for the Category model), but http://petstore.swagger.io/#/definitions/Category does not bring me there. If I inspect the elements, I see a real link to anchor pet : <a class=

SpringFox - Hide certain fields in Swagger-ui that aren't required for the call to an endpoint

六眼飞鱼酱① 提交于 2020-08-23 07:48:49
问题 I would like to know if there is any way of making SpringFox to not show all the fields of a certain entity that aren't required in the call to an specific endpoint. For example: Having the following entity: public class Car { long id; String name; int wheels; String type; boolean canFly; } And the following endpoints: @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public Car get(@RequestParam(value = "carId", required = true) long projectId) { return