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

Latest commit

 

History

History
458 lines (362 loc) · 20.3 KB

File metadata and controls

458 lines (362 loc) · 20.3 KB

PaginatedResultMyObjectDto

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

Nested Class Summary

Modifier and Type Class and Description
sealed interface PaginatedResultMyObjectDto.PaginatedResultMyObjectDto1Boxed
sealed interface for validated payloads
record PaginatedResultMyObjectDto.PaginatedResultMyObjectDto1BoxedMap
boxed class to store validated Map payloads
static class PaginatedResultMyObjectDto.PaginatedResultMyObjectDto1
schema class
static class PaginatedResultMyObjectDto.PaginatedResultMyObjectDtoMapBuilder
builder for Map payloads
static class PaginatedResultMyObjectDto.PaginatedResultMyObjectDtoMap
output class for Map payloads
sealed interface PaginatedResultMyObjectDto.ResultsBoxed
sealed interface for validated payloads
record PaginatedResultMyObjectDto.ResultsBoxedList
boxed class to store validated List payloads
static class PaginatedResultMyObjectDto.Results
schema class
static class PaginatedResultMyObjectDto.ResultsListBuilder
builder for List payloads
static class PaginatedResultMyObjectDto.ResultsList
output class for List payloads
sealed interface PaginatedResultMyObjectDto.CountBoxed
sealed interface for validated payloads
record PaginatedResultMyObjectDto.CountBoxedNumber
boxed class to store validated Number payloads
static class PaginatedResultMyObjectDto.Count
schema class
sealed interface PaginatedResultMyObjectDto.AdditionalPropertiesBoxed
sealed interface for validated payloads
record PaginatedResultMyObjectDto.AdditionalPropertiesBoxedVoid
boxed class to store validated null payloads
record PaginatedResultMyObjectDto.AdditionalPropertiesBoxedBoolean
boxed class to store validated boolean payloads
record PaginatedResultMyObjectDto.AdditionalPropertiesBoxedNumber
boxed class to store validated Number payloads
record PaginatedResultMyObjectDto.AdditionalPropertiesBoxedString
boxed class to store validated String payloads
record PaginatedResultMyObjectDto.AdditionalPropertiesBoxedList
boxed class to store validated List payloads
record PaginatedResultMyObjectDto.AdditionalPropertiesBoxedMap
boxed class to store validated Map payloads
static class PaginatedResultMyObjectDto.AdditionalProperties
schema class

PaginatedResultMyObjectDto1Boxed

public sealed interface PaginatedResultMyObjectDto1Boxed
permits
PaginatedResultMyObjectDto1BoxedMap

sealed interface that stores validated payloads using boxed classes

PaginatedResultMyObjectDto1BoxedMap

public record PaginatedResultMyObjectDto1BoxedMap
implements PaginatedResultMyObjectDto1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
PaginatedResultMyObjectDto1BoxedMap(PaginatedResultMyObjectDtoMap data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
PaginatedResultMyObjectDtoMap data()
validated payload
@Nullable Object getData()
validated payload

PaginatedResultMyObjectDto1

public static class PaginatedResultMyObjectDto1
extends JsonSchema

A schema class that validates payloads

Code Sample

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

Field Summary

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

Method Summary

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)

PaginatedResultMyObjectDtoMap00Builder

public class PaginatedResultMyObjectDtoMap00Builder
builder for Map<String, Object>

A class that builds the Map input type

Constructor Summary

Constructor and Description
PaginatedResultMyObjectDtoMap00Builder(Map<String, Object> instance)
Creates a builder that contains the passed instance

Method Summary

Modifier and Type Method and Description
Map<String, Object> build()
Returns map input that should be used with Schema.validate

PaginatedResultMyObjectDtoMap01Builder

public class PaginatedResultMyObjectDtoMap01Builder
builder for Map<String, Object>

A class that builds the Map input type

Constructor Summary

Constructor and Description
PaginatedResultMyObjectDtoMap01Builder(Map<String, Object> instance)
Creates a builder that contains the passed instance

Method Summary

Modifier and Type Method and Description
PaginatedResultMyObjectDtoMap00Builder results(List<Map<String, String>> value)

PaginatedResultMyObjectDtoMap10Builder

public class PaginatedResultMyObjectDtoMap10Builder
builder for Map<String, Object>

A class that builds the Map input type

Constructor Summary

Constructor and Description
PaginatedResultMyObjectDtoMap10Builder(Map<String, Object> instance)
Creates a builder that contains the passed instance

Method Summary

