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

Latest commit

 

History

History
252 lines (202 loc) · 10.8 KB

File metadata and controls

252 lines (202 loc) · 10.8 KB

ArrayTest

org.openapijsonschematools.components.schemas.ArrayTest.java public class ArrayTest

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

Nested Class Summary

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

ArrayTest1

public static class ArrayTest1
extends JsonSchema

A schema class that validates payloads

Field Summary

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))
    )))
));

Method Summary

Modifier and Type Method and Description
static ArrayTestMap validate(Map<String, Object> arg, SchemaConfiguration configuration)

ArrayTestMap

public static class ArrayTestMap
extends FrozenMap<String, Object>

A class to store validated Map payloads

Method Summary

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

Input Map Keys

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]

ArrayArrayOfModel

public static class ArrayArrayOfModel
extends JsonSchema

A schema class that validates payloads

Field Summary

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))
));

Method Summary

Modifier and Type Method and Description
static ArrayArrayOfModelList validate(List<List<Map<String, Object>>> arg, SchemaConfiguration configuration)

ArrayArrayOfModelList

public class ArrayArrayOfModelList
extends FrozenList<ItemsList1>

A class to store validated List payloads

Method Summary

Modifier and Type Method and Description
static ArrayArrayOfModelList of(List<List<Map<String, Object>>> arg, SchemaConfiguration configuration)

Input List Items

type: List<List<Map<String, Object>>>
List Item Type Description Notes
List<Map<String, Object>>

Items3

public static class Items3
extends JsonSchema

A schema class that validates payloads

Field Summary

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)
));

Method Summary

Modifier and Type Method and Description
static ItemsList1 validate(List<Map<String, Object>> arg, SchemaConfiguration configuration)

ItemsList1

public class ItemsList1
extends FrozenList<ReadOnlyFirst.ReadOnlyFirstMap>

A class to store validated List payloads

Method Summary

Modifier and Type Method and Description
static ItemsList1 of(List<Map<String, Object>> arg, SchemaConfiguration configuration)

Input List Items

type: List<Map<String, Object>>
List Item Type Description Notes
Map<String, Object>

ArrayArrayOfInteger

public static class ArrayArrayOfInteger
extends JsonSchema

A schema class that validates payloads

Field Summary

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))
));

Method Summary

Modifier and Type Method and Description
static ArrayArrayOfIntegerList validate(List<List> arg, SchemaConfiguration configuration)

ArrayArrayOfIntegerList

public class ArrayArrayOfIntegerList
extends FrozenList<ItemsList>

A class to store validated List payloads

Method Summary

Modifier and Type Method and Description
static ArrayArrayOfIntegerList of(List<List> arg, SchemaConfiguration configuration)

Input List Items

type: List<List<Long>>
List Item Type Description Notes
List

Items1

public static class Items1
extends JsonSchema

A schema class that validates payloads

Field Summary

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))
));

Method Summary

Modifier and Type Method and Description
static ItemsList validate(List arg, SchemaConfiguration configuration)

ItemsList

public class ItemsList
extends FrozenList<Long>

A class to store validated List payloads

Method Summary

Modifier and Type Method and Description
static ItemsList of(List arg, SchemaConfiguration configuration)

Input List Items

type: List<Long>
List Item Type Description Notes
Long value must be a 64 bit integer

Items2

public static class Items2
extends Int64JsonSchema

A schema class that validates payloads

ArrayOfString

public static class ArrayOfString
extends JsonSchema

A schema class that validates payloads

Field Summary

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))
));

Method Summary

Modifier and Type Method and Description
static ArrayOfStringList validate(List arg, SchemaConfiguration configuration)

ArrayOfStringList

public class ArrayOfStringList
extends FrozenList<String>

A class to store validated List payloads

Method Summary

Modifier and Type Method and Description
static ArrayOfStringList of(List arg, SchemaConfiguration configuration)

Input List Items

type: List<String>
List Item Type Description Notes
String

Items

public static class Items
extends StringJsonSchema

A schema class that validates payloads

Methods Inherited from class org.openapijsonschematools.schemas.StringJsonSchema
validate

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