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

Latest commit

 

History

History
61 lines (48 loc) · 2.8 KB

File metadata and controls

61 lines (48 loc) · 2.8 KB

ObjectWithValidations

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

Nested Class Summary

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

ObjectWithValidations1Boxed

public sealed interface ObjectWithValidations1Boxed
permits
ObjectWithValidations1BoxedMap

sealed interface that stores validated payloads using boxed classes

ObjectWithValidations1BoxedMap

public record ObjectWithValidations1BoxedMap
implements ObjectWithValidations1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ObjectWithValidations1BoxedMap(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

ObjectWithValidations1

public static class ObjectWithValidations1
extends JsonSchema

A schema class that validates payloads

Field Summary

Modifier and Type Field and Description
Set<Class<?>> type = Set.of(Map.class)
Integer minProperties = 2

Method Summary

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)

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