Class Schema

    • Constructor Detail

      • Schema

        public Schema​(Context context,
                      io.openapiprocessor.jsonschema.schema.Bucket bucket)
    • Method Detail

      • isRef

        public boolean isRef()
        Description copied from interface: Reference
        check if this is a $ref object.
        Specified by:
        isRef in interface Reference
        Returns:
        true if $ref else false.
      • getRefObject

        public Schema getRefObject()
      • getSummary

        public @Nullable java.lang.String getSummary()
        Specified by:
        getSummary in interface Reference
      • getDescription

        public @Nullable java.lang.String getDescription()
        JSON Schema Validation: metadata
        Specified by:
        getDescription in interface Reference
      • 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:
        getExtensions in interface Extensions
        Overrides:
        getExtensions in class Properties
        Returns:
        map of extension properties