Package org.forgerock.api.annotations
Annotation Interface AdditionalProperties
Annotation to define JSON Schema
additionalProperties
, which is useful when working with key/value
JSON data structures.
For example, the following JSON Schema defines a map from string (key) to string (value),
{
"type": "object",
"additionalProperties": {
"type": "string"
}
}
Note that keys are always strings in JSON, so the schema does not define that fact.
The annotation in this example would be used as follows,
@AdditionalProperties(String.class) private static class MyMap extends HashMap<String, String> {}
-
Optional Element Summary
-
Element Details
-
value
Class<?> valueThe type to produce the additional-properties schema from.- Default:
- java.lang.Void.class
-