Annotation Interface JsonSerializableSchema


@Target(TYPE) @Retention(RUNTIME) public @interface JsonSerializableSchema
Annotation that can be used to define JSON Schema definition for the annotated class.

Note that annotation is often not needed: for example, regular Jackson beans that Jackson can introspect can be used without annotations, to produce JSON schema definition.

Author:
Ryan Heaton
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    If the schema type if "array", the node that defines the schema for the items in the array.
    If the schema type is "object", the node that defines the properties of the object.
    The schema type for this JsonSerializable instance.
  • Element Details

    • schemaType

      String schemaType
      The schema type for this JsonSerializable instance. Possible values: "string", "number", "boolean", "object", "array", "null", "any"
      Returns:
      The schema type for this JsonSerializable instance.
      Default:
      "any"
    • schemaObjectPropertiesDefinition

      String schemaObjectPropertiesDefinition
      If the schema type is "object", the node that defines the properties of the object.
      Returns:
      The node representing the schema properties, or "##irrelevant" if irrelevant.
      Default:
      "##irrelevant"
    • schemaItemDefinition

      String schemaItemDefinition
      If the schema type if "array", the node that defines the schema for the items in the array.
      Returns:
      The schema for the items in the array, or "##irrelevant" if irrelevant.
      Default:
      "##irrelevant"