Class OpenAPIUtils

java.lang.Object
org.brapi.schematools.core.utils.OpenAPIUtils

public class OpenAPIUtils extends Object
  • Constructor Details

    • OpenAPIUtils

      public OpenAPIUtils()
  • Method Details

    • prettyPrint

      public static String prettyPrint(io.swagger.v3.oas.models.OpenAPI openAPI) throws com.fasterxml.jackson.core.JsonProcessingException
      Pretty print an OpenAPI object to a JSON String, with a default indentation of 4 spaces.
      Parameters:
      openAPI - the object to be Pretty printed
      Returns:
      Pretty print JSON String version of the object
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - if the object cannot be converted to JSON.
    • prettyPrint

      public static String prettyPrint(io.swagger.v3.oas.models.OpenAPI openAPI, int indent) throws com.fasterxml.jackson.core.JsonProcessingException
      Pretty print an OpenAPI object to a JSON String.
      Parameters:
      openAPI - the object to be Pretty printed
      indent - the number of spaces to indent
      Returns:
      Pretty print JSON String version of the object
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - if the object cannot be converted to JSON.