Class SchemaSupport

java.lang.Object
io.smallrye.openapi.internal.models.media.SchemaSupport

public final class SchemaSupport extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addTypeObserver(org.eclipse.microprofile.openapi.models.media.Schema observed, org.eclipse.microprofile.openapi.models.media.Schema observer)
     
    static int
    getModCount(org.eclipse.microprofile.openapi.models.media.Schema schema)
     
    static org.eclipse.microprofile.openapi.models.media.Schema.SchemaType
    getNonNullType(org.eclipse.microprofile.openapi.models.media.Schema schema)
    Returns the first Schema.SchemaType that is not Schema.SchemaType.NULL or null if no types are set, or only Schema.SchemaType.NULL is set.
    static Boolean
    getNullable(org.eclipse.microprofile.openapi.models.media.Schema schema)
    Implements the old logic of getNullable().
    static Boolean
    isEmpty(org.eclipse.microprofile.openapi.models.media.Schema schema)
     
    static org.eclipse.microprofile.openapi.models.media.Schema
     
    static void
    setNullable(org.eclipse.microprofile.openapi.models.media.Schema schema, Boolean nullable)
    Implements the old logic of setNullable(Boolean).
    static void
    setType(org.eclipse.microprofile.openapi.models.media.Schema schema, org.eclipse.microprofile.openapi.models.media.Schema.SchemaType singletonType)
    Sets the array of types to a single value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • nullSchema

      public static org.eclipse.microprofile.openapi.models.media.Schema nullSchema()
    • getModCount

      public static int getModCount(org.eclipse.microprofile.openapi.models.media.Schema schema)
    • getNullable

      public static Boolean getNullable(org.eclipse.microprofile.openapi.models.media.Schema schema)
      Implements the old logic of getNullable().

      setType(Schema, SchemaType), setNullable(Schema, Boolean) and getNullable(Schema) can be used together allow the type and nullability of a schema to be set separately by different parts of the scanning process, even though that information is now contained in one field.

    • setNullable

      public static void setNullable(org.eclipse.microprofile.openapi.models.media.Schema schema, Boolean nullable)
      Implements the old logic of setNullable(Boolean).

      setType(Schema, SchemaType), setNullable(Schema, Boolean) and getNullable(Schema) can be used together allow the type and nullability of a schema to be set separately by different parts of the scanning process, even though that information is now contained in one field.

    • setType

      public static void setType(org.eclipse.microprofile.openapi.models.media.Schema schema, org.eclipse.microprofile.openapi.models.media.Schema.SchemaType singletonType)
      Sets the array of types to a single value. Implements the old logic of setType(SchemaType).

      setType(Schema, SchemaType), setNullable(Schema, Boolean) and getNullable(Schema) can be used together allow the type and nullability of a schema to be set separately by different parts of the scanning process, even though that information is now contained in one field.

    • getNonNullType

      public static org.eclipse.microprofile.openapi.models.media.Schema.SchemaType getNonNullType(org.eclipse.microprofile.openapi.models.media.Schema schema)
      Returns the first Schema.SchemaType that is not Schema.SchemaType.NULL or null if no types are set, or only Schema.SchemaType.NULL is set.
    • addTypeObserver

      public static void addTypeObserver(org.eclipse.microprofile.openapi.models.media.Schema observed, org.eclipse.microprofile.openapi.models.media.Schema observer)
    • isEmpty

      public static Boolean isEmpty(org.eclipse.microprofile.openapi.models.media.Schema schema)