Class SchemaDocument.Builder

    • Method Detail

      • idKeyword

        public SchemaDocument.Builder idKeyword​(java.lang.String idKeyword)
        Sets the "$id" keyword.
        Parameters:
        idKeyword - ID keyword URI to set.
        Returns:
        Returns the builder.
      • schemaKeyword

        public SchemaDocument.Builder schemaKeyword​(java.lang.String schemaKeyword)
        Sets the "$schema" keyword.
        Parameters:
        schemaKeyword - Schema keyword URI to set.
        Returns:
        Returns the builder.
      • rootSchema

        public SchemaDocument.Builder rootSchema​(Schema rootSchema)
        Sets the root schema.
        Parameters:
        rootSchema - Root schema of the document.
        Returns:
        Returns the builder.
      • putDefinition

        public SchemaDocument.Builder putDefinition​(java.lang.String name,
                                                    Schema schema)
        Adds a scheme definition to the builder.
        Parameters:
        name - Name of the schema.
        schema - Schema to associate to the name.
        Returns:
        Returns the builder.
      • removeDefinition

        public SchemaDocument.Builder removeDefinition​(java.lang.String name)
        Removes a schema definition by name.
        Parameters:
        name - Name of the schema to remove.
        Returns:
        Returns the builder.
      • extensions

        public SchemaDocument.Builder extensions​(ObjectNode extensions)
        Adds custom key-value pairs to the resulting JSON Schema document.
        Parameters:
        extensions - Extensions to apply.
        Returns:
        Returns the builder.