@Override
	public Resource transform(HttpServletRequest request, Resource resource,
			ResourceTransformerChain transformerChain) throws IOException {
		SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig);
		swaggerWelcomeCommon.buildFromCurrentContextPath(swaggerUiConfigParameters, request);

		final AntPathMatcher antPathMatcher = new AntPathMatcher();
		boolean isIndexFound = antPathMatcher.match("**/swagger-ui/**/" + SWAGGER_INITIALIZER_JS, resource.getURL().toString());

		if (isIndexFound) {
			String html = defaultTransformations(swaggerUiConfigParameters, resource.getInputStream());
			return new TransformedResource(resource, html.getBytes(StandardCharsets.UTF_8));
		}
		else
			return resource;
	}
Instantiates a new Swagger index transformer.

@param swaggerUiConfig          the swagger ui config
@param swaggerUiOAuthProperties the swagger ui o auth properties
@param swaggerWelcomeCommon     the swagger welcome common
@param objectMapperProvider     the object mapper provider
springdoc-openapi-starter-webmvc-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java