org.openapijsonschematools.client.components.schemas.IntegerEnum.java public class IntegerEnum
A class that contains necessary nested
- schema classes (which validate payloads), extends JsonSchema
- enum classes
Modifier and Type | Class and Description |
---|---|
static class | IntegerEnum.IntegerEnum1 schema class |
enum | IntegerEnum.IntegerIntegerEnumEnums Integer enum |
enum | IntegerEnum.LongIntegerEnumEnums Long enum |
enum | IntegerEnum.FloatIntegerEnumEnums Float enum |
enum | IntegerEnum.DoubleIntegerEnumEnums Double enum |
public static class IntegerEnum1
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 java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone());
// long validation
long validatedPayload = IntegerEnum.IntegerEnum1.validate(
1L,
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of( Integer.class, Long.class, Float.class, Double.class ) |
Set | enumValues = SetMaker.makeSet( 0, 1, 2 ) |
Modifier and Type | Method and Description |
---|---|
long | validate(long arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public enum IntegerIntegerEnumEnums
extends Enum<IntegerIntegerEnumEnums>
A class that stores Integer enum values
Enum Constant | Description |
---|---|
POSITIVE_0 | value = 0 |
POSITIVE_1 | value = 1 |
POSITIVE_2 | value = 2 |
public enum LongIntegerEnumEnums
extends Enum<LongIntegerEnumEnums>
A class that stores Long enum values
Enum Constant | Description |
---|---|
POSITIVE_0 | value = 0L |
POSITIVE_1 | value = 1L |
POSITIVE_2 | value = 2L |
public enum FloatIntegerEnumEnums
extends Enum<FloatIntegerEnumEnums>
A class that stores Float enum values
Enum Constant | Description |
---|---|
POSITIVE_0 | value = 0.0f |
POSITIVE_1 | value = 1.0f |
POSITIVE_2 | value = 2.0f |
public enum DoubleIntegerEnumEnums
extends Enum<DoubleIntegerEnumEnums>
A class that stores Double enum values
Enum Constant | Description |
---|---|
POSITIVE_0 | value = 0.0d |
POSITIVE_1 | value = 1.0d |
POSITIVE_2 | value = 2.0d |