Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Latest commit

 

History

History
210 lines (167 loc) · 9.26 KB

File metadata and controls

210 lines (167 loc) · 9.26 KB

ShapeOrNull

org.openapijsonschematools.client.components.schemas.ShapeOrNull.java public class ShapeOrNull

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

Nested Class Summary

Modifier and Type Class and Description
sealed interface ShapeOrNull.ShapeOrNull1Boxed
sealed interface for validated payloads
record ShapeOrNull.ShapeOrNull1BoxedVoid
boxed class to store validated null payloads
record ShapeOrNull.ShapeOrNull1BoxedBoolean
boxed class to store validated boolean payloads
record ShapeOrNull.ShapeOrNull1BoxedNumber
boxed class to store validated Number payloads
record ShapeOrNull.ShapeOrNull1BoxedString
boxed class to store validated String payloads
record ShapeOrNull.ShapeOrNull1BoxedList
boxed class to store validated List payloads
record ShapeOrNull.ShapeOrNull1BoxedMap
boxed class to store validated Map payloads
static class ShapeOrNull.ShapeOrNull1
schema class
sealed interface ShapeOrNull.Schema0Boxed
sealed interface for validated payloads
record ShapeOrNull.Schema0BoxedVoid
boxed class to store validated null payloads
static class ShapeOrNull.Schema0
schema class

ShapeOrNull1Boxed

public sealed interface ShapeOrNull1Boxed
permits
ShapeOrNull1BoxedVoid, ShapeOrNull1BoxedBoolean, ShapeOrNull1BoxedNumber, ShapeOrNull1BoxedString, ShapeOrNull1BoxedList, ShapeOrNull1BoxedMap

sealed interface that stores validated payloads using boxed classes

ShapeOrNull1BoxedVoid

public record ShapeOrNull1BoxedVoid
implements ShapeOrNull1Boxed

record that stores validated null payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ShapeOrNull1BoxedVoid(Void data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Void data()
validated payload
@Nullable Object getData()
validated payload

ShapeOrNull1BoxedBoolean

public record ShapeOrNull1BoxedBoolean
implements ShapeOrNull1Boxed

record that stores validated boolean payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ShapeOrNull1BoxedBoolean(boolean data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
boolean data()
validated payload
@Nullable Object getData()
validated payload

ShapeOrNull1BoxedNumber

public record ShapeOrNull1BoxedNumber
implements ShapeOrNull1Boxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ShapeOrNull1BoxedNumber(Number data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Number data()
validated payload
@Nullable Object getData()
validated payload

ShapeOrNull1BoxedString

public record ShapeOrNull1BoxedString
implements ShapeOrNull1Boxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ShapeOrNull1BoxedString(String data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
String data()
validated payload
@Nullable Object getData()
validated payload

ShapeOrNull1BoxedList

public record ShapeOrNull1BoxedList
implements ShapeOrNull1Boxed

record that stores validated List payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ShapeOrNull1BoxedList(FrozenList<@Nullable Object> data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
FrozenList<@Nullable Object> data()
validated payload
@Nullable Object getData()
validated payload

ShapeOrNull1BoxedMap

public record ShapeOrNull1BoxedMap
implements ShapeOrNull1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ShapeOrNull1BoxedMap(FrozenMap<@Nullable Object> data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
FrozenMap<@Nullable Object> data()
validated payload
@Nullable Object getData()
validated payload

ShapeOrNull1

public static class ShapeOrNull1
extends JsonSchema

A schema class that validates payloads

Description

The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1.

Field Summary

Modifier and Type Field and Description
List<Class<? extends JsonSchema>> oneOf = List.of(
    Schema0.class,
    Triangle.Triangle1.class,
    Quadrilateral.Quadrilateral1.class
))

Method Summary

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)
ShapeOrNull1BoxedString validateAndBox(String arg, SchemaConfiguration configuration)
ShapeOrNull1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration)
ShapeOrNull1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration)
ShapeOrNull1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration)
ShapeOrNull1BoxedMap validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration)
ShapeOrNull1BoxedList validateAndBox(List<?> arg, SchemaConfiguration configuration)
ShapeOrNull1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

Schema0Boxed

public sealed interface Schema0Boxed
permits
Schema0BoxedVoid

sealed interface that stores validated payloads using boxed classes

Schema0BoxedVoid

public record Schema0BoxedVoid
implements Schema0Boxed

record that stores validated null payloads, sealed permits implementation

Constructor Summary

Constructor and Description
Schema0BoxedVoid(Void data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Void data()
validated payload
@Nullable Object getData()
validated payload

Schema0

public static class Schema0
extends NullJsonSchema.NullJsonSchema1

A schema class that validates payloads

Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1
validate
validateAndBox

[Back to top] [Back to Component Schemas] [Back to README]