org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesSchema.java
public class UnevaluatedpropertiesSchema
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
Modifier and Type | Class and Description |
---|---|
sealed interface | UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1Boxed sealed interface for validated payloads |
record | UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1BoxedMap boxed class to store validated Map payloads |
static class | UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1 schema class |
sealed interface | UnevaluatedpropertiesSchema.UnevaluatedPropertiesBoxed sealed interface for validated payloads |
record | UnevaluatedpropertiesSchema.UnevaluatedPropertiesBoxedString boxed class to store validated String payloads |
static class | UnevaluatedpropertiesSchema.UnevaluatedProperties schema class |
public sealed interface UnevaluatedpropertiesSchema1Boxed
permits
UnevaluatedpropertiesSchema1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record UnevaluatedpropertiesSchema1BoxedMap
implements UnevaluatedpropertiesSchema1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
UnevaluatedpropertiesSchema1BoxedMap(FrozenMap<@Nullable Object> data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
FrozenMap<@Nullable Object> | data() validated payload |
@Nullable Object | getData() validated payload |
public static class UnevaluatedpropertiesSchema1
extends JsonSchema
A schema class that validates payloads
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(Map.class) |
Class<? extends JsonSchema> | unevaluatedProperties = UnevaluatedProperties.class |
Modifier and Type | Method and Description |
---|---|
FrozenMap<String, @Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
UnevaluatedpropertiesSchema1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
UnevaluatedpropertiesSchema1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public sealed interface UnevaluatedPropertiesBoxed
permits
UnevaluatedPropertiesBoxedString
sealed interface that stores validated payloads using boxed classes
public record UnevaluatedPropertiesBoxedString
implements UnevaluatedPropertiesBoxed
record that stores validated String payloads, sealed permits implementation
Constructor and Description |
---|
UnevaluatedPropertiesBoxedString(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 UnevaluatedProperties
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.UnevaluatedpropertiesSchema;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// String validation
String validatedPayload = UnevaluatedpropertiesSchema.UnevaluatedProperties.validate(
"a",
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of( String.class ) |
Integer | minLength = 3 |
Modifier and Type | Method and Description |
---|---|
String | validate(String arg, SchemaConfiguration configuration) |
UnevaluatedPropertiesBoxedString | validateAndBox(String arg, SchemaConfiguration configuration) |
UnevaluatedPropertiesBoxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |