Class SchemaParserV30

java.lang.Object
dk.mada.jaxrs.openapi.SchemaParserV30
All Implemented Interfaces:
SchemaParser

public final class SchemaParserV30 extends Object implements SchemaParser
OpenApi V3.0.x parser details. https://spec.openapis.org/oas/v3.0.4.html (or newer from https://spec.openapis.org/)
  • Constructor Details

    • SchemaParserV30

      public SchemaParserV30(io.swagger.v3.oas.models.media.Schema<?> schema)
      Creates new parser instance.
      Parameters:
      schema - the schema to parse
  • Method Details

    • schema

      public io.swagger.v3.oas.models.media.Schema<?> schema()
      Description copied from interface: SchemaParser
      Returns the OpenApi schema this parser operates on.
      Specified by:
      schema in interface SchemaParser
      Returns:
      the OpenApi schema this parser operates on
    • type

      public @Nullable String type()
      Description copied from interface: SchemaParser
      Returns the schema type, or null.
      Specified by:
      type in interface SchemaParser
      Returns:
      the schema type, or null
    • format

      public @Nullable String format()
      Description copied from interface: SchemaParser
      Returns the schema format, or null.
      Specified by:
      format in interface SchemaParser
      Returns:
      the schema format, or null
    • isArray

      public boolean isArray()
      Description copied from interface: SchemaParser
      Returns true if the schema defines an array.
      Specified by:
      isArray in interface SchemaParser
      Returns:
      true if the schema defines an array
    • isAnyOf

      public boolean isAnyOf()
      Description copied from interface: SchemaParser
      Returns true if the schema defines a composition by anyOf.
      Specified by:
      isAnyOf in interface SchemaParser
      Returns:
      true if the schema defines a composition by anyOf
    • isOneOf

      public boolean isOneOf()
      Description copied from interface: SchemaParser
      Returns true if the schema defines a composition by oneOf.
      Specified by:
      isOneOf in interface SchemaParser
      Returns:
      true if the schema defines a composition by oneOf
    • isBinary

      public boolean isBinary()
      Description copied from interface: SchemaParser
      Returns true if the schema is a binary stream of data.
      Specified by:
      isBinary in interface SchemaParser
      Returns:
      true if the schema is a binary stream of data
    • isDate

      public boolean isDate(boolean acceptBrokenType)
      Description copied from interface: SchemaParser
      Returns true if the schema defines a date.
      Specified by:
      isDate in interface SchemaParser
      Parameters:
      acceptBrokenType - if true, allows null/date to be recognized as a date
      Returns:
      true if the schema defines a date
    • isDateTime

      public boolean isDateTime(boolean acceptBrokenType)
      Description copied from interface: SchemaParser
      Returns if the schema defines a date-time.
      Specified by:
      isDateTime in interface SchemaParser
      Parameters:
      acceptBrokenType - if true, allows null/date-time to be recognized as a date-time
      Returns:
      if the schema defines a date-time
    • isMap

      public boolean isMap()
      Description copied from interface: SchemaParser
      Returns true if the schema defines a map.
      Specified by:
      isMap in interface SchemaParser
      Returns:
      true if the schema defines a map
    • isNullable

      public boolean isNullable()
      Description copied from interface: SchemaParser
      Returns true if the type is nullable.
      Specified by:
      isNullable in interface SchemaParser
      Returns:
      true if the type is nullable
    • isNumber

      public boolean isNumber()
      Description copied from interface: SchemaParser
      Returns true if the schema defines a number.
      Specified by:
      isNumber in interface SchemaParser
      Returns:
      true if the schema defines a number
    • isObject

      public boolean isObject()
      Description copied from interface: SchemaParser
      Returns true if the schema defines an object.
      Specified by:
      isObject in interface SchemaParser
      Returns:
      true if the schema defines an object
    • isString

      public boolean isString()
      Description copied from interface: SchemaParser
      Returns true if the schema defines a string.
      Specified by:
      isString in interface SchemaParser
      Returns:
      true if the schema defines a string