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

Latest commit

 

History

History
50 lines (39 loc) · 2.32 KB

File metadata and controls

50 lines (39 loc) · 2.32 KB

IntegerMin15

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

A class that contains necessary nested schema classes, and classes to store validated list and map payloads

Nested Class Summary

Modifier and Type Class and Description
static class IntegerMin15.IntegerMin151
schema class

IntegerMin151

public static class IntegerMin151
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.MapMaker;
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 = IntegerMin15.IntegerMin151.validate(
    1L,
    configuration
);

Field Summary

Modifier and Type Field and Description
static LinkedHashMap<String, KeywordValidator> keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("format", new FormatValidator("int64")),
    new KeywordEntry("minimum", new MinimumValidator(15))
));

Method Summary

Modifier and Type Method and Description
static long validate(long arg, SchemaConfiguration configuration)

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