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

Latest commit

 

History

History
242 lines (195 loc) · 12 KB

File metadata and controls

242 lines (195 loc) · 12 KB

MapTest

org.openapijsonschematools.client.components.schemas.MapTest.java public class MapTest

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 MapTest.MapTest1
schema class
static class MapTest.MapTestMap
output class for Map payloads
static class MapTest.DirectMap
schema class
static class MapTest.DirectMapMap
output class for Map payloads
static class MapTest.AdditionalProperties3
schema class
static class MapTest.MapOfEnumString
schema class
static class MapTest.MapOfEnumStringMap
output class for Map payloads
static class MapTest.AdditionalProperties2
schema class
static class MapTest.MapMapOfString
schema class
static class MapTest.MapMapOfStringMap
output class for Map payloads
static class MapTest.AdditionalProperties
schema class
static class MapTest.AdditionalPropertiesMap
output class for Map payloads
static class MapTest.AdditionalProperties1
schema class

MapTest1

public static class MapTest1
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("map_map_of_string", MapMapOfString.class)),
        new PropertyEntry("map_of_enum_string", MapOfEnumString.class)),
        new PropertyEntry("direct_map", DirectMap.class)),
        new PropertyEntry("indirect_map", StringBooleanMap.StringBooleanMap1.class)
    )))
));

Method Summary

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

MapTestMap

public static class MapTestMap
extends FrozenMap<String, Object>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static MapTestMap of(Map<String, Object> arg, SchemaConfiguration configuration)
MapMapOfStringMap map_map_of_string()
[optional]
MapOfEnumStringMap map_of_enum_string()
[optional]
DirectMapMap direct_map()
[optional]
StringBooleanMap.StringBooleanMapMap indirect_map()
[optional]
Object getAdditionalProperty(String name)
provides type safety for additional properties

Input Map Keys

type: Map<String, Object>
Key Type Description Notes
map_map_of_string Map<String, Map<String, String>> [optional]
map_of_enum_string Map<String, String> [optional]
direct_map Map<String, boolean> [optional]
indirect_map Map<String, boolean> [optional]
anyStringName Object any string name can be used but the value must be the correct type [optional]

DirectMap

public static class DirectMap
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("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties3.class))
));

Method Summary

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

DirectMapMap

public static class DirectMapMap
extends FrozenMap<String, Boolean>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static DirectMapMap of(Map<String, Boolean> arg, SchemaConfiguration configuration)
boolean getAdditionalProperty(String name)
provides type safety for additional properties

Input Map Keys

type: Map<String, Object>
Key Type Description Notes
anyStringName boolean any string name can be used but the value must be the correct type [optional]

AdditionalProperties3

public static class AdditionalProperties3
extends BooleanJsonSchema

A schema class that validates payloads

Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema
validate

MapOfEnumString

public static class MapOfEnumString
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("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties2.class))
));

Method Summary

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

MapOfEnumStringMap

public static class MapOfEnumStringMap
extends FrozenMap<String, String>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static MapOfEnumStringMap of(Map<String, String> arg, SchemaConfiguration configuration)
String getAdditionalProperty(String name)
provides type safety for additional properties

Input Map Keys

type: Map<String, Object>
Key Type Description Notes
anyStringName String any string name can be used but the value must be the correct type [optional] must be one of ["UPPER", "lower"]

AdditionalProperties2

public static class AdditionalProperties2
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(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(Set.of(
        "UPPER",
        "lower"
)))
));

Method Summary

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

MapMapOfString

public static class MapMapOfString
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("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class))
));

Method Summary

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

MapMapOfStringMap

public static class MapMapOfStringMap
extends FrozenMap<String, AdditionalPropertiesMap>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static MapMapOfStringMap of(Map<String, Map<String, String>> arg, SchemaConfiguration configuration)
AdditionalPropertiesMap getAdditionalProperty(String name)
provides type safety for additional properties

Input Map Keys

type: Map<String, Object>
Key Type Description Notes
anyStringName Map<String, String> any string name can be used but the value must be the correct type [optional]

AdditionalProperties

public static class AdditionalProperties
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("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties1.class))
));

Method Summary

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

AdditionalPropertiesMap

public static class AdditionalPropertiesMap
extends FrozenMap<String, String>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static AdditionalPropertiesMap of(Map<String, String> arg, SchemaConfiguration configuration)
String getAdditionalProperty(String name)
provides type safety for additional properties

Input Map Keys

type: Map<String, Object>
Key Type Description Notes
anyStringName String any string name can be used but the value must be the correct type [optional]

AdditionalProperties1

public static class AdditionalProperties1
extends StringJsonSchema

A schema class that validates payloads

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

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