springdoc-openapi-ui

SpringDoc/Swagger behind an nginx proxy

只愿长相守 提交于 2021-02-11 12:59:01
问题 We are running a service behind an nginx proxy so that: http://service-post:8080/swagger-ui.html is routed to public address https://host.com/services/post/swagger-ui.html Or to define from the other way: When nginx receives request on https://host.com/services/post/swagger-ui.html , it strips the /services/post/ prefix and passes the request to the post service on /swagger-ui.html path. Before setting up anything (with default SpringDoc configuration) I can correctly see the swagger docs on

Default response class in springdoc

99封情书 提交于 2020-08-23 04:03:22
问题 I am trying to add a default error model to all endpoints in my API, for some error codes. I found a partial solution by reading the following issues: Springfox -> Springdoc: How to expose additional models https://github.com/springdoc/springdoc-openapi/issues/381 This is the bean I am creating for that customisation: @Bean public OpenApiCustomiser customOpenApiCustomiser() { return openApi -> { openApi.getPaths().values().forEach(pathItem -> pathItem.readOperations().forEach(operation -> {