|
10 | 10 | /**
|
11 | 11 | * Annotation that can be used to define JSON Schema definition for
|
12 | 12 | * the annotated class.
|
13 |
| - *<p> |
| 13 | + * <p> |
14 | 14 | * Note that annotation is often not needed: for example, regular
|
15 | 15 | * Jackson beans that Jackson can introspect can be used without
|
16 | 16 | * annotations, to produce JSON schema definition.
|
17 |
| - * |
| 17 | + * |
18 | 18 | * @author Ryan Heaton
|
19 | 19 | * @author Tatu Saloranta
|
| 20 | + * @deprecated Since 2.2, we recommend use of external |
| 21 | + * <a href="https://github.com/FasterXML/jackson-module-jsonSchema">JSON Schema generator module</a> |
20 | 22 | */
|
21 | 23 | @Target(ElementType.TYPE)
|
22 | 24 | @Retention(RetentionPolicy.RUNTIME)
|
23 | 25 | @JacksonAnnotation
|
| 26 | +@Deprecated |
24 | 27 | public @interface JsonSerializableSchema
|
25 | 28 | {
|
26 | 29 | /**
|
27 | 30 | * Marker value used to indicate that property has "no value";
|
28 | 31 | * needed because annotations cannot have null as default
|
29 | 32 | * value.
|
30 | 33 | */
|
31 |
| - public final static String NO_VALUE = "##irrelevant"; |
| 34 | + String NO_VALUE = "##irrelevant"; |
32 | 35 |
|
33 | 36 | /**
|
34 | 37 | * Property that can be used to indicate id of the type when
|
35 | 38 | * generating JSON Schema; empty String indicates that no id
|
36 | 39 | * is defined.
|
37 | 40 | */
|
38 |
| - public String id() default ""; |
39 |
| - |
| 41 | + String id() default ""; |
| 42 | + |
40 | 43 | /**
|
41 | 44 | * The schema type for this JsonSerializable instance.
|
42 | 45 | * Possible values: "string", "number", "boolean", "object", "array", "null", "any"
|
43 | 46 | *
|
44 | 47 | * @return The schema type for this JsonSerializable instance.
|
45 | 48 | */
|
46 |
| - public String schemaType() default "any"; |
| 49 | + String schemaType() default "any"; |
47 | 50 |
|
48 | 51 | /**
|
49 | 52 | * If the schema type is "object", JSON definition of properties of the object as
|
50 | 53 | * a String.
|
51 | 54 | *
|
52 | 55 | * @return The node representing the schema properties, or "##irrelevant" if irrelevant.
|
53 |
| - * |
| 56 | + * |
54 | 57 | * @deprecated (since 2.1) -- support will be dropped in future, since JSON-as-String is
|
55 | 58 | * fundamentally bad way for customizing anything. No direct replacements offered.
|
56 | 59 | */
|
57 | 60 | @Deprecated
|
58 |
| - public String schemaObjectPropertiesDefinition() default NO_VALUE; |
| 61 | + String schemaObjectPropertiesDefinition() default NO_VALUE; |
59 | 62 |
|
60 | 63 | /**
|
61 | 64 | * If the schema type if "array", JSON definition of the schema for item types contained.
|
62 | 65 | *
|
63 | 66 | * @return The schema for the items in the array, or "##irrelevant" if irrelevant.
|
64 |
| - * |
| 67 | + * |
65 | 68 | * @deprecated (since 2.1) -- support will be dropped in future, since JSON-as-String is
|
66 | 69 | * fundamentally bad way for customizing anything. No direct replacements offered.
|
67 | 70 | */
|
68 | 71 | @Deprecated
|
69 |
| - public String schemaItemDefinition() default NO_VALUE; |
| 72 | + String schemaItemDefinition() default NO_VALUE; |
70 | 73 | }
|
0 commit comments