Modifier and Type Method and Description
PaginatedResultMyObjectDtoMap00Builder count(int value)
PaginatedResultMyObjectDtoMap00Builder count(float value)
PaginatedResultMyObjectDtoMap00Builder count(long value)
PaginatedResultMyObjectDtoMap00Builder count(double value)

PaginatedResultMyObjectDtoMapBuilder

public class PaginatedResultMyObjectDtoMapBuilder
builder for Map<String, Object>

A class that builds the Map input type

Constructor Summary

Constructor and Description
PaginatedResultMyObjectDtoMapBuilder()
Creates a builder that contains an empty map

Method Summary

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)

PaginatedResultMyObjectDtoMap

public static class PaginatedResultMyObjectDtoMap
extends FrozenMap<String, Object>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static PaginatedResultMyObjectDtoMap of(Map<String, Object> arg, SchemaConfiguration configuration)
Number count()
ResultsList results()

ResultsBoxed

public sealed interface ResultsBoxed
permits
ResultsBoxedList

sealed interface that stores validated payloads using boxed classes

ResultsBoxedList

public record ResultsBoxedList
implements ResultsBoxed

record that stores validated List payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ResultsBoxedList(ResultsList data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
ResultsList data()
validated payload
@Nullable Object getData()
validated payload

Results

public static class Results
extends JsonSchema

A schema class that validates payloads

Code Sample

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

Field Summary

Modifier and Type Field and Description
Set<Class<?>> type = Set.of(List.class)
Class<? extends JsonSchema> items = MyObjectDto.MyObjectDto1.class

Method Summary

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)

ResultsListBuilder

public class ResultsListBuilder
builder for List<Map<String, String>>

A class that builds the List input type

Constructor Summary

Constructor and Description
ResultsListBuilder()
Creates an empty list
ResultsListBuilder(List<Map<String, String>> items)
Stores the items in a list

Method Summary

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

ResultsList

public class ResultsList
extends FrozenList<MyObjectDto.MyObjectDtoMap>

A class to store validated List payloads

Method Summary

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

CountBoxed

public sealed interface CountBoxed
permits
CountBoxedNumber

sealed interface that stores validated payloads using boxed classes

CountBoxedNumber

public record CountBoxedNumber
implements CountBoxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

Constructor and Description
CountBoxedNumber(Number data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Number data()
validated payload
@Nullable Object getData()
validated payload

Count

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

AdditionalPropertiesBoxed

public sealed interface AdditionalPropertiesBoxed
permits
AdditionalPropertiesBoxedVoid, AdditionalPropertiesBoxedBoolean, AdditionalPropertiesBoxedNumber, AdditionalPropertiesBoxedString, AdditionalPropertiesBoxedList, AdditionalPropertiesBoxedMap

sealed interface that stores validated payloads using boxed classes

AdditionalPropertiesBoxedVoid

public record AdditionalPropertiesBoxedVoid
implements AdditionalPropertiesBoxed

record that stores validated null payloads, sealed permits implementation

Constructor Summary

Constructor and Description
AdditionalPropertiesBoxedVoid(Void data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Void data()
validated payload
@Nullable Object getData()
validated payload

AdditionalPropertiesBoxedBoolean

public record AdditionalPropertiesBoxedBoolean
implements AdditionalPropertiesBoxed

record that stores validated boolean payloads, sealed permits implementation

Constructor Summary

Constructor and Description
AdditionalPropertiesBoxedBoolean(boolean data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
boolean data()
validated payload
@Nullable Object getData()
validated payload

AdditionalPropertiesBoxedNumber

public record AdditionalPropertiesBoxedNumber
implements AdditionalPropertiesBoxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

Constructor and Description
AdditionalPropertiesBoxedNumber(Number data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Number data()
validated payload
@Nullable Object getData()
validated payload

AdditionalPropertiesBoxedString

public record AdditionalPropertiesBoxedString
implements AdditionalPropertiesBoxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

Constructor and Description
AdditionalPropertiesBoxedString(String data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
String data()
validated payload
@Nullable Object getData()
validated payload

AdditionalPropertiesBoxedList

public record AdditionalPropertiesBoxedList
implements AdditionalPropertiesBoxed

record that stores validated List payloads, sealed permits implementation

Constructor Summary

Constructor and Description
AdditionalPropertiesBoxedList(FrozenList<@Nullable Object> data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
FrozenList<@Nullable Object> data()
validated payload
@Nullable Object getData()
validated payload

AdditionalPropertiesBoxedMap

public record AdditionalPropertiesBoxedMap
implements AdditionalPropertiesBoxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
AdditionalPropertiesBoxedMap(FrozenMap<@Nullable Object> data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
FrozenMap<@Nullable Object> data()
validated payload
@Nullable Object getData()
validated payload

AdditionalProperties

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

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