Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Latest commit

 

History

History
142 lines (113 loc) · 5.4 KB

File metadata and controls

142 lines (113 loc) · 5.4 KB

IntegerEnumBig

org.openapijsonschematools.client.components.schemas.IntegerEnumBig.java public class IntegerEnumBig

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
  • enum classes

Nested Class Summary

Modifier and Type Class and Description
sealed interface IntegerEnumBig.IntegerEnumBig1Boxed
sealed interface for validated payloads
record IntegerEnumBig.IntegerEnumBig1BoxedNumber
boxed class to store validated Number payloads
static class IntegerEnumBig.IntegerEnumBig1
schema class
enum IntegerEnumBig.IntegerIntegerEnumBigEnums
Integer enum
enum IntegerEnumBig.LongIntegerEnumBigEnums
Long enum
enum IntegerEnumBig.FloatIntegerEnumBigEnums
Float enum
enum IntegerEnumBig.DoubleIntegerEnumBigEnums
Double enum

IntegerEnumBig1Boxed

public sealed interface IntegerEnumBig1Boxed
permits
IntegerEnumBig1BoxedNumber

sealed interface that stores validated payloads using boxed classes

IntegerEnumBig1BoxedNumber

public record IntegerEnumBig1BoxedNumber
implements IntegerEnumBig1Boxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

Constructor and Description
IntegerEnumBig1BoxedNumber(Number data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Number data()
validated payload
@Nullable Object getData()
validated payload

IntegerEnumBig1

public static class IntegerEnumBig1
extends JsonSchema

A schema class that validates payloads

Code Sample

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.IntegerEnumBig;

import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;

static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());

// int validation
int validatedPayload = IntegerEnumBig.IntegerEnumBig1.validate(
    1L,
    configuration
);

Field Summary

Modifier and Type Field and Description
Set<Class<?>> type = Set.of(
    Integer.class,
    Long.class,
    Float.class,
    Double.class
)
String type = "int";
Set enumValues = SetMaker.makeSet(
    10,
    11,
    12
)

Method Summary

Modifier and Type Method and Description
long validate(long arg, SchemaConfiguration configuration)
IntegerEnumBig1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration)
IntegerEnumBig1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

IntegerIntegerEnumBigEnums

public enum IntegerIntegerEnumBigEnums
extends Enum<IntegerIntegerEnumBigEnums>

A class that stores Integer enum values

Enum Constant Summary

Enum Constant Description
POSITIVE_10 value = 10
POSITIVE_11 value = 11
POSITIVE_12 value = 12

LongIntegerEnumBigEnums

public enum LongIntegerEnumBigEnums
extends Enum<LongIntegerEnumBigEnums>

A class that stores Long enum values

Enum Constant Summary

Enum Constant Description
POSITIVE_10 value = 10L
POSITIVE_11 value = 11L
POSITIVE_12 value = 12L

FloatIntegerEnumBigEnums

public enum FloatIntegerEnumBigEnums
extends Enum<FloatIntegerEnumBigEnums>

A class that stores Float enum values

Enum Constant Summary

Enum Constant Description
POSITIVE_10 value = 10.0f
POSITIVE_11 value = 11.0f
POSITIVE_12 value = 12.0f

DoubleIntegerEnumBigEnums

public enum DoubleIntegerEnumBigEnums
extends Enum<DoubleIntegerEnumBigEnums>

A class that stores Double enum values

Enum Constant Summary

Enum Constant Description
POSITIVE_10 value = 10.0d
POSITIVE_11 value = 11.0d
POSITIVE_12 value = 12.0d

[Back to top] [Back to Component Schemas] [Back to README]