org.openapijsonschematools.components.schemas.Pet.java public class Pet
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 | Pet.Pet1 schema class |
| static class | Pet.PetMap output class for Map payloads |
| static class | Pet.Tags schema class |
| static class | Pet.TagsList output class for List payloads |
| static class | Pet.Status schema class |
| static class | Pet.PhotoUrls schema class |
| static class | Pet.PhotoUrlsList output class for List payloads |
| static class | Pet.Items schema class |
| static class | Pet.Name schema class |
| static class | Pet.Id schema class |
public static class Pet1
extends JsonSchema
A schema class that validates payloads
Pet object that needs to be added to the store
| 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("id", Id.class)), new PropertyEntry("category", Category.Category1.class), new PropertyEntry("name", Name.class)), new PropertyEntry("photoUrls", PhotoUrls.class)), new PropertyEntry("tags", Tags.class)), new PropertyEntry("status", Status.class)) ))), new KeywordEntry("required", new RequiredValidator(Set.of( "name", "photoUrls" ))) )); |
| Modifier and Type | Method and Description |
|---|---|
| static PetMap | validate(Map<String, Object> arg, SchemaConfiguration configuration) |
public static class PetMap
extends FrozenMap<String, Object>
A class to store validated Map payloads
| Modifier and Type | Method and Description |
|---|---|
| static PetMap | of(Map<String, Object> arg, SchemaConfiguration configuration) |
| String | name() |
| PhotoUrlsList | photoUrls() |
| long | id() [optional] value must be a 64 bit integer |
| Category.CategoryMap | category() [optional] |
| TagsList | tags() [optional] |
| String | status() [optional] must be one of ["available", "pending", "sold"] |
| Object | getAdditionalProperty(String name) provides type safety for additional properties |
type: Map<String, Object>
| Key | Type | Description | Notes |
|---|---|---|---|
| name | String | ||
| photoUrls | List | ||
| id | long | [optional] value must be a 64 bit integer | |
| category | Map<String, Object> | [optional] | |
| tags | List<Map<String, Object>> | [optional] | |
| status | String | pet status in the store | [optional] must be one of ["available", "pending", "sold"] |
| anyStringName | Object | any string name can be used but the value must be the correct type | [optional] |
public static class Tags
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(Tag.Tag1.class) )); |
| Modifier and Type | Method and Description |
|---|---|
| static TagsList | validate(List<Map<String, Object>> arg, SchemaConfiguration configuration) |
public class TagsList
extends FrozenList<Tag.TagMap>
A class to store validated List payloads
| Modifier and Type | Method and Description |
|---|---|
| static TagsList | of(List<Map<String, Object>> arg, SchemaConfiguration configuration) |
type: List<Map<String, Object>>
| List Item Type | Description | Notes |
|---|---|---|
| Map<String, Object> |
public static class Status
extends JsonSchema
A schema class that validates payloads
pet status in the store
| 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( "available", "pending", "sold" ))) )); |
| Modifier and Type | Method and Description |
|---|---|
| static String | validate(String arg, SchemaConfiguration configuration) |
public static class PhotoUrls
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 PhotoUrlsList | validate(List arg, SchemaConfiguration configuration) |
public class PhotoUrlsList
extends FrozenList<String>
A class to store validated List payloads
| Modifier and Type | Method and Description |
|---|---|
| static PhotoUrlsList | of(List arg, SchemaConfiguration configuration) |
type: List<String>
| List Item Type | Description | Notes |
|---|---|---|
| String |
public static class Items
extends StringJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.schemas.StringJsonSchema |
|---|
| validate |
public static class Name
extends StringJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.schemas.StringJsonSchema |
|---|
| validate |
public static class Id
extends Int64JsonSchema
A schema class that validates payloads