Skip to content

Commit 1ea38ce

Browse files
committed
Merge branch 'fix/faq-customizer-example' of github.com:youngwonseo/springdoc.github.io into youngwonseo-fix/faq-customizer-example
2 parents caf2a79 + f4e9630 commit 1ea38ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/docs/asciidoc/v1/faq.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,14 @@ springdoc.swagger-ui.path= /swagger-ui/api-docs.html
301301
=== How can I customise the OpenAPI object?
302302
* You can write your own implementation of `OpenApiCustomizer`.
303303
* An example is available on:
304-
** link:https://github.com/springdoc/springdoc-openapi/blob/master/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java[https://github.com/springdoc/springdoc-openapi/blob/master/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java, window="_blank"]
304+
** link:https://github.com/springdoc/springdoc-openapi/blob/main/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app39/SpringDocTestApp.java[https://github.com/springdoc/springdoc-openapi/blob/main/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app39/SpringDocTestApp.java, window="_blank"]
305305

306306
[source,java]
307307
----
308308
@Bean
309-
public OpenApiCustomiser consumerTypeHeaderOpenAPICustomiser() {
310-
return openApi -> openApi.getPaths().values().stream().flatMap(pathItem -> pathItem.readOperations().stream())
311-
.forEach(operation -> operation.addParametersItem(new HeaderParameter().$ref("#/components/parameters/myConsumerTypeHeader")));
309+
public OpenApiCustomizer customerGlobalHeaderOpenApiCustomizer() {
310+
return openApi -> openApi.getPaths().values().stream().flatMap(pathItem -> pathItem.readOperations().stream())
311+
.forEach(operation -> operation.addParametersItem(new HeaderParameter().$ref("#/components/parameters/myGlobalHeader")));
312312
}
313313
----
314314

0 commit comments

Comments
 (0)