com.fasterxml.jackson.databind.jsonschema
Annotation Type JsonSerializableSchema


@Target(value=TYPE)
@Retention(value=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, Tatu Saloranta

Optional Element Summary
 String id
          Property that can be used to indicate id of the type when generating JSON Schema; empty String indicates that no id is defined.
 String schemaItemDefinition
          If the schema type if "array", JSON definition of the schema for item types contained.
 String schemaObjectPropertiesDefinition
          If the schema type is "object", JSON definition of properties of the object as a String.
 String schemaType
          The schema type for this JsonSerializable instance.
 

id

public abstract String id
Property that can be used to indicate id of the type when generating JSON Schema; empty String indicates that no id is defined.

Default:
""

schemaType

public abstract 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

public abstract String schemaObjectPropertiesDefinition
If the schema type is "object", JSON definition of properties of the object as a String.

Returns:
The node representing the schema properties, or "##irrelevant" if irrelevant.
Default:
"##irrelevant"

schemaItemDefinition

public abstract String schemaItemDefinition
If the schema type if "array", JSON definition of the schema for item types contained.

Returns:
The schema for the items in the array, or "##irrelevant" if irrelevant.
Default:
"##irrelevant"


Copyright © 2012 fasterxml.com. All Rights Reserved.