org.openapijsonschematools.client.components.schemas.NullableShape.java
public class NullableShape
A class that contains necessary nested
- schema classes (which validate payloads), extends JsonSchema
- sealed interfaces which store validated payloads, java version of a sum type
- boxed classes which store validated payloads, sealed permits class implementations
Modifier and Type | Class and Description |
---|---|
sealed interface | NullableShape.NullableShape1Boxed sealed interface for validated payloads |
record | NullableShape.NullableShape1BoxedVoid boxed class to store validated null payloads |
record | NullableShape.NullableShape1BoxedBoolean boxed class to store validated boolean payloads |
record | NullableShape.NullableShape1BoxedNumber boxed class to store validated Number payloads |
record | NullableShape.NullableShape1BoxedString boxed class to store validated String payloads |
record | NullableShape.NullableShape1BoxedList boxed class to store validated List payloads |
record | NullableShape.NullableShape1BoxedMap boxed class to store validated Map payloads |
static class | NullableShape.NullableShape1 schema class |
sealed interface | NullableShape.Schema2Boxed sealed interface for validated payloads |
record | NullableShape.Schema2BoxedVoid boxed class to store validated null payloads |
static class | NullableShape.Schema2 schema class |
public sealed interface NullableShape1Boxed
permits
NullableShape1BoxedVoid,
NullableShape1BoxedBoolean,
NullableShape1BoxedNumber,
NullableShape1BoxedString,
NullableShape1BoxedList,
NullableShape1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record NullableShape1BoxedVoid
implements NullableShape1Boxed
record that stores validated null payloads, sealed permits implementation
Constructor and Description |
---|
NullableShape1BoxedVoid(Void data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Void | data() validated payload |
@Nullable Object | getData() validated payload |
public record NullableShape1BoxedBoolean
implements NullableShape1Boxed
record that stores validated boolean payloads, sealed permits implementation
Constructor and Description |
---|
NullableShape1BoxedBoolean(boolean data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
boolean | data() validated payload |
@Nullable Object | getData() validated payload |
public record NullableShape1BoxedNumber
implements NullableShape1Boxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
NullableShape1BoxedNumber(Number data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Number | data() validated payload |
@Nullable Object | getData() validated payload |
public record NullableShape1BoxedString
implements NullableShape1Boxed
record that stores validated String payloads, sealed permits implementation
Constructor and Description |
---|
NullableShape1BoxedString(String data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
String | data() validated payload |
@Nullable Object | getData() validated payload |
public record NullableShape1BoxedList
implements NullableShape1Boxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
NullableShape1BoxedList(FrozenList<@Nullable Object> data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
FrozenList<@Nullable Object> | data() validated payload |
@Nullable Object | getData() validated payload |
public record NullableShape1BoxedMap
implements NullableShape1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
NullableShape1BoxedMap(FrozenMap<@Nullable Object> data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
FrozenMap<@Nullable Object> | data() validated payload |
@Nullable Object | getData() validated payload |
public static class NullableShape1
extends JsonSchema
A schema class that validates payloads
The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0)
Modifier and Type | Field and Description |
---|---|
List<Class<? extends JsonSchema>> | oneOf = List.of( Triangle.Triangle1.class, Quadrilateral.Quadrilateral1.class, Schema2.class )) |
Modifier and Type | Method and Description |
---|---|
String | validate(String arg, SchemaConfiguration configuration) |
Void | validate(Void arg, SchemaConfiguration configuration) |
int | validate(int arg, SchemaConfiguration configuration) |
long | validate(long arg, SchemaConfiguration configuration) |
float | validate(float arg, SchemaConfiguration configuration) |
double | validate(double arg, SchemaConfiguration configuration) |
Number | validate(Number arg, SchemaConfiguration configuration) |
boolean | validate(boolean arg, SchemaConfiguration configuration) |
FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
NullableShape1BoxedString | validateAndBox(String arg, SchemaConfiguration configuration) |
NullableShape1BoxedVoid | validateAndBox(Void arg, SchemaConfiguration configuration) |
NullableShape1BoxedNumber | validateAndBox(Number arg, SchemaConfiguration configuration) |
NullableShape1BoxedBoolean | validateAndBox(boolean arg, SchemaConfiguration configuration) |
NullableShape1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
NullableShape1BoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
NullableShape1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public sealed interface Schema2Boxed
permits
Schema2BoxedVoid
sealed interface that stores validated payloads using boxed classes
public record Schema2BoxedVoid
implements Schema2Boxed
record that stores validated null payloads, sealed permits implementation
Constructor and Description |
---|
Schema2BoxedVoid(Void data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Void | data() validated payload |
@Nullable Object | getData() validated payload |
public static class Schema2
extends NullJsonSchema.NullJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 |
---|
validate |
validateAndBox |