org.openapijsonschematools.client.components.schemas.ArrayTest.java public class ArrayTest
A class that contains necessary nested schema classes, and classes to store validated list and map payloads
| Modifier and Type | Class and Description |
|---|---|
| static class | ArrayTest.ArrayTest1 schema class |
| static class | ArrayTest.ArrayTestMap output class for Map payloads |
| static class | ArrayTest.ArrayArrayOfModel schema class |
| static class | ArrayTest.ArrayArrayOfModelList output class for List payloads |
| static class | ArrayTest.Items3 schema class |
| static class | ArrayTest.ItemsList1 output class for List payloads |
| static class | ArrayTest.ArrayArrayOfInteger schema class |
| static class | ArrayTest.ArrayArrayOfIntegerList output class for List payloads |
| static class | ArrayTest.Items1 schema class |
| static class | ArrayTest.ItemsList output class for List payloads |
| static class | ArrayTest.Items2 schema class |
| static class | ArrayTest.ArrayOfString schema class |
| static class | ArrayTest.ArrayOfStringList output class for List payloads |
| static class | ArrayTest.Items schema class |
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.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// Map validation
ArrayTest.ArrayTestMap validatedPayload =
ArrayTest.ArrayTest1.validate(
MapMaker.makeMap(
new AbstractMap.SimpleEntry<>(
"array_of_string",
Arrays.asList(
"a"
)
),
new AbstractMap.SimpleEntry<>(
"array_array_of_integer",
Arrays.asList(
Arrays.asList(
1L
)
)
),
new AbstractMap.SimpleEntry<>(
"array_array_of_model",
Arrays.asList(
Arrays.asList(
MapMaker.makeMap(
new AbstractMap.SimpleEntry<>(
"bar",
"a"
),
new AbstractMap.SimpleEntry<>(
"baz",
"a"
)
)
)
)
)
),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), new KeywordEntry("properties", new PropertiesValidator(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 |
|---|---|
| static ArrayTestMap | validate(Map<String, Object> arg, SchemaConfiguration configuration) |
public static class ArrayTestMap
extends FrozenMap<String, Object>
A class to store validated Map payloads
| Modifier and Type | Method and Description |
|---|---|
| static ArrayTestMap | of(Map<String, Object> arg, SchemaConfiguration configuration) |
| ArrayOfStringList | array_of_string() [optional] |
| ArrayArrayOfIntegerList | array_array_of_integer() [optional] |
| ArrayArrayOfModelList | array_array_of_model() [optional] |
| Object | getAdditionalProperty(String name) provides type safety for additional properties |
type: Map<String, Object>
| Key | Type | Description | Notes |
|---|---|---|---|
| array_of_string | List | [optional] | |
| array_array_of_integer | List<List> | [optional] | |
| array_array_of_model | List<List<Map<String, Object>>> | [optional] | |
| anyStringName | Object | any string name can be used but the value must be the correct type | [optional] |
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.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// List validation
ArrayTest.ArrayArrayOfModelList validatedPayload =
ArrayTest.ArrayArrayOfModel.validate(
Arrays.asList(
Arrays.asList(
MapMaker.makeMap(
new AbstractMap.SimpleEntry<>(
"bar",
"a"
),
new AbstractMap.SimpleEntry<>(
"baz",
"a"
)
)
)
),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), new KeywordEntry("items", new ItemsValidator(Items3.class)) )); |
| Modifier and Type | Method and Description |
|---|---|
| static ArrayArrayOfModelList | validate(List<List<Map<String, Object>>> arg, SchemaConfiguration configuration) |
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, Object>>> arg, SchemaConfiguration configuration) |
type: List<List<Map<String, Object>>>
| List Item Type | Description | Notes |
|---|---|---|
| List<Map<String, Object>> |
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.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// List validation
ArrayTest.ItemsList1 validatedPayload =
ArrayTest.Items3.validate(
Arrays.asList(
MapMaker.makeMap(
new AbstractMap.SimpleEntry<>(
"bar",
"a"
),
new AbstractMap.SimpleEntry<>(
"baz",
"a"
)
)
),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), new KeywordEntry("items", new ItemsValidator(ReadOnlyFirst.ReadOnlyFirst1.class) )); |
| Modifier and Type | Method and Description |
|---|---|
| static ItemsList1 | validate(List<Map<String, Object>> arg, SchemaConfiguration configuration) |
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, Object>> arg, SchemaConfiguration configuration) |
type: List<Map<String, Object>>
| List Item Type | Description | Notes |
|---|---|---|
| Map<String, Object> |
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.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// List validation
ArrayTest.ArrayArrayOfIntegerList validatedPayload =
ArrayTest.ArrayArrayOfInteger.validate(
Arrays.asList(
Arrays.asList(
1L
)
),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), new KeywordEntry("items", new ItemsValidator(Items1.class)) )); |
| Modifier and Type | Method and Description |
|---|---|
| static ArrayArrayOfIntegerList | validate(List<List> arg, SchemaConfiguration configuration) |
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) |
type: List<List<Long>>
| List Item Type | Description | Notes |
|---|---|---|
| List |
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.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// List validation
ArrayTest.ItemsList validatedPayload =
ArrayTest.Items1.validate(
Arrays.asList(
1L
),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), new KeywordEntry("items", new ItemsValidator(Items2.class)) )); |
| Modifier and Type | Method and Description |
|---|---|
| static ItemsList | validate(List arg, SchemaConfiguration configuration) |
public class ItemsList
extends FrozenList<Long>
A class to store validated List payloads
| Modifier and Type | Method and Description |
|---|---|
| static ItemsList | of(List arg, SchemaConfiguration configuration) |
type: List<Long>
| List Item Type | Description | Notes |
|---|---|---|
| Long | value must be a 64 bit integer |
public static class Items2
extends Int64JsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.client.schemas.Int64JsonSchema |
|---|
| validate |
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.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// List validation
ArrayTest.ArrayOfStringList validatedPayload =
ArrayTest.ArrayOfString.validate(
Arrays.asList(
"a"
),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), new KeywordEntry("items", new ItemsValidator(Items.class)) )); |
| Modifier and Type | Method and Description |
|---|---|
| static ArrayOfStringList | validate(List arg, SchemaConfiguration configuration) |
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) |
type: List<String>
| List Item Type | Description | Notes |
|---|---|---|
| String |
public static class Items
extends StringJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema |
|---|
| validate |