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

Latest commit

 

History

History
53 lines (43 loc) · 2.16 KB

File metadata and controls

53 lines (43 loc) · 2.16 KB

NumberWithExclusiveMinMax

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

A class that contains necessary nested

  • schema classes (which validate payloads), extends JsonSchema

Nested Class Summary

Modifier and Type Class and Description
static class NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1
schema class

NumberWithExclusiveMinMax1

public static class NumberWithExclusiveMinMax1
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 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
);

Field Summary

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

Method Summary

Modifier and Type Method and Description
Number validate(Number arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)
[Back to top] [Back to Component Schemas] [Back to README]