Class JsonSchemaRef
An instance of this object is equivalent to calling...
JsonSchema
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.bean.jsonschema.JsonSchema
JsonSchema.BooleanOrSchemaArraySwap, JsonSchema.BooleanOrSchemaSwap, JsonSchema.JsonSchemaOrSchemaArraySwap, JsonSchema.JsonTypeOrJsonTypeArraySwap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalItems(JsonSchema... additionalItems) Bean property appender:additionalItems .addAllOf(JsonSchema... allOf) Bean property appender:allOf .addAnyOf(JsonSchema... anyOf) Bean property appender:anyOf .addDef(String name, JsonSchema def) Bean property appender:$defs .addDefinition(String name, JsonSchema definition) Bean property appender:definitions .addDependency(String name, JsonSchema dependency) Bean property appender:dependencies .addDependentRequired(String name, List<String> required) Bean property appender:dependentRequired .addDependentSchema(String name, JsonSchema schema) Bean property appender:dependentSchemas .Bean property appender:enum .addExamples(Object... examples) Bean property appender:examples .addItems(JsonSchema... items) Bean property appender:items .addOneOf(JsonSchema... oneOf) Bean property appender:oneOf .addPatternProperties(JsonSchemaProperty... properties) Bean property appender:patternProperties .addPrefixItems(JsonSchema... prefixItems) Bean property appender:prefixItems .addProperties(JsonSchema... properties) Bean property appender:properties .addRequired(String... required) Bean property appender:required .addRequired(List<String> required) Bean property appender:required .addRequired(JsonSchemaProperty... properties) Bean property appender:required .Bean property appender:type .getNot()Bean property getter:not .Bean property getter:unevaluatedItems .resolve()Resolve schema if reference.setAllOf(List<JsonSchema> allOf) Bean property setter:allOf .setAnyOf(List<JsonSchema> anyOf) Bean property setter:anyOf .Bean property setter:const .setContentEncoding(String contentEncoding) Bean property setter:contentEncoding .setContentMediaType(String contentMediaType) Bean property setter:contentMediaType .setDefinitions(Map<String, JsonSchema> definitions) Bean property setter:definitions .setDependencies(Map<String, JsonSchema> dependencies) Bean property setter:dependencies .setDependentRequired(Map<String, List<String>> dependentRequired) Bean property setter:dependentRequired .setDependentSchemas(Map<String, JsonSchema> dependentSchemas) Bean property setter:dependentSchemas .setDescription(String description) Bean property setter:description .Bean property setter:enum .setExamples(List<Object> examples) Bean property setter:examples .setExclusiveMaximum(Number exclusiveMaximum) Bean property setter:exclusiveMaximum .setExclusiveMinimum(Number exclusiveMinimum) Bean property setter:exclusiveMinimum .Bean property setter:id .setMaximum(Number maximum) Bean property setter:maximum .setMaxItems(Integer maxItems) Bean property setter:maxItems .setMaxLength(Integer maxLength) Bean property setter:maxLength .setMaxProperties(Integer maxProperties) Bean property setter:maxProperties .setMinimum(Number minimum) Bean property setter:minimum .setMinItems(Integer minItems) Bean property setter:minItems .setMinLength(Integer minLength) Bean property setter:minLength .setMinProperties(Integer minProperties) Bean property setter:minProperties .setMultipleOf(Number multipleOf) Bean property setter:multipleOf .Bean property setter:name .setNot(JsonSchema not) Bean property setter:not .setOneOf(List<JsonSchema> oneOf) Bean property setter:oneOf .setPattern(String pattern) Bean property setter:pattern .setPatternProperties(Map<String, JsonSchema> patternProperties) Bean property setter:patternProperties .setPrefixItems(JsonSchemaArray prefixItems) Bean property setter:prefixItems .setProperties(Map<String, JsonSchema> properties) Bean property setter:properties .setReadOnly(Boolean readOnly) Bean property setter:readOnly .setRequired(List<String> required) Bean property setter:required .setSchemaMap(JsonSchemaMap schemaMap) Associates a schema map with this schema for resolving other schemas identified through$ref properties.Bean property setter:title .Bean property setter:type .setUnevaluatedItems(JsonSchema unevaluatedItems) Bean property setter:unevaluatedItems .setUnevaluatedProperties(JsonSchema unevaluatedProperties) Bean property setter:unevaluatedProperties .setUniqueItems(Boolean uniqueItems) Bean property setter:uniqueItems .setWriteOnly(Boolean writeOnly) Bean property setter:writeOnly .Methods inherited from class org.apache.juneau.bean.jsonschema.JsonSchema
getAdditionalItems, getAdditionalItemsAsBoolean, getAdditionalItemsAsSchemaArray, getAdditionalProperties, getAdditionalPropertiesAsBoolean, getAdditionalPropertiesAsSchema, getAllOf, getAnyOf, getConst, getContentEncoding, getContentMediaType, getDefinitions, getDefs, getDependencies, getDependentRequired, getDependentSchemas, getDescription, getElse, getEnum, getExamples, getExclusiveMaximum, getExclusiveMinimum, getId, getIdUri, getIf, getItems, getItemsAsSchema, getItemsAsSchemaArray, getMaximum, getMaxItems, getMaxLength, getMaxProperties, getMinimum, getMinItems, getMinLength, getMinProperties, getMultipleOf, getName, getOneOf, getPattern, getPatternProperties, getPrefixItems, getProperties, getProperty, getProperty, getReadOnly, getRef, getRequired, getSchemaVersionUri, getThen, getTitle, getType, getTypeAsJsonType, getTypeAsJsonTypeArray, getUnevaluatedProperties, getUniqueItems, getWriteOnly, setAdditionalItems, setAdditionalProperties, setDefs, setElse, setIdUri, setIf, setItems, setMaster, setRef, setSchemaVersionUri, setThen, toString
-
Constructor Details
-
JsonSchemaRef
Constructor.The value can be of any of the following types:
URI,URL,String. Strings must be valid URIs.URIs defined by
UriResolvercan be used for values.- Parameters:
uri- The URI of the target reference. Can benull .
-
-
Method Details
-
addAdditionalItems
Description copied from class:JsonSchemaBean property appender:additionalItems .- Overrides:
addAdditionalItemsin classJsonSchema- Parameters:
additionalItems- The list of items to append to theadditionalItems property on this bean.- Returns:
- This object.
-
addAllOf
Description copied from class:JsonSchemaBean property appender:allOf .- Overrides:
addAllOfin classJsonSchema- Parameters:
allOf- The list of items to append to theallOf property on this bean.- Returns:
- This object.
-
addAnyOf
Description copied from class:JsonSchemaBean property appender:anyOf .- Overrides:
addAnyOfin classJsonSchema- Parameters:
anyOf- The list of items to append to theanyOf property on this bean.- Returns:
- This object.
-
addDef
Description copied from class:JsonSchemaBean property appender:$defs .- Overrides:
addDefin classJsonSchema- Parameters:
name- The key in the defs map entry.def- The value in the defs map entry.- Returns:
- This object.
-
addDefinition
Description copied from class:JsonSchemaBean property appender:definitions .- Overrides:
addDefinitionin classJsonSchema- Parameters:
name- The key in the definitions map entry.definition- The value in the definitions map entry.- Returns:
- This object.
-
addDependency
Description copied from class:JsonSchemaBean property appender:dependencies .- Overrides:
addDependencyin classJsonSchema- Parameters:
name- The key of the entry in the dependencies map.dependency- The value of the entry in the dependencies map.- Returns:
- This object.
-
addDependentRequired
Description copied from class:JsonSchemaBean property appender:dependentRequired .- Overrides:
addDependentRequiredin classJsonSchema- Parameters:
name- The key of the entry in the dependentRequired map.required- The value of the entry in the dependentRequired map.- Returns:
- This object.
-
addDependentSchema
Description copied from class:JsonSchemaBean property appender:dependentSchemas .- Overrides:
addDependentSchemain classJsonSchema- Parameters:
name- The key of the entry in the dependentSchemas map.schema- The value of the entry in the dependentSchemas map.- Returns:
- This object.
-
addEnum
Description copied from class:JsonSchemaBean property appender:enum .- Overrides:
addEnumin classJsonSchema- Parameters:
enum_- The list of items to append to theenum property on this bean.- Returns:
- This object.
-
addExamples
Description copied from class:JsonSchemaBean property appender:examples .- Overrides:
addExamplesin classJsonSchema- Parameters:
examples- The list of items to append to theexamples property on this bean.- Returns:
- This object.
-
addItems
Description copied from class:JsonSchemaBean property appender:items .- Overrides:
addItemsin classJsonSchema- Parameters:
items- The list of items to append to theitems property on this bean.- Returns:
- This object.
-
addOneOf
Description copied from class:JsonSchemaBean property appender:oneOf .- Overrides:
addOneOfin classJsonSchema- Parameters:
oneOf- The list of items to append to theoneOf property on this bean.- Returns:
- This object.
-
addPatternProperties
Description copied from class:JsonSchemaBean property appender:patternProperties .Properties must have their
name property set to the pattern string when using this method.- Overrides:
addPatternPropertiesin classJsonSchema- Parameters:
properties- The list of items to append to thepatternProperties property on this bean.- Returns:
- This object.
-
addPrefixItems
Description copied from class:JsonSchemaBean property appender:prefixItems .- Overrides:
addPrefixItemsin classJsonSchema- Parameters:
prefixItems- The list of items to append to theprefixItems property on this bean.- Returns:
- This object.
-
addProperties
Description copied from class:JsonSchemaBean property appender:properties .Properties must have their
name property set on them when using this method.- Overrides:
addPropertiesin classJsonSchema- Parameters:
properties- The list of items to append to theproperties property on this bean.- Returns:
- This object.
-
addRequired
Description copied from class:JsonSchemaBean property appender:required .- Overrides:
addRequiredin classJsonSchema- Parameters:
properties- The list of items to append to therequired property on this bean.- Returns:
- This object.
-
addRequired
Description copied from class:JsonSchemaBean property appender:required .- Overrides:
addRequiredin classJsonSchema- Parameters:
required- The list of items to append to therequired property on this bean.- Returns:
- This object.
-
addRequired
Description copied from class:JsonSchemaBean property appender:required .- Overrides:
addRequiredin classJsonSchema- Parameters:
required- The list of items to append to therequired property on this bean.- Returns:
- This object.
-
addTypes
Description copied from class:JsonSchemaBean property appender:type .- Overrides:
addTypesin classJsonSchema- Parameters:
types- The list of items to append to thetype property on this bean.- Returns:
- This object.
-
getNot
Description copied from class:JsonSchemaBean property getter:not .- Overrides:
getNotin classJsonSchema- Returns:
- The value of the
not property on this bean, ornull if it is not set.
-
getUnevaluatedItems
Description copied from class:JsonSchemaBean property getter:unevaluatedItems .This property was added in Draft 2019-09.
- Overrides:
getUnevaluatedItemsin classJsonSchema- Returns:
- The value of the
unevaluatedItems property on this bean, ornull if it is not set.
-
resolve
Description copied from class:JsonSchemaResolve schema if reference.If this schema is a reference to another schema (has its
$ref property set), this method will retrieve the referenced schema from the schema map registered with this schema.If this schema is not a reference, or no schema map is registered with this schema, this method is a no-op and simply returns this object.
- Overrides:
resolvein classJsonSchema- Returns:
- The referenced schema, or
null .
-
setAllOf
Description copied from class:JsonSchemaBean property setter:allOf .- Overrides:
setAllOfin classJsonSchema- Parameters:
allOf- The new value for theallOf property on this bean.- Returns:
- This object.
-
setAnyOf
Description copied from class:JsonSchemaBean property setter:anyOf .- Overrides:
setAnyOfin classJsonSchema- Parameters:
anyOf- The new value of theanyOf property on this bean.- Returns:
- This object.
-
setConst
Description copied from class:JsonSchemaBean property setter:const .This property was added in Draft 06.
- Overrides:
setConstin classJsonSchema- Parameters:
const_- The new value for theconst property on this bean.- Returns:
- This object.
-
setContentEncoding
Description copied from class:JsonSchemaBean property setter:contentEncoding .This property was added in Draft 07.
- Overrides:
setContentEncodingin classJsonSchema- Parameters:
contentEncoding- The new value for thecontentEncoding property on this bean.- Returns:
- This object.
-
setContentMediaType
Description copied from class:JsonSchemaBean property setter:contentMediaType .This property was added in Draft 07.
- Overrides:
setContentMediaTypein classJsonSchema- Parameters:
contentMediaType- The new value for thecontentMediaType property on this bean.- Returns:
- This object.
-
setDefinitions
Description copied from class:JsonSchemaBean property setter:definitions .- Overrides:
setDefinitionsin classJsonSchema- Parameters:
definitions- The new value for thedefinitions property on this bean.- Returns:
- This object.
-
setDependencies
Description copied from class:JsonSchemaBean property setter:dependencies .- Overrides:
setDependenciesin classJsonSchema- Parameters:
dependencies- The new value for thedependencies property on this bean.- Returns:
- This object.
-
setDependentRequired
Description copied from class:JsonSchemaBean property setter:dependentRequired .This property was added in Draft 2019-09 as a replacement for the array form of
dependencies .- Overrides:
setDependentRequiredin classJsonSchema- Parameters:
dependentRequired- The new value for thedependentRequired property on this bean.- Returns:
- This object.
-
setDependentSchemas
Description copied from class:JsonSchemaBean property setter:dependentSchemas .This property was added in Draft 2019-09 as a replacement for the schema form of
dependencies .- Overrides:
setDependentSchemasin classJsonSchema- Parameters:
dependentSchemas- The new value for thedependentSchemas property on this bean.- Returns:
- This object.
-
setDescription
Description copied from class:JsonSchemaBean property setter:description .- Overrides:
setDescriptionin classJsonSchema- Parameters:
description- The new value for thedescription property on this bean.- Returns:
- This object.
-
setEnum
Description copied from class:JsonSchemaBean property setter:enum .- Overrides:
setEnumin classJsonSchema- Parameters:
enum_- The new value for theenum property on this bean.- Returns:
- This object.
-
setExamples
Description copied from class:JsonSchemaBean property setter:examples .This property was added in Draft 06.
- Overrides:
setExamplesin classJsonSchema- Parameters:
examples- The new value for theexamples property on this bean.- Returns:
- This object.
-
setExclusiveMaximum
Description copied from class:JsonSchemaBean property setter:exclusiveMaximum .In Draft 06+, this is a numeric value representing the exclusive upper bound. In Draft 04, this was a boolean flag. This implementation uses the Draft 06+ semantics.
- Overrides:
setExclusiveMaximumin classJsonSchema- Parameters:
exclusiveMaximum- The new value for theexclusiveMaximum property on this bean.- Returns:
- This object.
-
setExclusiveMinimum
Description copied from class:JsonSchemaBean property setter:exclusiveMinimum .In Draft 06+, this is a numeric value representing the exclusive lower bound. In Draft 04, this was a boolean flag. This implementation uses the Draft 06+ semantics.
- Overrides:
setExclusiveMinimumin classJsonSchema- Parameters:
exclusiveMinimum- The new value for theexclusiveMinimum property on this bean.- Returns:
- This object.
-
setId
Description copied from class:JsonSchemaBean property setter:id .Deprecated: Use
JsonSchema.setIdUri(Object)instead. This property is retained for Draft 04 backward compatibility.The value can be of any of the following types:
URI,URL,String. Strings must be valid URIs.URIs defined by
UriResolvercan be used for values.- Overrides:
setIdin classJsonSchema- Parameters:
id- The new value for theid property on this bean.- Returns:
- This object.
-
setMaximum
Description copied from class:JsonSchemaBean property setter:maximum .- Overrides:
setMaximumin classJsonSchema- Parameters:
maximum- The new value for themaximum property on this bean.- Returns:
- This object.
-
setMaxItems
Description copied from class:JsonSchemaBean property setter:maxItems .- Overrides:
setMaxItemsin classJsonSchema- Parameters:
maxItems- The new value for themaxItems property on this bean.- Returns:
- This object.
-
setMaxLength
Description copied from class:JsonSchemaBean property setter:maxLength .- Overrides:
setMaxLengthin classJsonSchema- Parameters:
maxLength- The new value for themaxLength property on this bean.- Returns:
- This object.
-
setMaxProperties
Description copied from class:JsonSchemaBean property setter:maxProperties .- Overrides:
setMaxPropertiesin classJsonSchema- Parameters:
maxProperties- The new value for themaxProperties property on this bean.- Returns:
- This object.
-
setMinimum
Description copied from class:JsonSchemaBean property setter:minimum .- Overrides:
setMinimumin classJsonSchema- Parameters:
minimum- The new value for theminimum property on this bean.- Returns:
- This object.
-
setMinItems
Description copied from class:JsonSchemaBean property setter:minItems .- Overrides:
setMinItemsin classJsonSchema- Parameters:
minItems- The new value for theminItems property on this bean.- Returns:
- This object.
-
setMinLength
Description copied from class:JsonSchemaBean property setter:minLength .- Overrides:
setMinLengthin classJsonSchema- Parameters:
minLength- The new value for theminLength property on this bean.- Returns:
- This object.
-
setMinProperties
Description copied from class:JsonSchemaBean property setter:minProperties .- Overrides:
setMinPropertiesin classJsonSchema- Parameters:
minProperties- The new value for theminProperties property on this bean.- Returns:
- This object.
-
setMultipleOf
Description copied from class:JsonSchemaBean property setter:multipleOf .- Overrides:
setMultipleOfin classJsonSchema- Parameters:
multipleOf- The new value for themultipleOf property on this bean.- Returns:
- This object.
-
setName
Description copied from class:JsonSchemaBean property setter:name .This is an internal property used for tracking property names and is not part of the JSON Schema specification.
- Overrides:
setNamein classJsonSchema- Parameters:
name- The new value for thename property on this bean.- Returns:
- This object.
-
setNot
Description copied from class:JsonSchemaBean property setter:not .- Overrides:
setNotin classJsonSchema- Parameters:
not- The new value for thenot property on this bean.- Returns:
- This object.
-
setOneOf
Description copied from class:JsonSchemaBean property setter:oneOf .- Overrides:
setOneOfin classJsonSchema- Parameters:
oneOf- The new value for theoneOf property on this bean.- Returns:
- This object.
-
setPattern
Description copied from class:JsonSchemaBean property setter:pattern .- Overrides:
setPatternin classJsonSchema- Parameters:
pattern- The new value for thepattern property on this bean.- Returns:
- This object.
-
setPatternProperties
Description copied from class:JsonSchemaBean property setter:patternProperties .- Overrides:
setPatternPropertiesin classJsonSchema- Parameters:
patternProperties- The new value for thepatternProperties property on this bean.- Returns:
- This object.
-
setPrefixItems
Description copied from class:JsonSchemaBean property setter:prefixItems .This property was added in Draft 2020-12 for tuple validation.
- Overrides:
setPrefixItemsin classJsonSchema- Parameters:
prefixItems- The new value for theprefixItems property on this bean.- Returns:
- This object.
-
setProperties
Description copied from class:JsonSchemaBean property setter:properties .- Overrides:
setPropertiesin classJsonSchema- Parameters:
properties- The new value for theproperties property on this bean.- Returns:
- This object.
-
setReadOnly
Description copied from class:JsonSchemaBean property setter:readOnly .This property was added in Draft 07.
- Overrides:
setReadOnlyin classJsonSchema- Parameters:
readOnly- The new value for thereadOnly property on this bean.- Returns:
- This object.
-
setRequired
Description copied from class:JsonSchemaBean property setter:required .- Overrides:
setRequiredin classJsonSchema- Parameters:
required- The new value for therequired property on this bean.- Returns:
- This object.
-
setSchemaMap
Description copied from class:JsonSchemaAssociates a schema map with this schema for resolving other schemas identified through$ref properties.- Overrides:
setSchemaMapin classJsonSchema- Parameters:
schemaMap- The schema map to associate with this schema. Can benull .- Returns:
- This object.
-
setTitle
Description copied from class:JsonSchemaBean property setter:title .- Overrides:
setTitlein classJsonSchema- Parameters:
title- The new value for thetitle property on this bean.- Returns:
- This object.
-
setType
Description copied from class:JsonSchemaBean property setter:type .- Overrides:
setTypein classJsonSchema- Parameters:
type- The new value for thetype property on this bean. This object must be of typeJsonTypeorJsonTypeArray.- Returns:
- This object.
-
setUnevaluatedItems
Description copied from class:JsonSchemaBean property setter:unevaluatedItems .This property was added in Draft 2019-09.
- Overrides:
setUnevaluatedItemsin classJsonSchema- Parameters:
unevaluatedItems- The new value for theunevaluatedItems property on this bean.- Returns:
- This object.
-
setUnevaluatedProperties
Description copied from class:JsonSchemaBean property setter:unevaluatedProperties .This property was added in Draft 2019-09.
- Overrides:
setUnevaluatedPropertiesin classJsonSchema- Parameters:
unevaluatedProperties- The new value for theunevaluatedProperties property on this bean.- Returns:
- This object.
-
setUniqueItems
Description copied from class:JsonSchemaBean property setter:uniqueItems .- Overrides:
setUniqueItemsin classJsonSchema- Parameters:
uniqueItems- The new value for theuniqueItems property on this bean.- Returns:
- This object.
-
setWriteOnly
Description copied from class:JsonSchemaBean property setter:writeOnly .This property was added in Draft 07.
- Overrides:
setWriteOnlyin classJsonSchema- Parameters:
writeOnly- The new value for thewriteOnly property on this bean.- Returns:
- This object.
-