org.openapijsonschematools.client.components.schemas.ObjectWithDifficultlyNamedProps.java public class ObjectWithDifficultlyNamedProps
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 | ObjectWithDifficultlyNamedProps.ObjectWithDifficultlyNamedProps1 schema class |
static class | ObjectWithDifficultlyNamedProps.ObjectWithDifficultlyNamedPropsMapBuilder builder for Map payloads |
static class | ObjectWithDifficultlyNamedProps.ObjectWithDifficultlyNamedPropsMap output class for Map payloads |
static class | ObjectWithDifficultlyNamedProps.Schema123Number schema class |
static class | ObjectWithDifficultlyNamedProps.Schema123list schema class |
static class | ObjectWithDifficultlyNamedProps.Specialpropertyname schema class |
public static class ObjectWithDifficultlyNamedProps1
extends JsonSchema
A schema class that validates payloads
model with properties that have invalid names for python
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
ObjectWithDifficultlyNamedProps.ObjectWithDifficultlyNamedPropsMap validatedPayload =
ObjectWithDifficultlyNamedProps.ObjectWithDifficultlyNamedProps1.validate(
new ObjectWithDifficultlyNamedProps.ObjectWithDifficultlyNamedPropsMapBuilder()
.set123HyphenMinusList("a")
.setDollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(1L)
.set123number(1)
.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("$special[property.name]", Specialpropertyname.class)), new PropertyEntry("123-list", Schema123list.class)), new PropertyEntry("123Number", Schema123Number.class)) ) |
Set | required = Set.of( "123-list" ) |
Modifier and Type | Method and Description |
---|---|
ObjectWithDifficultlyNamedPropsMap | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ObjectWithDifficultlyNamedPropsMap0Builder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
Constructor and Description |
---|
ObjectWithDifficultlyNamedPropsMap0Builder(Map<String, @Nullable Object> instance) Creates a builder that contains the passed instance |
Modifier and Type | Method and Description |
---|---|
Map<String, @Nullable Object> | build() Returns map input that should be used with Schema.validate |
ObjectWithDifficultlyNamedPropsMap0Builder | setDollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(int value) |
ObjectWithDifficultlyNamedPropsMap0Builder | setDollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(float value) |
ObjectWithDifficultlyNamedPropsMap0Builder | setDollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(long value) |
ObjectWithDifficultlyNamedPropsMap0Builder | setDollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(double value) |
ObjectWithDifficultlyNamedPropsMap0Builder | set123number(int value) |
ObjectWithDifficultlyNamedPropsMap0Builder | set123number(float value) |
ObjectWithDifficultlyNamedPropsMap0Builder | set123number(long value) |
ObjectWithDifficultlyNamedPropsMap0Builder | set123number(double value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, Void value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, boolean value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, String value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, int value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, float value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, long value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, double value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, List<?> value) |
ObjectWithDifficultlyNamedPropsMap0Builder | additionalProperty(String key, Map<String, ?> value) |
public class ObjectWithDifficultlyNamedPropsMapBuilder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
Constructor and Description |
---|
ObjectWithDifficultlyNamedPropsMapBuilder() Creates a builder that contains an empty map |
Modifier and Type | Method and Description |
---|---|
ObjectWithDifficultlyNamedPropsMap0Builder | set123HyphenMinusList(String value) |
public static class ObjectWithDifficultlyNamedPropsMap
extends FrozenMap<String, @Nullable Object>
A class to store validated Map payloads
Modifier and Type | Method and Description |
---|---|
static ObjectWithDifficultlyNamedPropsMap | of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) |
@Nullable Object | get(String key) This schema has invalid Java names so this method must be used when you access instance["123-list"], instance["$special[property.name]"], instance["123Number"], |
@Nullable Object | getAdditionalProperty(String name) provides type safety for additional properties |
public static class Schema123Number
extends IntJsonSchema
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema |
---|
validate |
public static class Schema123list
extends StringJsonSchema
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema |
---|
validate |
public static class Specialpropertyname
extends Int64JsonSchema
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.Int64JsonSchema |
---|
validate |