org.openapijsonschematools.client.components.schemas.ObjectWithValidations.java
public class ObjectWithValidations
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 | ObjectWithValidations.ObjectWithValidations1Boxed sealed interface for validated payloads |
| record | ObjectWithValidations.ObjectWithValidations1BoxedMap boxed class to store validated Map payloads |
| static class | ObjectWithValidations.ObjectWithValidations1 schema class |
public sealed interface ObjectWithValidations1Boxed
permits
ObjectWithValidations1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record ObjectWithValidations1BoxedMap
implements ObjectWithValidations1Boxed
record that stores validated Map payloads, sealed permits implementation
| Constructor and Description |
|---|
| ObjectWithValidations1BoxedMap(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 ObjectWithValidations1
extends JsonSchema
A schema class that validates payloads
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of(Map.class) |
| Integer | minProperties = 2 |
| Modifier and Type | Method and Description |
|---|---|
| FrozenMap<String, @Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
| ObjectWithValidations1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
| ObjectWithValidations1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |