Class Schema

java.lang.Object
software.amazon.smithy.jsonschema.Schema
All Implemented Interfaces:
ToNode, ToSmithyBuilder<Schema>

public final class Schema extends Object implements ToNode, ToSmithyBuilder<Schema>
Defines a single JSON schema.

This supports a subset of the "draft-handrews-json-schema-validation-01" version of JSON Schema. The following properties are not supported:

  • dependencies
  • if
  • then
  • else
  • examples

Custom properties can be added to the scheme using the Schema.Builder.putExtension(java.lang.String, software.amazon.smithy.model.node.ToNode) method. Custom properties are merged with the schema document when serializing it to a Node object. Any extension properties that conflict with built-in properties overwrite the built-in property.

See Also: