org.openapijsonschematools.client.components.schemas.AdditionalPropertiesSchema.java public class AdditionalPropertiesSchema
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
public static class AdditionalPropertiesSchema1
extends JsonSchema
A schema class that validates payloads
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of(Map.class) |
| List<Class<? extends JsonSchema>> | allOf = List.of( Schema0.class, Schema1.class, Schema2.class ;) |
| Modifier and Type | Method and Description |
|---|---|
| FrozenMap<String, @Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public static class Schema2
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
AdditionalPropertiesSchema.Schema2Map validatedPayload =
AdditionalPropertiesSchema.Schema2.validate(
new AdditionalPropertiesSchema.Schema2MapBuilder()
.build(),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of(Map.class) |
| Class<? extends JsonSchema> | additionalProperties = AdditionalProperties2.class |
| Modifier and Type | Method and Description |
|---|---|
| Schema2Map | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class Schema2MapBuilder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
| Constructor and Description |
|---|
| Schema2MapBuilder() Creates a builder that contains an empty map |
| Modifier and Type | Method and Description |
|---|---|
| Map<String, @Nullable Object> | build() Returns map input that should be used with Schema.validate |
| Schema2MapBuilder | additionalProperty(String key, Void value) |
| Schema2MapBuilder | additionalProperty(String key, boolean value) |
| Schema2MapBuilder | additionalProperty(String key, String value) |
| Schema2MapBuilder | additionalProperty(String key, int value) |
| Schema2MapBuilder | additionalProperty(String key, float value) |
| Schema2MapBuilder | additionalProperty(String key, long value) |
| Schema2MapBuilder | additionalProperty(String key, double value) |
| Schema2MapBuilder | additionalProperty(String key, List<?> value) |
| Schema2MapBuilder | additionalProperty(String key, Map<String, ?> value) |
public static class Schema2Map
extends FrozenMap<String, @Nullable Object>
A class to store validated Map payloads
| Modifier and Type | Method and Description |
|---|---|
| static Schema2Map | of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) |
| @Nullable Object | getAdditionalProperty(String name) provides type safety for additional properties |
public static class AdditionalProperties2
extends JsonSchema
A schema class that validates payloads
| Modifier and Type | Field and Description |
|---|---|
| Integer | maxLength = 5 |
| 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) |
| boolean | validate(boolean arg, SchemaConfiguration configuration) |
| FrozenMap<String, @Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
| FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public static class Schema1
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
AdditionalPropertiesSchema.Schema1Map validatedPayload =
AdditionalPropertiesSchema.Schema1.validate(
new AdditionalPropertiesSchema.Schema1MapBuilder()
.build(),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of(Map.class) |
| Class<? extends JsonSchema> | additionalProperties = AdditionalProperties1.class |
| Modifier and Type | Method and Description |
|---|---|
| Schema1Map | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class Schema1MapBuilder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
| Constructor and Description |
|---|
| Schema1MapBuilder() Creates a builder that contains an empty map |
| Modifier and Type | Method and Description |
|---|---|
| Map<String, @Nullable Object> | build() Returns map input that should be used with Schema.validate |
| Schema1MapBuilder | additionalProperty(String key, Void value) |
| Schema1MapBuilder | additionalProperty(String key, boolean value) |
| Schema1MapBuilder | additionalProperty(String key, String value) |
| Schema1MapBuilder | additionalProperty(String key, int value) |
| Schema1MapBuilder | additionalProperty(String key, float value) |
| Schema1MapBuilder | additionalProperty(String key, long value) |
| Schema1MapBuilder | additionalProperty(String key, double value) |
| Schema1MapBuilder | additionalProperty(String key, List<?> value) |
| Schema1MapBuilder | additionalProperty(String key, Map<String, ?> value) |
public static class Schema1Map
extends FrozenMap<String, @Nullable Object>
A class to store validated Map payloads
| Modifier and Type | Method and Description |
|---|---|
| static Schema1Map | of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) |
| @Nullable Object | getAdditionalProperty(String name) provides type safety for additional properties |
public static class AdditionalProperties1
extends JsonSchema
A schema class that validates payloads
| Modifier and Type | Field and Description |
|---|---|
| Integer | minLength = 3 |
| 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) |
| boolean | validate(boolean arg, SchemaConfiguration configuration) |
| FrozenMap<String, @Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
| FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public static class Schema0
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
AdditionalPropertiesSchema.Schema0Map validatedPayload =
AdditionalPropertiesSchema.Schema0.validate(
new AdditionalPropertiesSchema.Schema0MapBuilder()
.build(),
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of(Map.class) |
| Class<? extends JsonSchema> | additionalProperties = AdditionalProperties.class |
| Modifier and Type | Method and Description |
|---|---|
| Schema0Map | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class Schema0MapBuilder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
| Constructor and Description |
|---|
| Schema0MapBuilder() Creates a builder that contains an empty map |
| Modifier and Type | Method and Description |
|---|---|
| Map<String, @Nullable Object> | build() Returns map input that should be used with Schema.validate |
| Schema0MapBuilder | additionalProperty(String key, Void value) |
| Schema0MapBuilder | additionalProperty(String key, boolean value) |
| Schema0MapBuilder | additionalProperty(String key, String value) |
| Schema0MapBuilder | additionalProperty(String key, int value) |
| Schema0MapBuilder | additionalProperty(String key, float value) |
| Schema0MapBuilder | additionalProperty(String key, long value) |
| Schema0MapBuilder | additionalProperty(String key, double value) |
| Schema0MapBuilder | additionalProperty(String key, List<?> value) |
| Schema0MapBuilder | additionalProperty(String key, Map<String, ?> value) |
public static class Schema0Map
extends FrozenMap<String, @Nullable Object>
A class to store validated Map payloads
| Modifier and Type | Method and Description |
|---|---|
| static Schema0Map | of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) |
| @Nullable Object | getAdditionalProperty(String name) provides type safety for additional properties |
public static class AdditionalProperties
extends AnyTypeJsonSchema
A schema class that validates payloads
| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema |
|---|
| validate |