org.openapijsonschematools.client.components.schemas.ObjectWithDifficultlyNamedProps.java
public class ObjectWithDifficultlyNamedProps
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 ObjectWithDifficultlyNamedProps1Boxed
permits
ObjectWithDifficultlyNamedProps1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record ObjectWithDifficultlyNamedProps1BoxedMap
implements ObjectWithDifficultlyNamedProps1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
ObjectWithDifficultlyNamedProps1BoxedMap(ObjectWithDifficultlyNamedPropsMap data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ObjectWithDifficultlyNamedPropsMap | data() validated payload |
@Nullable Object | getData() validated payload |
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 org.openapijsonschematools.client.components.schemas.ObjectWithDifficultlyNamedProps;
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()
.digitOne23HyphenMinusList("a")
.dollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(1L)
.digitOne23number(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) |
ObjectWithDifficultlyNamedProps1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
ObjectWithDifficultlyNamedProps1Boxed | validateAndBox(@Nullable Object 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 | dollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(int value) |
ObjectWithDifficultlyNamedPropsMap0Builder | dollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(float value) |
ObjectWithDifficultlyNamedPropsMap0Builder | dollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(long value) |
ObjectWithDifficultlyNamedPropsMap0Builder | dollarSignSpecialLeftSquareBracketPropertyFullStopNameRightSquareBracket(double value) |
ObjectWithDifficultlyNamedPropsMap0Builder | digitOne23number(int value) |
ObjectWithDifficultlyNamedPropsMap0Builder | digitOne23number(float value) |
ObjectWithDifficultlyNamedPropsMap0Builder | digitOne23number(long value) |
ObjectWithDifficultlyNamedPropsMap0Builder | digitOne23number(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 | digitOne23HyphenMinusList(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 sealed interface Schema123NumberBoxed
permits
Schema123NumberBoxedNumber
sealed interface that stores validated payloads using boxed classes
public record Schema123NumberBoxedNumber
implements Schema123NumberBoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
Schema123NumberBoxedNumber(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 Schema123Number
extends IntJsonSchema.IntJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 |
---|
validate |
validateAndBox |
public sealed interface Schema123listBoxed
permits
Schema123listBoxedString
sealed interface that stores validated payloads using boxed classes
public record Schema123listBoxedString
implements Schema123listBoxed
record that stores validated String payloads, sealed permits implementation
Constructor and Description |
---|
Schema123listBoxedString(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 Schema123list
extends StringJsonSchema.StringJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 |
---|
validate |
validateAndBox |
public sealed interface SpecialpropertynameBoxed
permits
SpecialpropertynameBoxedNumber
sealed interface that stores validated payloads using boxed classes
public record SpecialpropertynameBoxedNumber
implements SpecialpropertynameBoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
SpecialpropertynameBoxedNumber(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 Specialpropertyname
extends Int64JsonSchema.Int64JsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.Int64JsonSchema.Int64JsonSchema1 |
---|
validate |
validateAndBox |