org.openapijsonschematools.client.components.schemas.PaginatedResultMyObjectDto.java public class PaginatedResultMyObjectDto
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 | PaginatedResultMyObjectDto.PaginatedResultMyObjectDto1 schema class |
| static class | PaginatedResultMyObjectDto.PaginatedResultMyObjectDtoMap output class for Map payloads |
| static class | PaginatedResultMyObjectDto.Results schema class |
| static class | PaginatedResultMyObjectDto.ResultsList output class for List payloads |
| static class | PaginatedResultMyObjectDto.Count schema class |
| static class | PaginatedResultMyObjectDto.AdditionalProperties schema class |
public static class PaginatedResultMyObjectDto1
extends JsonSchema
A schema class that validates payloads
import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags;
import org.openapijsonschematools.client.configurations.SchemaConfiguration;
import org.openapijsonschematools.client.exceptions.ValidationException;
import org.openapijsonschematools.client.schemas.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// Map validation
PaginatedResultMyObjectDto.PaginatedResultMyObjectDtoMap validatedPayload =
PaginatedResultMyObjectDto.PaginatedResultMyObjectDto1.validate(
MapMaker.makeMap(
new AbstractMap.SimpleEntry<>(
"count",
1L
),
new AbstractMap.SimpleEntry<>(
"results",
Arrays.asList(
)
)
),
configuration
);
| 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("count", Count.class)), new PropertyEntry("results", Results.class)) ))), new KeywordEntry("required", new RequiredValidator(Set.of( "count", "results" ))), new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) )); |
| Modifier and Type | Method and Description |
|---|---|
| static PaginatedResultMyObjectDtoMap | validate(Map<String, Object> arg, SchemaConfiguration configuration) |
public static class PaginatedResultMyObjectDtoMap
extends FrozenMap<String, Object>
A class to store validated Map payloads
| Modifier and Type | Method and Description |
|---|---|
| static PaginatedResultMyObjectDtoMap | of(Map<String, Object> arg, SchemaConfiguration configuration) |
| long | count() |
| ResultsList | results() |
type: Map<String, Object>
| Key | Type | Description | Notes |
|---|---|---|---|
| count | long | ||
| results | List<Map<String, String>> |
public static class Results
extends JsonSchema
A schema class that validates payloads
import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags;
import org.openapijsonschematools.client.configurations.SchemaConfiguration;
import org.openapijsonschematools.client.exceptions.ValidationException;
import org.openapijsonschematools.client.schemas.MapMaker;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// List validation
PaginatedResultMyObjectDto.ResultsList validatedPayload =
PaginatedResultMyObjectDto.Results.validate(
Arrays.asList(
),
configuration
);
| 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(MyObjectDto.MyObjectDto1.class) )); |
| Modifier and Type | Method and Description |
|---|---|
| static ResultsList | validate(List<Map<String, String>> arg, SchemaConfiguration configuration) |
public class ResultsList
extends FrozenList<MyObjectDto.MyObjectDtoMap>
A class to store validated List payloads
| Modifier and Type | Method and Description |
|---|---|
| static ResultsList | of(List<Map<String, String>> arg, SchemaConfiguration configuration) |
type: List<Map<String, String>>
| List Item Type | Description | Notes |
|---|---|---|
| Map<String, String> |
public static class Count
extends IntJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema |
|---|
| validate |
public static class AdditionalProperties
extends NotAnyTypeJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema |
|---|
| validate |