org.openapijsonschematools.client.components.schemas.ObjectWithInvalidNamedRefedProperties.java
public class ObjectWithInvalidNamedRefedProperties
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
Modifier and Type | Class and Description |
---|---|
sealed interface | ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedProperties1Boxed sealed interface for validated payloads |
record | ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedProperties1BoxedMap boxed class to store validated Map payloads |
static class | ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedProperties1 schema class |
static class | ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedPropertiesMapBuilder builder for Map payloads |
static class | ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedPropertiesMap output class for Map payloads |
public sealed interface ObjectWithInvalidNamedRefedProperties1Boxed
permits
ObjectWithInvalidNamedRefedProperties1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record ObjectWithInvalidNamedRefedProperties1BoxedMap
implements ObjectWithInvalidNamedRefedProperties1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
ObjectWithInvalidNamedRefedProperties1BoxedMap(ObjectWithInvalidNamedRefedPropertiesMap data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
ObjectWithInvalidNamedRefedPropertiesMap | data() validated payload |
@Nullable Object | getData() validated payload |
public static class ObjectWithInvalidNamedRefedProperties1
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.ObjectWithInvalidNamedRefedProperties;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// Map validation
ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedPropertiesMap validatedPayload =
ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedProperties1.validate(
new ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedPropertiesMapBuilder()
.exclamationMarkReference(
Arrays.asList(
1L
)
)
.from(
MapUtils.makeMap(
new AbstractMap.SimpleEntry<String, Object>(
"data",
"a"
),
new AbstractMap.SimpleEntry<String, Object>(
"id",
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("from", FromSchema.FromSchema1.class), new PropertyEntry("!reference", ArrayWithValidationsInItems.ArrayWithValidationsInItems1.class) ) |
Set | required = Set.of( "!reference", "from" ) |
Modifier and Type | Method and Description |
---|---|
ObjectWithInvalidNamedRefedPropertiesMap | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
ObjectWithInvalidNamedRefedProperties1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
ObjectWithInvalidNamedRefedProperties1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class ObjectWithInvalidNamedRefedPropertiesMap00Builder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
Constructor and Description |
---|
ObjectWithInvalidNamedRefedPropertiesMap00Builder(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 |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, Void value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, boolean value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, String value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, int value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, float value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, long value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, double value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, List<?> value) |
ObjectWithInvalidNamedRefedPropertiesMap00Builder | additionalProperty(String key, Map<String, ?> value) |
public class ObjectWithInvalidNamedRefedPropertiesMap01Builder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
Constructor and Description |
---|
ObjectWithInvalidNamedRefedPropertiesMap01Builder(Map<String, @Nullable Object> instance) Creates a builder that contains the passed instance |
Modifier and Type | Method and Description |
---|---|
ObjectWithInvalidNamedRefedPropertiesMap00Builder | from(Map<String, @Nullable Object> value) |
public class ObjectWithInvalidNamedRefedPropertiesMap10Builder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
Constructor and Description |
---|
ObjectWithInvalidNamedRefedPropertiesMap10Builder(Map<String, @Nullable Object> instance) Creates a builder that contains the passed instance |
Modifier and Type | Method and Description |
---|---|
ObjectWithInvalidNamedRefedPropertiesMap00Builder | exclamationMarkReference(List value) |
public class ObjectWithInvalidNamedRefedPropertiesMapBuilder
builder for Map<String, @Nullable Object>
A class that builds the Map input type
Constructor and Description |
---|
ObjectWithInvalidNamedRefedPropertiesMapBuilder() Creates a builder that contains an empty map |
Modifier and Type | Method and Description |
---|---|
ObjectWithInvalidNamedRefedPropertiesMap01Builder | exclamationMarkReference(List value) |
ObjectWithInvalidNamedRefedPropertiesMap10Builder | from(Map<String, @Nullable Object> value) |
public static class ObjectWithInvalidNamedRefedPropertiesMap
extends FrozenMap<String, @Nullable Object>
A class to store validated Map payloads
Modifier and Type | Method and Description |
---|---|
static ObjectWithInvalidNamedRefedPropertiesMap | of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration) |
FromSchema.FromSchemaMap | from() |
@Nullable Object | get(String key) This schema has invalid Java names so this method must be used when you access instance["!reference"], |
@Nullable Object | getAdditionalProperty(String name) provides type safety for additional properties |