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

Latest commit

 

History

History
187 lines (149 loc) · 8.54 KB

File metadata and controls

187 lines (149 loc) · 8.54 KB

Pet

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

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 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

Pet1

public static class Pet1
extends JsonSchema

A schema class that validates payloads

Description

Pet object that needs to be added to the store

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("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"
    )))
));

Method Summary

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

PetMap

public static class PetMap
extends FrozenMap<String, Object>

A class to store validated Map payloads

Method Summary

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

Input Map Keys

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]

Tags

public static class Tags
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(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator(Tag.Tag1.class)
));

Method Summary

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

TagsList

public class TagsList
extends FrozenList<Tag.TagMap>

A class to store validated List payloads

Method Summary

Modifier and Type Method and Description
static TagsList of(List<Map<String, Object>> arg, SchemaConfiguration configuration)

Input List Items

type: List<Map<String, Object>>
List Item Type Description Notes
Map<String, Object>

Status

public static class Status
extends JsonSchema

A schema class that validates payloads

Description

pet status in the store

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(
        "available",
        "pending",
        "sold"
)))
));

Method Summary

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

PhotoUrls

public static class PhotoUrls
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(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator(Items.class))
));

Method Summary

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

PhotoUrlsList

public class PhotoUrlsList
extends FrozenList<String>

A class to store validated List payloads

Method Summary

Modifier and Type Method and Description
static PhotoUrlsList of(List arg, SchemaConfiguration configuration)

Input List Items

type: List<String>
List Item Type Description Notes
String

Items

public static class Items
extends StringJsonSchema

A schema class that validates payloads

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

Name

public static class Name
extends StringJsonSchema

A schema class that validates payloads

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

Id

public static class Id
extends Int64JsonSchema

A schema class that validates payloads

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

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