org.openapijsonschematools.client.components.schemas.ArrayTest.java
public class ArrayTest
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
- classes to store validated map payloads, extends FrozenMap
- classes to build inputs for map payloads
Modifier and Type | Class and Description |
---|---|
sealed interface | ArrayTest.ArrayTest1Boxed sealed interface for validated payloads |
record | ArrayTest.ArrayTest1BoxedMap boxed class to store validated Map payloads |
static class | ArrayTest.ArrayTest1 schema class |
static class | ArrayTest.ArrayTestMapBuilder builder for Map payloads |
static class | ArrayTest.ArrayTestMap output class for Map payloads |
sealed interface | ArrayTest.ArrayArrayOfModelBoxed sealed interface for validated payloads |
record | ArrayTest.ArrayArrayOfModelBoxedList boxed class to store validated List payloads |
static class | ArrayTest.ArrayArrayOfModel schema class |
static class | ArrayTest.ArrayArrayOfModelListBuilder builder for List payloads |
static class | ArrayTest.ArrayArrayOfModelList output class for List payloads |
sealed interface | ArrayTest.Items3Boxed sealed interface for validated payloads |
record | ArrayTest.Items3BoxedList boxed class to store validated List payloads |
static class | ArrayTest.Items3 schema class |
static class | ArrayTest.ItemsListBuilder1 builder for List payloads |
static class | ArrayTest.ItemsList1 output class for List payloads |
sealed interface | ArrayTest.ArrayArrayOfIntegerBoxed sealed interface for validated payloads |
record | ArrayTest.ArrayArrayOfIntegerBoxedList boxed class to store validated List payloads |
static class | ArrayTest.ArrayArrayOfInteger schema class |
static class | ArrayTest.ArrayArrayOfIntegerListBuilder builder for List payloads |
static class | ArrayTest.ArrayArrayOfIntegerList output class for List payloads |
sealed interface | ArrayTest.Items1Boxed sealed interface for validated payloads |
record | ArrayTest.Items1BoxedList boxed class to store validated List payloads |
static class | ArrayTest.Items1 schema class |
static class | ArrayTest.ItemsListBuilder builder for List payloads |
static class | ArrayTest.ItemsList output class for List payloads |
sealed interface | ArrayTest.Items2Boxed sealed interface for validated payloads |
record | ArrayTest.Items2BoxedNumber boxed class to store validated Number payloads |
static class | ArrayTest.Items2 schema class |
sealed interface | ArrayTest.ArrayOfStringBoxed sealed interface for validated payloads |
record | ArrayTest.ArrayOfStringBoxedList boxed class to store validated List payloads |
static class | ArrayTest.ArrayOfString schema class |
static class | ArrayTest.ArrayOfStringListBuilder builder for List payloads |
static class | ArrayTest.ArrayOfStringList output class for List payloads |
sealed interface | ArrayTest.ItemsBoxed sealed interface for validated payloads |
record | ArrayTest.ItemsBoxedString boxed class to store validated String payloads |
static class | ArrayTest.Items schema class |
public sealed interface ArrayTest1Boxed
permits
ArrayTest1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record ArrayTest1BoxedMap
implements ArrayTest1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
ArrayTest1BoxedMap(ArrayTestMap data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ArrayTestMap | data() validated payload |
@Nullable Object | getData() validated payload |
public static class ArrayTest1
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.ArrayTest;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// Map validation
ArrayTest.ArrayTestMap validatedPayload =
ArrayTest.ArrayTest1.validate(
new ArrayTest.ArrayTestMapBuilder()
.array_of_string(
Arrays.asList(
"a"
)
)
.array_array_of_integer(
Arrays.asList(
Arrays.asList(
1L
)
)
)
.array_array_of_model(
Arrays.asList(
Arrays.asList(
MapUtils.makeMap(
new AbstractMap.SimpleEntry<String, String>(
"bar",
"a"
),
new AbstractMap.SimpleEntry<String, String>(
"baz",
"a"
)
)
)
)
)
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(Map.class) |
Map<String, Class<? extends JsonSchema>> | properties = Map.ofEntries( new PropertyEntry("array_of_string", ArrayOfString.class)), new PropertyEntry("array_array_of_integer", ArrayArrayOfInteger.class)), new PropertyEntry("array_array_of_model", ArrayArrayOfModel.class)) ) |
Modifier and Type | Method and Description |
---|---|
ArrayTestMap | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
ArrayTest1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
ArrayTest1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ArrayTestMapBuilder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
Constructor and Description |
---|
ArrayTestMapBuilder() Creates a builder that contains an empty map |
Modifier and Type | Method and Description |
---|---|
Map<String, @Nullable Object> | build() Returns map input that should be used with Schema.validate |
ArrayTestMapBuilder | array_of_string(List value) |
ArrayTestMapBuilder | array_array_of_integer(List<List> value) |
ArrayTestMapBuilder | array_array_of_model(List<List<Map<String, @Nullable Object>>> value) |
ArrayTestMapBuilder | additionalProperty(String key, Void value) |
ArrayTestMapBuilder | additionalProperty(String key, boolean value) |
ArrayTestMapBuilder | additionalProperty(String key, String value) |
ArrayTestMapBuilder | additionalProperty(String key, int value) |
ArrayTestMapBuilder | additionalProperty(String key, float value) |
ArrayTestMapBuilder | additionalProperty(String key, long value) |
ArrayTestMapBuilder | additionalProperty(String key, double value) |
ArrayTestMapBuilder | additionalProperty(String key, List<?> value) |
ArrayTestMapBuilder | additionalProperty(String key, Map<String, ?> value) |
public static class ArrayTestMap
extends FrozenMap<String, @Nullable Object>
A class to store validated Map payloads
Modifier and Type | Method and Description |
---|---|
static ArrayTestMap | of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) |
ArrayOfStringList | array_of_string() [optional] |
ArrayArrayOfIntegerList | array_array_of_integer() [optional] |
ArrayArrayOfModelList | array_array_of_model() [optional] |
@Nullable Object | getAdditionalProperty(String name) provides type safety for additional properties |
public sealed interface ArrayArrayOfModelBoxed
permits
ArrayArrayOfModelBoxedList
sealed interface that stores validated payloads using boxed classes
public record ArrayArrayOfModelBoxedList
implements ArrayArrayOfModelBoxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
ArrayArrayOfModelBoxedList(ArrayArrayOfModelList data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ArrayArrayOfModelList | data() validated payload |
@Nullable Object | getData() validated payload |
public static class ArrayArrayOfModel
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.ArrayTest;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// List validation
ArrayTest.ArrayArrayOfModelList validatedPayload =
ArrayTest.ArrayArrayOfModel.validate(
new ArrayTest.ArrayArrayOfModelListBuilder()
.add(
Arrays.asList(
MapUtils.makeMap(
new AbstractMap.SimpleEntry<String, String>(
"bar",
"a"
),
new AbstractMap.SimpleEntry<String, String>(
"baz",
"a"
)
)
)
)
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(List.class) |
Class<? extends JsonSchema> | items = Items3.class |
Modifier and Type | Method and Description |
---|---|
ArrayArrayOfModelList | validate(List<?> arg, SchemaConfiguration configuration) |
ArrayArrayOfModelBoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
ArrayArrayOfModelBoxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ArrayArrayOfModelListBuilder
builder for List<List<Map<String, @Nullable Object>>>
A class that builds the List input type
Constructor and Description |
---|
ArrayArrayOfModelListBuilder() Creates an empty list |
ArrayArrayOfModelListBuilder(List<List<Map<String, @Nullable Object>>> items) Stores the items in a list |
Modifier and Type | Method and Description |
---|---|
ArrayArrayOfModelListBuilder | add(List<Map<String, @Nullable Object>> item) |
List<List<Map<String, @Nullable Object>>> | build() Returns list input that should be used with Schema.validate |
public class ArrayArrayOfModelList
extends FrozenList<ItemsList1>
A class to store validated List payloads
Modifier and Type | Method and Description |
---|---|
static ArrayArrayOfModelList | of(List<List<Map<String, ? extends @Nullable Object>>> arg, SchemaConfiguration configuration) |
public sealed interface Items3Boxed
permits
Items3BoxedList
sealed interface that stores validated payloads using boxed classes
public record Items3BoxedList
implements Items3Boxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
Items3BoxedList(ItemsList1 data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ItemsList1 | data() validated payload |
@Nullable Object | getData() validated payload |
public static class Items3
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.ArrayTest;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// List validation
ArrayTest.ItemsList1 validatedPayload =
ArrayTest.Items3.validate(
new ArrayTest.ItemsListBuilder1()
.add(
MapUtils.makeMap(
new AbstractMap.SimpleEntry<String, String>(
"bar",
"a"
),
new AbstractMap.SimpleEntry<String, String>(
"baz",
"a"
)
)
)
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(List.class) |
Class<? extends JsonSchema> | items = ReadOnlyFirst.ReadOnlyFirst1.class |
Modifier and Type | Method and Description |
---|---|
ItemsList1 | validate(List<?> arg, SchemaConfiguration configuration) |
Items3BoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
Items3Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ItemsListBuilder1
builder for List<Map<String, @Nullable Object>>
A class that builds the List input type
Constructor and Description |
---|
ItemsListBuilder1() Creates an empty list |
ItemsListBuilder1(List<Map<String, @Nullable Object>> items) Stores the items in a list |
Modifier and Type | Method and Description |
---|---|
ItemsListBuilder1 | add(Map<String, @Nullable Object> item) |
List<Map<String, @Nullable Object>> | build() Returns list input that should be used with Schema.validate |
public class ItemsList1
extends FrozenList<ReadOnlyFirst.ReadOnlyFirstMap>
A class to store validated List payloads
Modifier and Type | Method and Description |
---|---|
static ItemsList1 | of(List<Map<String, ? extends @Nullable Object>> arg, SchemaConfiguration configuration) |
public sealed interface ArrayArrayOfIntegerBoxed
permits
ArrayArrayOfIntegerBoxedList
sealed interface that stores validated payloads using boxed classes
public record ArrayArrayOfIntegerBoxedList
implements ArrayArrayOfIntegerBoxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
ArrayArrayOfIntegerBoxedList(ArrayArrayOfIntegerList data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ArrayArrayOfIntegerList | data() validated payload |
@Nullable Object | getData() validated payload |
public static class ArrayArrayOfInteger
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.ArrayTest;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// List validation
ArrayTest.ArrayArrayOfIntegerList validatedPayload =
ArrayTest.ArrayArrayOfInteger.validate(
new ArrayTest.ArrayArrayOfIntegerListBuilder()
.add(
Arrays.asList(
1L
)
)
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(List.class) |
Class<? extends JsonSchema> | items = Items1.class |
Modifier and Type | Method and Description |
---|---|
ArrayArrayOfIntegerList | validate(List<?> arg, SchemaConfiguration configuration) |
ArrayArrayOfIntegerBoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
ArrayArrayOfIntegerBoxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ArrayArrayOfIntegerListBuilder
builder for List<List<Number>>
A class that builds the List input type
Constructor and Description |
---|
ArrayArrayOfIntegerListBuilder() Creates an empty list |
ArrayArrayOfIntegerListBuilder(List<List> items) Stores the items in a list |
Modifier and Type | Method and Description |
---|---|
ArrayArrayOfIntegerListBuilder | add(List item) |
List<List> | build() Returns list input that should be used with Schema.validate |
public class ArrayArrayOfIntegerList
extends FrozenList<ItemsList>
A class to store validated List payloads
Modifier and Type | Method and Description |
---|---|
static ArrayArrayOfIntegerList | of(List<List> arg, SchemaConfiguration configuration) |
public sealed interface Items1Boxed
permits
Items1BoxedList
sealed interface that stores validated payloads using boxed classes
public record Items1BoxedList
implements Items1Boxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
Items1BoxedList(ItemsList data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ItemsList | data() validated payload |
@Nullable Object | getData() validated payload |
public static class Items1
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.ArrayTest;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// List validation
ArrayTest.ItemsList validatedPayload =
ArrayTest.Items1.validate(
new ArrayTest.ItemsListBuilder()
.add(1L)
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(List.class) |
Class<? extends JsonSchema> | items = Items2.class |
Modifier and Type | Method and Description |
---|---|
ItemsList | validate(List<?> arg, SchemaConfiguration configuration) |
Items1BoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
Items1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ItemsListBuilder
builder for List<Number>
A class that builds the List input type
Constructor and Description |
---|
ItemsListBuilder() Creates an empty list |
ItemsListBuilder(List items) Stores the items in a list |
Modifier and Type | Method and Description |
---|---|
ItemsListBuilder | add(int item) |
ItemsListBuilder | add(float item) |
ItemsListBuilder | add(long item) |
ItemsListBuilder | add(double item) |
List | build() Returns list input that should be used with Schema.validate |
public class ItemsList
extends FrozenList<Number>
A class to store validated List payloads
Modifier and Type | Method and Description |
---|---|
static ItemsList | of(List arg, SchemaConfiguration configuration) |
public sealed interface Items2Boxed
permits
Items2BoxedNumber
sealed interface that stores validated payloads using boxed classes
public record Items2BoxedNumber
implements Items2Boxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
Items2BoxedNumber(Number data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Number | data() validated payload |
@Nullable Object | getData() validated payload |
public static class Items2
extends Int64JsonSchema.Int64JsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.Int64JsonSchema.Int64JsonSchema1 |
---|
validate |
validateAndBox |
public sealed interface ArrayOfStringBoxed
permits
ArrayOfStringBoxedList
sealed interface that stores validated payloads using boxed classes
public record ArrayOfStringBoxedList
implements ArrayOfStringBoxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
ArrayOfStringBoxedList(ArrayOfStringList data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ArrayOfStringList | data() validated payload |
@Nullable Object | getData() validated payload |
public static class ArrayOfString
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.ArrayTest;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// List validation
ArrayTest.ArrayOfStringList validatedPayload =
ArrayTest.ArrayOfString.validate(
new ArrayTest.ArrayOfStringListBuilder()
.add("a")
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(List.class) |
Class<? extends JsonSchema> | items = Items.class |
Modifier and Type | Method and Description |
---|---|
ArrayOfStringList | validate(List<?> arg, SchemaConfiguration configuration) |
ArrayOfStringBoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
ArrayOfStringBoxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ArrayOfStringListBuilder
builder for List<String>
A class that builds the List input type
Constructor and Description |
---|
ArrayOfStringListBuilder() Creates an empty list |
ArrayOfStringListBuilder(List items) Stores the items in a list |
Modifier and Type | Method and Description |
---|---|
ArrayOfStringListBuilder | add(String item) |
List | build() Returns list input that should be used with Schema.validate |
public class ArrayOfStringList
extends FrozenList<String>
A class to store validated List payloads
Modifier and Type | Method and Description |
---|---|
static ArrayOfStringList | of(List arg, SchemaConfiguration configuration) |
public sealed interface ItemsBoxed
permits
ItemsBoxedString
sealed interface that stores validated payloads using boxed classes
public record ItemsBoxedString
implements ItemsBoxed
record that stores validated String payloads, sealed permits implementation
Constructor and Description |
---|
ItemsBoxedString(String data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
String | data() validated payload |
@Nullable Object | getData() validated payload |
public static class Items
extends StringJsonSchema.StringJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 |
---|
validate |
validateAndBox |