@Override
	public void customise(OpenAPI openAPI) {
		FilterChainProxy filterChainProxy = applicationContext.getBean(AbstractSecurityWebApplicationInitializer.DEFAULT_FILTER_NAME, FilterChainProxy.class);
		boolean openapi31 = SpecVersion.V31 == openAPI.getSpecVersion();
		for (SecurityFilterChain filterChain : filterChainProxy.getFilterChains()) {
			getNimbusJwkSetEndpoint(openAPI, filterChain, openapi31);
			getOAuth2AuthorizationServerMetadataEndpoint(openAPI, filterChain, openapi31);
			getOAuth2TokenEndpoint(openAPI, filterChain, openapi31);
			getOAuth2AuthorizationEndpoint(openAPI, filterChain, openapi31);
			getOAuth2TokenIntrospectionEndpointFilter(openAPI, filterChain, openapi31);
			getOAuth2TokenRevocationEndpointFilter(openAPI, filterChain, openapi31);
			getOidcProviderConfigurationEndpoint(openAPI, filterChain, openapi31);
			getOidcUserInfoEndpoint(openAPI, filterChain);
			getOidcClientRegistrationEndpoint(openAPI, filterChain, openapi31);
		}
	}
Build o auth 2 error.

@param openAPI      the open api
@param apiResponses the api responses
@param httpStatus   the http status
@param openapi31    the openapi 31
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java