org.openapijsonschematools.client.components.schemas.NumberWithExclusiveMinMax.java
public class NumberWithExclusiveMinMax
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 | NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1Boxed sealed interface for validated payloads |
| record | NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1BoxedNumber boxed class to store validated Number payloads |
| static class | NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1 schema class |
public sealed interface NumberWithExclusiveMinMax1Boxed
permits
NumberWithExclusiveMinMax1BoxedNumber
sealed interface that stores validated payloads using boxed classes
public record NumberWithExclusiveMinMax1BoxedNumber
implements NumberWithExclusiveMinMax1Boxed
record that stores validated Number payloads, sealed permits implementation
| Constructor and Description |
|---|
| NumberWithExclusiveMinMax1BoxedNumber(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 NumberWithExclusiveMinMax1
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.NumberWithExclusiveMinMax;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// int validation
int validatedPayload = NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1.validate(
1,
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of( Integer.class, Long.class, Float.class, Double.class ) |
| Number | exclusiveMaximum = 12 |
| Number | exclusiveMinimum = 10 |
| Modifier and Type | Method and Description |
|---|---|
| Number | validate(Number arg, SchemaConfiguration configuration) |
| NumberWithExclusiveMinMax1BoxedNumber | validateAndBox(Number arg, SchemaConfiguration configuration) |
| NumberWithExclusiveMinMax1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |