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

Latest commit

 

History

History
95 lines (76 loc) · 5.13 KB

File metadata and controls

95 lines (76 loc) · 5.13 KB

Zebra

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

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 Zebra.Zebra1
schema class
static class Zebra.ZebraMap
output class for Map payloads
static class Zebra.ClassName
schema class
static class Zebra.Type
schema class
static class Zebra.AdditionalProperties
schema class

Zebra1

public static class Zebra1
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("type", Type.class)),
        new PropertyEntry("className", ClassName.class))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "className"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class))
));

Method Summary

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

ZebraMap

public static class ZebraMap
extends FrozenMap<String, Object>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static ZebraMap of(Map<String, Object> arg, SchemaConfiguration configuration)
String className()
must be one of ["zebra"]
String type()
[optional] must be one of ["plains", "mountain", "grevys"]
Object getAdditionalProperty(String name)
provides type safety for additional properties

Input Map Keys

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

ClassName

public static class ClassName
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(
        "zebra"
)))
));

Method Summary

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

Type

public static class Type
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(
        "plains",
        "mountain",
        "grevys"
)))
));

Method Summary

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

AdditionalProperties

public static class AdditionalProperties
extends AnyTypeJsonSchema

A schema class that validates payloads

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

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