Description
Using the SwaggerToOpenApiConversionFilter with JAXRSServerFactoryBean.setExtensionMappings() will stop the filter from executing even if the correct path is called. I think this is caused by the filter calling reqCtx.getUriInfo().getPath() which when extension mapping is enabled, will strip off the .json or any other extensions and then set the path to openapi only, which does not match the hard coded value openapi.json.
Not sure but looks to me that it is probably not a bad idea to strip the extension (i.e. json, yml, yaml etc.) off the path and then compare just openapi.
Basic configuration that should trigger this bug.
@Bean public Server rsServer(JacksonJsonProvider jsonProvider) { JAXRSServerFactoryBean endpoint = new JAXRSServerFactoryBean(); // enable the use of .json, .yaml or .xml extensions on the resource path endpoint.setExtensionMappings(new HashMap<Object, Object>() {{ put("json", "application/json"); put("yml", "application/yaml"); put("yaml", "application/yaml"); put("xml", "application/xml"); }}); endpoint.setProvider(openApiConversionFilter()); ... return endpoint.create(); }