org.openapijsonschematools.components.schemas.EnumArrays.java public class EnumArrays
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 | EnumArrays.EnumArrays1 schema class |
| static class | EnumArrays.EnumArraysMap output class for Map payloads |
| static class | EnumArrays.ArrayEnum schema class |
| static class | EnumArrays.ArrayEnumList output class for List payloads |
| static class | EnumArrays.Items schema class |
| static class | EnumArrays.JustSymbol schema class |
public static class EnumArrays1
extends JsonSchema
A schema class that validates payloads
| 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("just_symbol", JustSymbol.class)), new PropertyEntry("array_enum", ArrayEnum.class)) ))) )); |
| Modifier and Type | Method and Description |
|---|---|
| static EnumArraysMap | validate(Map<String, Object> arg, SchemaConfiguration configuration) |
public static class EnumArraysMap
extends FrozenMap<String, Object>
A class to store validated Map payloads
| Modifier and Type | Method and Description |
|---|---|
| static EnumArraysMap | of(Map<String, Object> arg, SchemaConfiguration configuration) |
| String | just_symbol() [optional] must be one of [">=", "$"] |
| ArrayEnumList | array_enum() [optional] |
| Object | getAdditionalProperty(String name) provides type safety for additional properties |
type: Map<String, Object>
| Key | Type | Description | Notes |
|---|---|---|---|
| just_symbol | String | [optional] must be one of [">=", "$"] | |
| array_enum | List | [optional] | |
| anyStringName | Object | any string name can be used but the value must be the correct type | [optional] |
public static class ArrayEnum
extends JsonSchema
A schema class that validates payloads
| 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 ArrayEnumList | validate(List arg, SchemaConfiguration configuration) |
public class ArrayEnumList
extends FrozenList<String>
A class to store validated List payloads
| Modifier and Type | Method and Description |
|---|---|
| static ArrayEnumList | of(List arg, SchemaConfiguration configuration) |
type: List<String>
| List Item Type | Description | Notes |
|---|---|---|
| String | must be one of ["fish", "crab"] |
public static class Items
extends JsonSchema
A schema class that validates payloads
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of( String.class ))) )); |
| Modifier and Type | Method and Description |
|---|---|
| static String | validate(String arg, SchemaConfiguration configuration) |
public static class JustSymbol
extends JsonSchema
A schema class that validates payloads
| Modifier and Type | Field and Description |
|---|---|
| static LinkedHashMap<String, KeywordValidator> | keywordToValidator new LinkedHashMap<>(Map.ofEntries( new KeywordEntry("type", new TypeValidator(Set.of( String.class ))) )); |
| Modifier and Type | Method and Description |
|---|---|
| static String | validate(String arg, SchemaConfiguration configuration) |