Default response class in springdoc
问题 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 -> {