org.openapijsonschematools.client.components.schemas.ObjectWithNonIntersectingValues.java public class ObjectWithNonIntersectingValues
A class that contains necessary nested
- schema classes (which validate payloads), extends JsonSchema
- classes to store validated map payloads, extends FrozenMap
- classes to build inputs for map payloads
| Modifier and Type | Class and Description |
|---|---|
| static class | ObjectWithNonIntersectingValues.ObjectWithNonIntersectingValues1 schema class |
| static class | ObjectWithNonIntersectingValues.ObjectWithNonIntersectingValuesMapBuilder builder for Map payloads |
| static class | ObjectWithNonIntersectingValues.ObjectWithNonIntersectingValuesMap output class for Map payloads |
| static class | ObjectWithNonIntersectingValues.A schema class |
| static class | ObjectWithNonIntersectingValues.AdditionalProperties schema class |
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 java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// 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) |
| @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 static class A
extends NumberJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema |
|---|
| validate |
public static class AdditionalProperties
extends StringJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema |
|---|
| validate |