org.openapijsonschematools.client.components.schemas.PaginatedResultMyObjectDto.java
public class PaginatedResultMyObjectDto
A class that contains necessary nested
- schema classes (which validate payloads), extends JsonSchema
- sealed interfaces which store validated payloads, java version of a sum type
- boxed classes which store validated payloads, sealed permits class implementations
- classes to store validated list payloads, extends FrozenList
- classes to build inputs for list payloads
- classes to store validated map payloads, extends FrozenMap
- classes to build inputs for map payloads
public sealed interface PaginatedResultMyObjectDto1Boxed
permits
PaginatedResultMyObjectDto1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record PaginatedResultMyObjectDto1BoxedMap
implements PaginatedResultMyObjectDto1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
PaginatedResultMyObjectDto1BoxedMap(PaginatedResultMyObjectDtoMap data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
PaginatedResultMyObjectDtoMap | data() validated payload |
@Nullable Object | getData() validated payload |
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.validation.MapUtils;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import org.openapijsonschematools.client.components.schemas.PaginatedResultMyObjectDto;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// Map validation
PaginatedResultMyObjectDto.PaginatedResultMyObjectDtoMap validatedPayload =
PaginatedResultMyObjectDto.PaginatedResultMyObjectDto1.validate(
new PaginatedResultMyObjectDto.PaginatedResultMyObjectDtoMapBuilder()
.count(1)
.results(
Arrays.asList(
)
)
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(Map.class) |
Map<String, Class<? extends JsonSchema>> | properties = Map.ofEntries( new PropertyEntry("count", Count.class)), new PropertyEntry("results", Results.class)) ) |
Set | required = Set.of( "count", "results" ) |
Class<? extends JsonSchema> | additionalProperties = AdditionalProperties.class |
Modifier and Type | Method and Description |
---|---|
PaginatedResultMyObjectDtoMap | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
PaginatedResultMyObjectDto1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
PaginatedResultMyObjectDto1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class PaginatedResultMyObjectDtoMap00Builder
builder for Map<String, Object>
A class that builds the Map input type
Constructor and Description |
---|
PaginatedResultMyObjectDtoMap00Builder(Map<String, Object> instance) Creates a builder that contains the passed instance |
Modifier and Type | Method and Description |
---|---|
Map<String, Object> | build() Returns map input that should be used with Schema.validate |
public class PaginatedResultMyObjectDtoMap01Builder
builder for Map<String, Object>
A class that builds the Map input type
Constructor and Description |
---|
PaginatedResultMyObjectDtoMap01Builder(Map<String, Object> instance) Creates a builder that contains the passed instance |
Modifier and Type | Method and Description |
---|---|
PaginatedResultMyObjectDtoMap00Builder | results(List<Map<String, String>> value) |
public class PaginatedResultMyObjectDtoMap10Builder
builder for Map<String, Object>
A class that builds the Map input type
Constructor and Description |
---|
PaginatedResultMyObjectDtoMap10Builder(Map<String, Object> instance) Creates a builder that contains the passed instance |
Modifier and Type | Method and Description |
---|---|
PaginatedResultMyObjectDtoMap00Builder | count(int value) |
PaginatedResultMyObjectDtoMap00Builder | count(float value) |
PaginatedResultMyObjectDtoMap00Builder | count(long value) |
PaginatedResultMyObjectDtoMap00Builder | count(double value) |
public class PaginatedResultMyObjectDtoMapBuilder
builder for Map<String, Object>
A class that builds the Map input type
Constructor and Description |
---|
PaginatedResultMyObjectDtoMapBuilder() Creates a builder that contains an empty map |
Modifier and Type | Method and Description |
---|---|
PaginatedResultMyObjectDtoMap01Builder | count(int value) |
PaginatedResultMyObjectDtoMap01Builder | count(float value) |
PaginatedResultMyObjectDtoMap01Builder | count(long value) |
PaginatedResultMyObjectDtoMap01Builder | count(double value) |
PaginatedResultMyObjectDtoMap10Builder | results(List<Map<String, String>> value) |
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) |
Number | count() |
ResultsList | results() |
public sealed interface ResultsBoxed
permits
ResultsBoxedList
sealed interface that stores validated payloads using boxed classes
public record ResultsBoxedList
implements ResultsBoxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
ResultsBoxedList(ResultsList data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ResultsList | data() validated payload |
@Nullable Object | getData() validated payload |
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.validation.MapUtils;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import org.openapijsonschematools.client.components.schemas.PaginatedResultMyObjectDto;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// List validation
PaginatedResultMyObjectDto.ResultsList validatedPayload =
PaginatedResultMyObjectDto.Results.validate(
new PaginatedResultMyObjectDto.ResultsListBuilder()
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(List.class) |
Class<? extends JsonSchema> | items = MyObjectDto.MyObjectDto1.class |
Modifier and Type | Method and Description |
---|---|
ResultsList | validate(List<?> arg, SchemaConfiguration configuration) |
ResultsBoxedList | validateAndBox(List<?> arg, SchemaConfiguration configuration) |
ResultsBoxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ResultsListBuilder
builder for List<Map<String, String>>
A class that builds the List input type
Constructor and Description |
---|
ResultsListBuilder() Creates an empty list |
ResultsListBuilder(List<Map<String, String>> items) Stores the items in a list |
Modifier and Type | Method and Description |
---|---|
ResultsListBuilder | add(Map<String, String> item) |
List<Map<String, String>> | build() Returns list input that should be used with Schema.validate |
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) |
public sealed interface CountBoxed
permits
CountBoxedNumber
sealed interface that stores validated payloads using boxed classes
public record CountBoxedNumber
implements CountBoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
CountBoxedNumber(Number data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Number | data() validated payload |
@Nullable Object | getData() validated payload |
public static class Count
extends IntJsonSchema.IntJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 |
---|
validate |
validateAndBox |
public sealed interface AdditionalPropertiesBoxed
permits
AdditionalPropertiesBoxedVoid,
AdditionalPropertiesBoxedBoolean,
AdditionalPropertiesBoxedNumber,
AdditionalPropertiesBoxedString,
AdditionalPropertiesBoxedList,
AdditionalPropertiesBoxedMap
sealed interface that stores validated payloads using boxed classes
public record AdditionalPropertiesBoxedVoid
implements AdditionalPropertiesBoxed
record that stores validated null payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedVoid(Void data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Void | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedBoolean
implements AdditionalPropertiesBoxed
record that stores validated boolean payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedBoolean(boolean data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
boolean | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedNumber
implements AdditionalPropertiesBoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedNumber(Number data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Number | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedString
implements AdditionalPropertiesBoxed
record that stores validated String payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedString(String data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
String | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedList
implements AdditionalPropertiesBoxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedList(FrozenList<@Nullable Object> data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
FrozenList<@Nullable Object> | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedMap
implements AdditionalPropertiesBoxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedMap(FrozenMap<@Nullable Object> data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
FrozenMap<@Nullable Object> | data() validated payload |
@Nullable Object | getData() validated payload |
public static class AdditionalProperties
extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 |
---|
validate |
validateAndBox |