Class SchemaSupport
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddTypeObserver(org.eclipse.microprofile.openapi.models.media.Schema observed, org.eclipse.microprofile.openapi.models.media.Schema observer) static intgetModCount(org.eclipse.microprofile.openapi.models.media.Schema schema) static org.eclipse.microprofile.openapi.models.media.Schema.SchemaTypegetNonNullType(org.eclipse.microprofile.openapi.models.media.Schema schema) Returns the firstSchema.SchemaTypethat is notSchema.SchemaType.NULLornullif no types are set, or onlySchema.SchemaType.NULLis set.static BooleangetNullable(org.eclipse.microprofile.openapi.models.media.Schema schema) Implements the old logic of getNullable().static BooleanisEmpty(org.eclipse.microprofile.openapi.models.media.Schema schema) static org.eclipse.microprofile.openapi.models.media.Schemastatic voidsetNullable(org.eclipse.microprofile.openapi.models.media.Schema schema, Boolean nullable) Implements the old logic of setNullable(Boolean).static voidsetType(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.
-
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
Implements the old logic of getNullable().setType(Schema, SchemaType),setNullable(Schema, Boolean)andgetNullable(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)andgetNullable(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)andgetNullable(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 firstSchema.SchemaTypethat is notSchema.SchemaType.NULLornullif no types are set, or onlySchema.SchemaType.NULLis set. -
addTypeObserver
public static void addTypeObserver(org.eclipse.microprofile.openapi.models.media.Schema observed, org.eclipse.microprofile.openapi.models.media.Schema observer) -
isEmpty
-