swagger-parser icon indicating copy to clipboard operation
swagger-parser copied to clipboard

SwaggerParserExtension is not extensible

Open tchegito opened this issue 2 years ago • 0 comments

In the doc, it's written that we can use Java SPI to provide customized extension for SwaggerParserExtension. But when extensions are being read, OpenAPIV3Parser#getExtensions() always add OpenAPIV3Parser in first. So any class that we add in META-INF/services/io.swagger.v3.parser.core.extensions.SwaggerParserExtension will never be used, because default parser return a non null object for a valid JSON. I wanted to use that mechanism in order to mock the parser in an unit test.

tchegito avatar Sep 07 '23 08:09 tchegito