Class JsonSchema.JsonSchemaProperty
java.lang.Object
org.springframework.data.rest.webmvc.json.JsonSchema.JsonSchemaProperty
- Direct Known Subclasses:
JsonSchema.EnumProperty
- Enclosing class:
- JsonSchema
A JSON Schema property
- Since:
- 2.3
- Author:
- Oliver Gierke
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionTurns the currentJsonSchema.JsonSchemaPropertyinto an association.getName()getTitle()booleanwith(org.springframework.data.util.TypeInformation<?> type) Configures theJsonSchema.JsonSchemaPropertyto reflect the given type.withFormat(JsonSchemaFormat format) Configures the givenJsonSchemaFormatto be exposed on the currentJsonSchema.JsonSchemaProperty.withPattern(Pattern pattern) Configures theJsonSchema.JsonSchemaPropertyto require the givenPattern.protected JsonSchema.JsonSchemaPropertyConfigures theJsonSchema.JsonSchemaPropertyto require the given regular expression as pattern.Configures theJsonSchema.JsonSchemaPropertyto reflect the given type.
-
Field Details
-
description
-
type
-
format
-
pattern
-
uniqueItems
-
reference
-
items
-
-
Method Details
-
withType
Configures theJsonSchema.JsonSchemaPropertyto reflect the given type.- Parameters:
type- must not be null.- Returns:
-
with
Configures theJsonSchema.JsonSchemaPropertyto reflect the given type.- Parameters:
type- must not be null.- Returns:
-
withFormat
Configures the givenJsonSchemaFormatto be exposed on the currentJsonSchema.JsonSchemaProperty.- Parameters:
format- must not be null.- Returns:
-
withRegex
Configures theJsonSchema.JsonSchemaPropertyto require the given regular expression as pattern.- Parameters:
regex- must not be null.- Returns:
-
withPattern
Configures theJsonSchema.JsonSchemaPropertyto require the givenPattern.- Parameters:
pattern- must not be null.- Returns:
-
asAssociation
Turns the currentJsonSchema.JsonSchemaPropertyinto an association.- Returns:
-
getName
-
getTitle
-
isReadOnly
public boolean isReadOnly() -
withReadOnly
-