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

Latest commit

 

History

History
350 lines (282 loc) · 18.7 KB

ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md

File metadata and controls

350 lines (282 loc) · 18.7 KB

ObjectWithAllOfWithReqTestPropFromUnsetAddProp

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

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 map payloads, extends FrozenMap
  • classes to build inputs for map payloads

Nested Class Summary

Modifier and Type Class and Description
sealed interface ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed
sealed interface for validated payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedVoid
boxed class to store validated null payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedBoolean
boxed class to store validated boolean payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedNumber
boxed class to store validated Number payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedString
boxed class to store validated String payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedList
boxed class to store validated List payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedMap
boxed class to store validated Map payloads
static class ObjectWithAllOfWithReqTestPropFromUnsetAddProp.ObjectWithAllOfWithReqTestPropFromUnsetAddProp1
schema class
sealed interface ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1Boxed
sealed interface for validated payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1BoxedMap
boxed class to store validated Map payloads
static class ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1
schema class
static class ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1MapBuilder
builder for Map payloads
static class ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1Map
output class for Map payloads
sealed interface ObjectWithAllOfWithReqTestPropFromUnsetAddProp.NameBoxed
sealed interface for validated payloads
record ObjectWithAllOfWithReqTestPropFromUnsetAddProp.NameBoxedString
boxed class to store validated String payloads
static class ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Name
schema class

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed

public sealed interface ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed
permits
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedVoid, ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedBoolean, ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedNumber, ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedString, ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedList, ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedMap

sealed interface that stores validated payloads using boxed classes

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedVoid

public record ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedVoid
implements ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed

record that stores validated null payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedBoolean

public record ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedBoolean
implements ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed

record that stores validated boolean payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedNumber

public record ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedNumber
implements ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedString

public record ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedString
implements ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedList

public record ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedList
implements ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed

record that stores validated List payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedList(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

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedMap

public record ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedMap
implements ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedMap(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

ObjectWithAllOfWithReqTestPropFromUnsetAddProp1

public static class ObjectWithAllOfWithReqTestPropFromUnsetAddProp1
extends JsonSchema

A schema class that validates payloads

Field Summary

Modifier and Type Field and Description
List<Class<? extends JsonSchema>> allOf = List.of(
    ObjectWithOptionalTestProp.ObjectWithOptionalTestProp1.class,
    Schema1.class
;)

Method Summary

Modifier and Type Method and Description
String validate(String arg, SchemaConfiguration configuration)
Void validate(Void arg, SchemaConfiguration configuration)
int validate(int arg, SchemaConfiguration configuration)
long validate(long arg, SchemaConfiguration configuration)
float validate(float arg, SchemaConfiguration configuration)
double validate(double arg, SchemaConfiguration configuration)
Number validate(Number arg, SchemaConfiguration configuration)
boolean validate(boolean arg, SchemaConfiguration configuration)
FrozenMap<@Nullable Object> validate(Map<?, ?> arg, SchemaConfiguration configuration)
FrozenList<@Nullable Object> validate(List<?> arg, SchemaConfiguration configuration)
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedString validateAndBox(String arg, SchemaConfiguration configuration)
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration)
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration)
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration)
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedMap validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration)
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1BoxedList validateAndBox(List<?> arg, SchemaConfiguration configuration)
ObjectWithAllOfWithReqTestPropFromUnsetAddProp1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

Schema1Boxed

public sealed interface Schema1Boxed
permits
Schema1BoxedMap

sealed interface that stores validated payloads using boxed classes

Schema1BoxedMap

public record Schema1BoxedMap
implements Schema1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
Schema1BoxedMap(Schema1Map data)
Creates an instance, private visibility

Method Summary

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

Schema1

public static class Schema1
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.ObjectWithAllOfWithReqTestPropFromUnsetAddProp;

import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;

static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());

// Map validation
ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1Map validatedPayload =
    ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1.validate(
    new ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1MapBuilder()
        .name("a")

    .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("name", Name.class))
)
Set required = Set.of(
    "test"
)

Method Summary

Modifier and Type Method and Description
Schema1Map validate(Map<?, ?> arg, SchemaConfiguration configuration)
Schema1BoxedMap validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration)
Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

Schema1Map0Builder

public class Schema1Map0Builder
builder for Map<String, @Nullable Object>

A class that builds the Map input type

Constructor Summary

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

Method Summary

Modifier and Type Method and Description
Map<String, @Nullable Object> build()
Returns map input that should be used with Schema.validate
Schema1Map0Builder name(String value)
Schema1Map0Builder additionalProperty(String key, Void value)
Schema1Map0Builder additionalProperty(String key, boolean value)
Schema1Map0Builder additionalProperty(String key, String value)
Schema1Map0Builder additionalProperty(String key, int value)
Schema1Map0Builder additionalProperty(String key, float value)
Schema1Map0Builder additionalProperty(String key, long value)
Schema1Map0Builder additionalProperty(String key, double value)
Schema1Map0Builder additionalProperty(String key, List<?> value)
Schema1Map0Builder additionalProperty(String key, Map<String, ?> value)

Schema1MapBuilder

public class Schema1MapBuilder
builder for Map<String, @Nullable Object>

A class that builds the Map input type

Constructor Summary

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

Method Summary

Modifier and Type Method and Description
Schema1Map0Builder test(Void value)
Schema1Map0Builder test(boolean value)
Schema1Map0Builder test(String value)
Schema1Map0Builder test(int value)
Schema1Map0Builder test(float value)
Schema1Map0Builder test(long value)
Schema1Map0Builder test(double value)
Schema1Map0Builder test(List<?> value)
Schema1Map0Builder test(Map<String, ?> value)

Schema1Map

public static class Schema1Map
extends FrozenMap<String, @Nullable Object>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static Schema1Map of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration)
@Nullable Object test()
String name()
[optional]
@Nullable Object getAdditionalProperty(String name)
provides type safety for additional properties

NameBoxed

public sealed interface NameBoxed
permits
NameBoxedString

sealed interface that stores validated payloads using boxed classes

NameBoxedString

public record NameBoxedString
implements NameBoxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

Name

public static class Name
extends StringJsonSchema.StringJsonSchema1

A schema class that validates payloads

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

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