private OpenApiOperation getOpenApiOperation ( String uri , String httpMethod ) throws URISyntaxException { String uriWithoutQuery = new URI ( uri ) . getPath ( ) ; NormalisedPath requestPath = new ApiNormalisedPath ( uriWithoutQuery ) ; Optional < NormalisedPath > maybeApiPath = OpenApiHelper . findMatchingApiPath ( requestPath ) ; if ( ! maybeApiPath . isPresent ( ) ) { return null ; } final NormalisedPath openApiPathString = maybeApiPath . get ( ) ; final Path path = OpenApiHelper . openApi3 . getPath ( openApiPathString . original ( ) ) ; final Operation operation = path . getOperation ( httpMethod ) ; return new OpenApiOperation ( openApiPathString , path , httpMethod , operation ) ; }
locate operation based on uri and httpMethod