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

Latest commit

 

History

History
92 lines (73 loc) · 4.47 KB

File metadata and controls

92 lines (73 loc) · 4.47 KB

Whale

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

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 Whale.Whale1
schema class
static class Whale.WhaleMap
output class for Map payloads
static class Whale.ClassName
schema class
static class Whale.HasTeeth
schema class
static class Whale.HasBaleen
schema class

Whale1

public static class Whale1
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("hasBaleen", HasBaleen.class)),
        new PropertyEntry("hasTeeth", HasTeeth.class)),
        new PropertyEntry("className", ClassName.class))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "className"
    )))
));

Method Summary

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

WhaleMap

public static class WhaleMap
extends FrozenMap<String, Object>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static WhaleMap of(Map<String, Object> arg, SchemaConfiguration configuration)
String className()
must be one of ["whale"]
boolean hasBaleen()
[optional]
boolean hasTeeth()
[optional]
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 ["whale"]
hasBaleen boolean [optional]
hasTeeth boolean [optional]
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(
        "whale"
)))
));

Method Summary

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

HasTeeth

public static class HasTeeth
extends BooleanJsonSchema

A schema class that validates payloads

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

HasBaleen

public static class HasBaleen
extends BooleanJsonSchema

A schema class that validates payloads

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

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