private void buildPath(Object oAuth2EndpointFilter, String authorizationEndpointMatcher, OpenAPI openAPI, Operation operation, HttpMethod requestMethod) {
		try {
			RequestMatcher endpointMatcher = (RequestMatcher) FieldUtils.readDeclaredField(oAuth2EndpointFilter, authorizationEndpointMatcher, true);
			String path = null;
			if (endpointMatcher instanceof AntPathRequestMatcher antPathRequestMatcher)
				path = antPathRequestMatcher.getPattern();
			else if (endpointMatcher instanceof OrRequestMatcher endpointMatchers) {
				Iterable<RequestMatcher> requestMatchers = (Iterable<RequestMatcher>) FieldUtils.readDeclaredField(endpointMatchers, "requestMatchers", true);
				for (RequestMatcher requestMatcher : requestMatchers) {
					if (requestMatcher instanceof OrRequestMatcher orRequestMatcher) {
						requestMatchers = (Iterable<RequestMatcher>) FieldUtils.readDeclaredField(orRequestMatcher, "requestMatchers", true);
						for (RequestMatcher matcher : requestMatchers) {
							if (matcher instanceof AntPathRequestMatcher antPathRequestMatcher)
								path = antPathRequestMatcher.getPattern();
						}
					}
					else if (requestMatcher instanceof AntPathRequestMatcher antPathRequestMatcher) {
						path = antPathRequestMatcher.getPattern();
					}
				}
			}

			PathItem pathItem = new PathItem();
			if (HttpMethod.POST.equals(requestMethod)) {
				pathItem.post(operation);
			}
			else if (HttpMethod.GET.equals(requestMethod)) {
				pathItem.get(operation);
			}
			openAPI.getPaths().addPathItem(path, pathItem);
		}
		catch (IllegalAccessException | ClassCastException ignored) {
			LOGGER.trace(ignored.getMessage());
		}
	}
Build path.

@param oAuth2EndpointFilter         the o auth 2 endpoint filter
@param authorizationEndpointMatcher the authorization endpoint matcher
@param openAPI                      the open api
@param operation                    the operation
@param requestMethod                the request method
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocSecurityOAuth2Customizer.java