Package io.openapiparser.model.v31
Class Schema
- java.lang.Object
-
- io.openapiparser.Properties
-
- io.openapiparser.model.v31.Schema
-
- All Implemented Interfaces:
Extensions,Reference
public class Schema extends Properties implements Reference, Extensions
the Schema object.See specification: 4.8.24 Schema Object JSON Schema JSON Schema Validation
-
-
Field Summary
-
Fields inherited from class io.openapiparser.Properties
bucket, context
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @Nullable SchemagetAdditionalProperties()JSON Schema: subschemas object keywordjava.util.Collection<Schema>getAllOf()JSON Schema: subschemas logic keywordjava.util.Collection<Schema>getAnyOf()JSON Schema: subschemas logic keyword@Nullable java.lang.StringgetConst()JSON Schema Validation: validation keyword for any instance type@Nullable SchemagetContains()JSON Schema: subschemas array keyword@Nullable java.lang.ObjectgetDefault()JSON Schema Validation: metadatajava.util.Map<java.lang.String,java.util.Set<java.lang.String>>getDependentRequired()JSON Schema Validation: validation Keywords for objectsjava.lang.BooleangetDeprecated()JSON Schema Validation: metadata@Nullable java.lang.StringgetDescription()JSON Schema Validation: metadata@Nullable DiscriminatorgetDiscriminator()OpenAPI base vocabulary@Nullable java.util.Collection<?>getEnum()JSON Schema Validation: validation keyword for any instance type@Nullable java.lang.ObjectgetExample()Deprecated.java.lang.BooleangetExclusiveMaximum()JSON Schema Validation: validation Keywords for numeric instances (number and integer)java.lang.BooleangetExclusiveMinimum()JSON Schema Validation: validation Keywords for numeric instances (number and integer)java.util.Map<java.lang.String,java.lang.Object>getExtensions()todo not required to have x- prefix@Nullable ExternalDocumentationgetExternalDocs()OpenAPI base vocabulary@Nullable java.lang.StringgetFormat()JSON Schema Validation: semantic format@Nullable SchemagetItems()JSON Schema: subschemas array keyword@Nullable java.lang.IntegergetMaxContains()JSON Schema Validation: validation Keywords for arrays@Nullable java.lang.NumbergetMaximum()JSON Schema Validation: validation Keywords for numeric instances (number and integer)@Nullable java.lang.IntegergetMaxItems()JSON Schema Validation: validation Keywords for arrays@Nullable java.lang.NumbergetMaxLength()JSON Schema Validation: validation Keywords for strings@Nullable java.lang.IntegergetMaxProperties()JSON Schema Validation: validation Keywords for objectsjava.lang.IntegergetMinContains()JSON Schema Validation: validation Keywords for arrays@Nullable java.lang.NumbergetMinimum()JSON Schema Validation: validation Keywords for numeric instances (number and integer)java.lang.IntegergetMinItems()JSON Schema Validation: validation Keywords for arrays@Nullable java.lang.NumbergetMinLength()JSON Schema Validation: validation Keywords for stringsjava.lang.IntegergetMinProperties()JSON Schema Validation: validation Keywords for objects@Nullable java.lang.NumbergetMultipleOf()JSON Schema Validation: validation Keywords for numeric instances (number and integer)@Nullable SchemagetNot()JSON Schema: subschemas logic keywordjava.util.Collection<Schema>getOneOf()JSON Schema: subschemas logic keyword@Nullable java.lang.StringgetPattern()JSON Schema Validation: validation Keywords for stringsjava.util.Map<java.lang.String,Schema>getPatternProperties()JSON Schema: subschemas object keywordjava.util.Collection<Schema>getPrefixItems()JSON Schema: subschemas array keywordjava.util.Map<java.lang.String,Schema>getProperties()JSON Schema: subschemas object keyword@Nullable SchemagetPropertyNames()JSON Schema: subschemas object keywordjava.lang.BooleangetReadOnly()JSON Schema Validation: metadatajava.lang.StringgetRef()$ref value.SchemagetRefObject()java.util.Collection<java.lang.String>getRequired()JSON Schema Validation: validation Keywords for objects@Nullable java.lang.StringgetSummary()@Nullable java.lang.StringgetTitle()JSON Schema Validation: metadatajava.util.Collection<java.lang.String>getType()JSON Schema Validation: validation keyword for any instance typejava.lang.BooleangetUniqueItems()JSON Schema Validation: validation Keywords for arraysjava.lang.BooleangetWriteOnly()JSON Schema Validation: metadata@Nullable XmlgetXml()OpenAPI base vocabularybooleanisRef()check if this is a $ref object.-
Methods inherited from class io.openapiparser.Properties
getBooleanOrDefault, getBooleanOrFalse, getBooleanOrNull, getIntegerOrDefault, getIntegerOrNull, getMapObjectsOrEmpty, getMapObjectsOrEmpty, getMapSetStringsOrEmpty, getMapStringsOrEmpty, getNumberOrNull, getObjectOrNull, getObjectOrThrow, getObjectsOrEmpty, getRawValue, getRawValueOf, getRefObject, getRefObjectOrThrow, getStringOrNull, getStringOrThrow, getStringsOrEmpty, getStringsOrNull, getValueOf, hasProperty
-
-
-
-
Constructor Detail
-
Schema
public Schema(Context context, io.openapiprocessor.jsonschema.schema.Bucket bucket)
-
-
Method Detail
-
isRef
public boolean isRef()
Description copied from interface:Referencecheck if this is a $ref object.
-
getRef
public java.lang.String getRef()
Description copied from interface:Reference$ref value. Should be guarded byReference.isRef(). Throws ifReference.isRef()is false.
-
getRefObject
public Schema getRefObject()
-
getSummary
public @Nullable java.lang.String getSummary()
- Specified by:
getSummaryin interfaceReference
-
getDescription
public @Nullable java.lang.String getDescription()
JSON Schema Validation: metadata- Specified by:
getDescriptionin interfaceReference
-
getAllOf
public java.util.Collection<Schema> getAllOf()
JSON Schema: subschemas logic keyword- Returns:
- all of or empty if missing
-
getAnyOf
public java.util.Collection<Schema> getAnyOf()
JSON Schema: subschemas logic keyword- Returns:
- any of or empty if missing
-
getOneOf
public java.util.Collection<Schema> getOneOf()
JSON Schema: subschemas logic keyword- Returns:
- one of or empty if missing
-
getNot
public @Nullable Schema getNot()
JSON Schema: subschemas logic keyword- Returns:
- not or null if missing
-
getPrefixItems
public java.util.Collection<Schema> getPrefixItems()
JSON Schema: subschemas array keyword- Returns:
- prefix items or empty if missing
-
getItems
public @Nullable Schema getItems()
JSON Schema: subschemas array keyword- Returns:
- items or null if missing
-
getContains
public @Nullable Schema getContains()
JSON Schema: subschemas array keyword- Returns:
- contains or null if missing
-
getProperties
public java.util.Map<java.lang.String,Schema> getProperties()
JSON Schema: subschemas object keyword- Returns:
- properties map or empty if missing
-
getPatternProperties
public java.util.Map<java.lang.String,Schema> getPatternProperties()
JSON Schema: subschemas object keyword- Returns:
- pattern properties map, empty if missing
-
getAdditionalProperties
public @Nullable Schema getAdditionalProperties()
JSON Schema: subschemas object keyword- Returns:
- additional properties or null if missing
-
getPropertyNames
public @Nullable Schema getPropertyNames()
JSON Schema: subschemas object keyword- Returns:
- property names or null if missing
-
getType
public java.util.Collection<java.lang.String> getType()
JSON Schema Validation: validation keyword for any instance type- Returns:
- types, throws if empty
-
getEnum
public @Nullable java.util.Collection<?> getEnum()
JSON Schema Validation: validation keyword for any instance type- Returns:
- enum values or empty if missing todo any type
-
getConst
public @Nullable java.lang.String getConst()
JSON Schema Validation: validation keyword for any instance type- Returns:
- const or null if missing
-
getMultipleOf
public @Nullable java.lang.Number getMultipleOf()
JSON Schema Validation: validation Keywords for numeric instances (number and integer)- Returns:
- multiple of or null if missing
-
getMaximum
public @Nullable java.lang.Number getMaximum()
JSON Schema Validation: validation Keywords for numeric instances (number and integer)- Returns:
- maximum or null if missing
-
getExclusiveMaximum
public java.lang.Boolean getExclusiveMaximum()
JSON Schema Validation: validation Keywords for numeric instances (number and integer)- Returns:
- exclusive maximum or false if missing
-
getMinimum
public @Nullable java.lang.Number getMinimum()
JSON Schema Validation: validation Keywords for numeric instances (number and integer)- Returns:
- minimum or null if missing
-
getExclusiveMinimum
public java.lang.Boolean getExclusiveMinimum()
JSON Schema Validation: validation Keywords for numeric instances (number and integer)- Returns:
- exclusive minimum or false if missing
-
getMaxLength
public @Nullable java.lang.Number getMaxLength()
JSON Schema Validation: validation Keywords for strings- Returns:
- max length or null if missing
-
getMinLength
public @Nullable java.lang.Number getMinLength()
JSON Schema Validation: validation Keywords for strings- Returns:
- min length or null if missing
-
getPattern
public @Nullable java.lang.String getPattern()
JSON Schema Validation: validation Keywords for strings- Returns:
- pattern or null if missing
-
getMaxItems
public @Nullable java.lang.Integer getMaxItems()
JSON Schema Validation: validation Keywords for arrays- Returns:
- max items or null if missing
-
getMinItems
public java.lang.Integer getMinItems()
JSON Schema Validation: validation Keywords for arrays- Returns:
- min items or 0 if missing
-
getUniqueItems
public java.lang.Boolean getUniqueItems()
JSON Schema Validation: validation Keywords for arrays- Returns:
- unique items or false if missing
-
getMaxContains
public @Nullable java.lang.Integer getMaxContains()
JSON Schema Validation: validation Keywords for arrays- Returns:
- max contains or null if missing
-
getMinContains
public java.lang.Integer getMinContains()
JSON Schema Validation: validation Keywords for arrays- Returns:
- min contains or 1 if missing
-
getMaxProperties
public @Nullable java.lang.Integer getMaxProperties()
JSON Schema Validation: validation Keywords for objects- Returns:
- max properties or null if missing
-
getMinProperties
public java.lang.Integer getMinProperties()
JSON Schema Validation: validation Keywords for objects- Returns:
- min properties or 0 if missing
-
getRequired
public java.util.Collection<java.lang.String> getRequired()
JSON Schema Validation: validation Keywords for objects- Returns:
- required properties or empty if missing
-
getDependentRequired
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getDependentRequired()
JSON Schema Validation: validation Keywords for objects- Returns:
- dependent required map, may be empty
-
getFormat
public @Nullable java.lang.String getFormat()
JSON Schema Validation: semantic format- Returns:
- format or null if missing
-
getTitle
public @Nullable java.lang.String getTitle()
JSON Schema Validation: metadata- Returns:
- title or null if missing
-
getDefault
public @Nullable java.lang.Object getDefault()
JSON Schema Validation: metadata- Returns:
- default or null
-
getDeprecated
public java.lang.Boolean getDeprecated()
JSON Schema Validation: metadata- Returns:
- true or false
-
getReadOnly
public java.lang.Boolean getReadOnly()
JSON Schema Validation: metadata- Returns:
- true or false
-
getWriteOnly
public java.lang.Boolean getWriteOnly()
JSON Schema Validation: metadata- Returns:
- true or false
-
getDiscriminator
public @Nullable Discriminator getDiscriminator()
OpenAPI base vocabulary- Returns:
- discriminator or null if missing
-
getXml
public @Nullable Xml getXml()
OpenAPI base vocabulary- Returns:
- xml or null if missing
-
getExternalDocs
public @Nullable ExternalDocumentation getExternalDocs()
OpenAPI base vocabulary- Returns:
- external documentation or null if missing
-
getExample
@Deprecated public @Nullable java.lang.Object getExample()
Deprecated.OpenAPI base vocabulary- Returns:
- example or null if missing
-
getExtensions
public java.util.Map<java.lang.String,java.lang.Object> getExtensions()
todo not required to have x- prefix- Specified by:
getExtensionsin interfaceExtensions- Overrides:
getExtensionsin classProperties- Returns:
- map of extension properties
-
-