Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.databind.jsonschema;
 
 
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(s):
Ryan Heaton
Tatu Saloranta
public @interface JsonSerializableSchema
{
    
Marker value used to indicate that property has "no value"; needed because annotations can not have null as default value.
    public final static String NO_VALUE = "##irrelevant";

    
Property that can be used to indicate id of the type when generating JSON Schema; empty String indicates that no id is defined.
    public String id() default "";
    
    
The schema type for this JsonSerializable instance. Possible values: "string", "number", "boolean", "object", "array", "null", "any"

Returns:
The schema type for this JsonSerializable instance.
    public String schemaType() default "any";

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

Deprecated:
(since 2.1) -- support will be dropped in future, since JSON-as-String is fundamentally bad way for customizing anything. No direct replacements offered.
Returns:
The node representing the schema properties, or "##irrelevant" if irrelevant.
    @Deprecated
    public String schemaObjectPropertiesDefinition() default ;

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

Deprecated:
(since 2.1) -- support will be dropped in future, since JSON-as-String is fundamentally bad way for customizing anything. No direct replacements offered.
Returns:
The schema for the items in the array, or "##irrelevant" if irrelevant.
    @Deprecated
    public String schemaItemDefinition() default ;
New to GrepCode? Check out our FAQ X