Class OpenAPISchemaBuilder

java.lang.Object
io.github.microcks.util.openapi.OpenAPISchemaBuilder

public class OpenAPISchemaBuilder extends Object
Helper class for building/inferring a Json Schema from Json node object.
Author:
laurent
  • Field Details

  • Method Details

    • buildTypeSchemaFromJson

      public static com.fasterxml.jackson.databind.JsonNode buildTypeSchemaFromJson(String jsonText) throws IOException
      Build the Json schema for the type corresponding to given Json node provided as string.
      Parameters:
      jsonText - The String representing Json node to introspect for building a Json schema
      Returns:
      A JsonNode representing the Json Schema fragment for this type
      Throws:
      IOException - Tf given Json string cannot be parsed as Json
    • buildTypeSchemaFromJson

      public static com.fasterxml.jackson.databind.JsonNode buildTypeSchemaFromJson(com.fasterxml.jackson.databind.JsonNode node)
      Build the Json schema for the type corresponding to given Json node.
      Parameters:
      node - The Jackson Json node to introspect for building a Json schema
      Returns:
      A JsonNode representing the Json Schema fragment for this type