Class JsonMetaSchema


  • public class JsonMetaSchema
    extends Object
    • Field Detail

      • COMMON_BUILTIN_FORMATS

        public static final List<Format> COMMON_BUILTIN_FORMATS
    • Method Detail

      • builder

        public static JsonMetaSchema.Builder builder​(String uri)
        Builder without keywords or formats.

        Use getV4() for the Draft 4 Metaschema, or if you need a builder based on Draft4, use JsonMetaSchema.builder("http://your-metaschema-uri", JsonSchemaFactory.getDraftV4()).build();

        Parameters:
        uri - the URI of the metaschema that will be defined via this builder.
        Returns:
        a builder instance without any keywords or formats - usually not what one needs.
      • builder

        public static JsonMetaSchema.Builder builder​(String uri,
                                                     JsonMetaSchema blueprint)
        Parameters:
        uri - the URI of your new JsonMetaSchema that will be defined via this builder.
        blueprint - the JsonMetaSchema to base your custom JsonMetaSchema on.
        Returns:
        a builder instance preconfigured to be the same as blueprint, but with a different uri.
      • getIdKeyword

        public String getIdKeyword()
      • readId

        public String readId​(com.fasterxml.jackson.databind.JsonNode schemaNode)
      • readAnchor

        public String readAnchor​(com.fasterxml.jackson.databind.JsonNode schemaNode)
      • getNodeByFragmentRef

        public com.fasterxml.jackson.databind.JsonNode getNodeByFragmentRef​(String ref,
                                                                            com.fasterxml.jackson.databind.JsonNode node)
      • getUri

        public String getUri()