org.openapijsonschematools.components.schemas.Zebra.java public class Zebra
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 | 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 |
public static class Zebra1
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("type", Type.class)), new PropertyEntry("className", ClassName.class)) ))), new KeywordEntry("required", new RequiredValidator(Set.of( "className" ))), new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) )); |
| Modifier and Type | Method and Description |
|---|---|
| static ZebraMap | validate(Map<String, Object> arg, SchemaConfiguration configuration) |
public static class ZebraMap
extends FrozenMap<String, Object>
A class to store validated Map payloads
| 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 |
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] |
public static class ClassName
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 ))), new KeywordEntry("enum", new EnumValidator(Set.of( "zebra" ))) )); |
| Modifier and Type | Method and Description |
|---|---|
| static String | validate(String arg, SchemaConfiguration configuration) |
public static class Type
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 ))), new KeywordEntry("enum", new EnumValidator(Set.of( "plains", "mountain", "grevys" ))) )); |
| Modifier and Type | Method and Description |
|---|---|
| static String | validate(String arg, SchemaConfiguration configuration) |
public static class AdditionalProperties
extends AnyTypeJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.schemas.AnyTypeJsonSchema |
|---|
| validate |