class OpenApiModelParser {

    static JsonNode convertToJson(final String specification) throws IOException {
        final JsonNode specRoot;
        if (isJsonSpec(specification)) {
            specRoot = JsonUtils.reader().readTree(specification);
        } else {
            specRoot = JsonUtils.convertValue(YAML_PARSER.load(specification), JsonNode.class);
        }
        return specRoot;
    }

    private  OpenApiModelParser();

}