Class JsonSchemaProperty
-
- All Implemented Interfaces:
@Deprecated(forRemoval = true) public class JsonSchemaProperty
Represents a property in a JSON schema.
-
-
Field Summary
Fields Modifier and Type Field Description public final static JsonSchemaPropertySTRINGpublic final static JsonSchemaPropertyINTEGERpublic final static JsonSchemaPropertyNUMBERpublic final static JsonSchemaPropertyOBJECTpublic final static JsonSchemaPropertyARRAYpublic final static JsonSchemaPropertyBOOLEANpublic final static JsonSchemaPropertyNULL
-
Constructor Summary
Constructors Constructor Description JsonSchemaProperty(String key, Object value)Construct a property with key and value.
-
Method Summary
Modifier and Type Method Description Stringkey()Get the key. Objectvalue()Get the value. booleanequals(Object another)inthashCode()StringtoString()static JsonSchemaPropertyfrom(String key, Object value)Construct a property with key and value. static JsonSchemaPropertyproperty(String key, Object value)Construct a property with key and value. static JsonSchemaPropertytype(String value)Construct a property with key "type" and value. static JsonSchemaPropertydescription(String value)Construct a property with key "description" and value. static JsonSchemaPropertyenums(Array<String> enumValues)Construct a property with key "enum" and value enumValues. static JsonSchemaPropertyenums(Array<Object> enumValues)Construct a property with key "enum" and value enumValues. static JsonSchemaPropertyenums(Class<out Object> enumClass)Construct a property with key "enum" and all enum values taken from enumClass. static JsonSchemaPropertyitems(JsonSchemaProperty type)Wraps the given type in a property with key "items". static JsonSchemaPropertyobjectItems(JsonSchemaProperty type)-
-
Method Detail
-
hashCode
int hashCode()
-
from
@Deprecated(forRemoval = true) static JsonSchemaProperty from(String key, Object value)
Construct a property with key and value.
Equivalent to
new JsonSchemaProperty(key, value).- Parameters:
key- the key.value- the value.- Returns:
a property with key and value.
-
property
@Deprecated(forRemoval = true) static JsonSchemaProperty property(String key, Object value)
Construct a property with key and value.
Equivalent to
new JsonSchemaProperty(key, value).- Parameters:
key- the key.value- the value.- Returns:
a property with key and value.
-
type
@Deprecated(forRemoval = true) static JsonSchemaProperty type(String value)
Construct a property with key "type" and value.
Equivalent to
new JsonSchemaProperty("type", value).- Parameters:
value- the value.- Returns:
a property with key and value.
-
description
@Deprecated(forRemoval = true) static JsonSchemaProperty description(String value)
Construct a property with key "description" and value.
Equivalent to
new JsonSchemaProperty("description", value).- Parameters:
value- the value.- Returns:
a property with key and value.
-
enums
@Deprecated(forRemoval = true) static JsonSchemaProperty enums(Array<String> enumValues)
Construct a property with key "enum" and value enumValues.
- Parameters:
enumValues- enum values as strings.- Returns:
a property with key "enum" and value enumValues
-
enums
@Deprecated(forRemoval = true) static JsonSchemaProperty enums(Array<Object> enumValues)
Construct a property with key "enum" and value enumValues.
Verifies that each value is a java class.
- Parameters:
enumValues- enum values.- Returns:
a property with key "enum" and value enumValues
-
enums
@Deprecated(forRemoval = true) static JsonSchemaProperty enums(Class<out Object> enumClass)
Construct a property with key "enum" and all enum values taken from enumClass.
- Parameters:
enumClass- enum class.- Returns:
a property with key "enum" and values taken from enumClass
-
items
@Deprecated(forRemoval = true) static JsonSchemaProperty items(JsonSchemaProperty type)
Wraps the given type in a property with key "items".
- Parameters:
type- the type- Returns:
a property with key "items" and value type.
-
objectItems
@Deprecated(forRemoval = true) static JsonSchemaProperty objectItems(JsonSchemaProperty type)
-
-
-
-