org.openapijsonschematools.client.components.schemas.SelfReferencingArrayModel.java
public class SelfReferencingArrayModel
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
- classes to store validated list payloads, extends FrozenList
- classes to build inputs for list payloads
| Modifier and Type | Class and Description |
|---|---|
| sealed interface | SelfReferencingArrayModel.SelfReferencingArrayModel1Boxed sealed interface for validated payloads |
| record | SelfReferencingArrayModel.SelfReferencingArrayModel1BoxedList boxed class to store validated List payloads |
| static class | SelfReferencingArrayModel.SelfReferencingArrayModel1 schema class |
| static class | SelfReferencingArrayModel.SelfReferencingArrayModelListBuilder builder for List payloads |
| static class | SelfReferencingArrayModel.SelfReferencingArrayModelList output class for List payloads |
public sealed interface SelfReferencingArrayModel1Boxed
permits
SelfReferencingArrayModel1BoxedList
sealed interface that stores validated payloads using boxed classes
public record SelfReferencingArrayModel1BoxedList
implements SelfReferencingArrayModel1Boxed
record that stores validated List payloads, sealed permits implementation
| Constructor and Description |
|---|
| SelfReferencingArrayModel1BoxedList(SelfReferencingArrayModelList data) Creates an instance, private visibility |
| Modifier and Type | Method and Description |
|---|---|
| SelfReferencingArrayModelList | data() validated payload |
| @Nullable Object | getData() validated payload |
public static class SelfReferencingArrayModel1
extends JsonSchema
A schema class that validates payloads
import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags;
import org.openapijsonschematools.client.configurations.SchemaConfiguration;
import org.openapijsonschematools.client.exceptions.ValidationException;
import org.openapijsonschematools.client.schemas.validation.MapUtils;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import org.openapijsonschematools.client.components.schemas.SelfReferencingArrayModel;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// List validation
SelfReferencingArrayModel.SelfReferencingArrayModelList validatedPayload =
SelfReferencingArrayModel.SelfReferencingArrayModel1.validate(
new SelfReferencingArrayModel.SelfReferencingArrayModelListBuilder()
.build(),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of(List.class) |
| Class<? extends JsonSchema> | items = SelfReferencingArrayModel1.class |
| Modifier and Type | Method and Description |
|---|---|
| SelfReferencingArrayModelList | validate(List<?> arg, SchemaConfiguration configuration) |
| SelfReferencingArrayModel1BoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
| SelfReferencingArrayModel1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class SelfReferencingArrayModelListBuilder
builder for List<List<?>>
A class that builds the List input type
| Constructor and Description |
|---|
| SelfReferencingArrayModelListBuilder() Creates an empty list |
| SelfReferencingArrayModelListBuilder(List<List<?>> items) Stores the items in a list |
| Modifier and Type | Method and Description |
|---|---|
| SelfReferencingArrayModelListBuilder | add(List<?> item) |
| List<List<?>> | build() Returns list input that should be used with Schema.validate |
public class SelfReferencingArrayModelList
extends FrozenList<SelfReferencingArrayModelList>
A class to store validated List payloads
| Modifier and Type | Method and Description |
|---|---|
| static SelfReferencingArrayModelList | of(List<List<?>> arg, SchemaConfiguration configuration) |