private ObjectMapper om(ApiDefinitionType apiDefinitionType) {
        if (apiDefinitionType == ApiDefinitionType.SwaggerJSON) {
            return JSON_OM;
        }
        if (apiDefinitionType == ApiDefinitionType.SwaggerYAML) {
            return YAML_OM;
        }
        throw new IllegalArgumentException("This rewriter only supports SwaggerJSON or SwaggerYAML: " + apiDefinitionType);
    }
Parse and rewrite OpenAPI/Swagger v2 and OpenAPI v3 schemas to point to the Apiman managed gateway endpoints.
<p>
This implementation uses Jackson to parse JSON and YAML representations into the generic {@link JsonNode} structure,
which can be handled by the underlying OAI libraries we use to parse and rewrite the schemas (apicurio-oai-libaries).
<p>
Actual rewriting is dispatched to the specific handlers for that version as they work very differently.

@see OpenApi2 OpenApi v2 and Swagger
@see OpenApi3 OpenApi v3

@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/rest-impl/src/main/java/io/apiman/manager/api/schema/format/OpenApiProvider.java