org.openapijsonschematools.client.components.schemas.ObjectWithNonIntersectingValues.java
public class ObjectWithNonIntersectingValues
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
public sealed interface ObjectWithNonIntersectingValues1Boxed
permits
ObjectWithNonIntersectingValues1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record ObjectWithNonIntersectingValues1BoxedMap
implements ObjectWithNonIntersectingValues1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
ObjectWithNonIntersectingValues1BoxedMap(ObjectWithNonIntersectingValuesMap data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ObjectWithNonIntersectingValuesMap | data() validated payload |
@Nullable Object | getData() validated payload |
public static class ObjectWithNonIntersectingValues1
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.ObjectWithNonIntersectingValues;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// Map validation
ObjectWithNonIntersectingValues.ObjectWithNonIntersectingValuesMap validatedPayload =
ObjectWithNonIntersectingValues.ObjectWithNonIntersectingValues1.validate(
new ObjectWithNonIntersectingValues.ObjectWithNonIntersectingValuesMapBuilder()
.a(1)
.additionalProperty("someAdditionalProperty", "a")
.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("a", A.class)) ) |
Class<? extends JsonSchema> | additionalProperties = AdditionalProperties.class |
Modifier and Type | Method and Description |
---|---|
ObjectWithNonIntersectingValuesMap | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
ObjectWithNonIntersectingValues1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
ObjectWithNonIntersectingValues1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ObjectWithNonIntersectingValuesMapBuilder
builder for Map<String, Object>
A class that builds the Map input type
Constructor and Description |
---|
ObjectWithNonIntersectingValuesMapBuilder() Creates a builder that contains an empty map |
Modifier and Type | Method and Description |
---|---|
Map<String, Object> | build() Returns map input that should be used with Schema.validate |
ObjectWithNonIntersectingValuesMapBuilder | a(int value) |
ObjectWithNonIntersectingValuesMapBuilder | a(float value) |
ObjectWithNonIntersectingValuesMapBuilder | a(long value) |
ObjectWithNonIntersectingValuesMapBuilder | a(double value) |
ObjectWithNonIntersectingValuesMapBuilder | additionalProperty(String key, String value) |
public static class ObjectWithNonIntersectingValuesMap
extends FrozenMap<String, Object>
A class to store validated Map payloads
Modifier and Type | Method and Description |
---|---|
static ObjectWithNonIntersectingValuesMap | of(Map<String, Object> arg, SchemaConfiguration configuration) |
Number | a() [optional] |
String | getAdditionalProperty(String name) provides type safety for additional properties |
public sealed interface ABoxed
permits
ABoxedNumber
sealed interface that stores validated payloads using boxed classes
public record ABoxedNumber
implements ABoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
ABoxedNumber(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 A
extends NumberJsonSchema.NumberJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 |
---|
validate |
validateAndBox |
public sealed interface AdditionalPropertiesBoxed
permits
AdditionalPropertiesBoxedString
sealed interface that stores validated payloads using boxed classes
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 static class AdditionalProperties
extends StringJsonSchema.StringJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 |
---|
validate |
validateAndBox |