Could something like the following be added to the OpenApi utils as many swaggers use a yaml versus a json from their backend?
Here is an implementation that uses Jackson:
String convertYamlToJson(String yaml) {
ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
Object obj = yamlReader.readValue(yaml, Object.class);
ObjectMapper jsonWriter = new ObjectMapper();
return jsonWriter.writeValueAsString(obj);
}
Could something like the following be added to the OpenApi utils as many swaggers use a yaml versus a json from their backend?
Here is an implementation that uses Jackson: