org.openapijsonschematools.client.components.schemas.NoAdditionalProperties.java
public class NoAdditionalProperties
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
- classes to store validated map payloads, extends FrozenMap
- classes to build inputs for map payloads
Modifier and Type | Class and Description |
---|---|
sealed interface | NoAdditionalProperties.NoAdditionalProperties1Boxed sealed interface for validated payloads |
record | NoAdditionalProperties.NoAdditionalProperties1BoxedMap boxed class to store validated Map payloads |
static class | NoAdditionalProperties.NoAdditionalProperties1 schema class |
static class | NoAdditionalProperties.NoAdditionalPropertiesMapBuilder builder for Map payloads |
static class | NoAdditionalProperties.NoAdditionalPropertiesMap output class for Map payloads |
sealed interface | NoAdditionalProperties.PetIdBoxed sealed interface for validated payloads |
record | NoAdditionalProperties.PetIdBoxedNumber boxed class to store validated Number payloads |
static class | NoAdditionalProperties.PetId schema class |
sealed interface | NoAdditionalProperties.IdBoxed sealed interface for validated payloads |
record | NoAdditionalProperties.IdBoxedNumber boxed class to store validated Number payloads |
static class | NoAdditionalProperties.Id schema class |
sealed interface | NoAdditionalProperties.AdditionalPropertiesBoxed sealed interface for validated payloads |
record | NoAdditionalProperties.AdditionalPropertiesBoxedVoid boxed class to store validated null payloads |
record | NoAdditionalProperties.AdditionalPropertiesBoxedBoolean boxed class to store validated boolean payloads |
record | NoAdditionalProperties.AdditionalPropertiesBoxedNumber boxed class to store validated Number payloads |
record | NoAdditionalProperties.AdditionalPropertiesBoxedString boxed class to store validated String payloads |
record | NoAdditionalProperties.AdditionalPropertiesBoxedList boxed class to store validated List payloads |
record | NoAdditionalProperties.AdditionalPropertiesBoxedMap boxed class to store validated Map payloads |
static class | NoAdditionalProperties.AdditionalProperties schema class |
public sealed interface NoAdditionalProperties1Boxed
permits
NoAdditionalProperties1BoxedMap
sealed interface that stores validated payloads using boxed classes
public record NoAdditionalProperties1BoxedMap
implements NoAdditionalProperties1Boxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
NoAdditionalProperties1BoxedMap(NoAdditionalPropertiesMap data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
NoAdditionalPropertiesMap | data() validated payload |
@Nullable Object | getData() validated payload |
public static class NoAdditionalProperties1
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.NoAdditionalProperties;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// Map validation
NoAdditionalProperties.NoAdditionalPropertiesMap validatedPayload =
NoAdditionalProperties.NoAdditionalProperties1.validate(
new NoAdditionalProperties.NoAdditionalPropertiesMapBuilder()
.id(1L)
.petId(1L)
.build(),
configuration
);
Modifier and Type | Field and Description |
---|---|
Set<Class<?>> | type = Set.of(Map.class) |
Map<String, Class<? extends JsonSchema>> | properties = Map.ofEntries( new PropertyEntry("id", Id.class)), new PropertyEntry("petId", PetId.class)) ) |
Set | required = Set.of( "id" ) |
Class<? extends JsonSchema> | additionalProperties = AdditionalProperties.class |
Modifier and Type | Method and Description |
---|---|
NoAdditionalPropertiesMap | validate(Map<?, ?> arg, SchemaConfiguration configuration) |
NoAdditionalProperties1BoxedMap | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) |
NoAdditionalProperties1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
@Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public class NoAdditionalPropertiesMap0Builder
builder for Map<String, Number>
A class that builds the Map input type
Constructor and Description |
---|
NoAdditionalPropertiesMap0Builder(Map<String, Number> instance) Creates a builder that contains the passed instance |
Modifier and Type | Method and Description |
---|---|
Map<String, Number> | build() Returns map input that should be used with Schema.validate |
NoAdditionalPropertiesMap0Builder | petId(int value) |
NoAdditionalPropertiesMap0Builder | petId(float value) |
NoAdditionalPropertiesMap0Builder | petId(long value) |
NoAdditionalPropertiesMap0Builder | petId(double value) |
public class NoAdditionalPropertiesMapBuilder
builder for Map<String, Number>
A class that builds the Map input type
Constructor and Description |
---|
NoAdditionalPropertiesMapBuilder() Creates a builder that contains an empty map |
Modifier and Type | Method and Description |
---|---|
NoAdditionalPropertiesMap0Builder | id(int value) |
NoAdditionalPropertiesMap0Builder | id(float value) |
NoAdditionalPropertiesMap0Builder | id(long value) |
NoAdditionalPropertiesMap0Builder | id(double value) |
public static class NoAdditionalPropertiesMap
extends FrozenMap<String, Number>
A class to store validated Map payloads
Modifier and Type | Method and Description |
---|---|
static NoAdditionalPropertiesMap | of(Map<String, Number> arg, SchemaConfiguration configuration) |
Number | id() value must be a 64 bit integer |
Number | petId() [optional] value must be a 64 bit integer |
public sealed interface PetIdBoxed
permits
PetIdBoxedNumber
sealed interface that stores validated payloads using boxed classes
public record PetIdBoxedNumber
implements PetIdBoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
PetIdBoxedNumber(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 PetId
extends Int64JsonSchema.Int64JsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.Int64JsonSchema.Int64JsonSchema1 |
---|
validate |
validateAndBox |
public sealed interface IdBoxed
permits
IdBoxedNumber
sealed interface that stores validated payloads using boxed classes
public record IdBoxedNumber
implements IdBoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
IdBoxedNumber(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 Id
extends Int64JsonSchema.Int64JsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.Int64JsonSchema.Int64JsonSchema1 |
---|
validate |
validateAndBox |
public sealed interface AdditionalPropertiesBoxed
permits
AdditionalPropertiesBoxedVoid,
AdditionalPropertiesBoxedBoolean,
AdditionalPropertiesBoxedNumber,
AdditionalPropertiesBoxedString,
AdditionalPropertiesBoxedList,
AdditionalPropertiesBoxedMap
sealed interface that stores validated payloads using boxed classes
public record AdditionalPropertiesBoxedVoid
implements AdditionalPropertiesBoxed
record that stores validated null payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedVoid(Void data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Void | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedBoolean
implements AdditionalPropertiesBoxed
record that stores validated boolean payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedBoolean(boolean data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
boolean | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedNumber
implements AdditionalPropertiesBoxed
record that stores validated Number payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedNumber(Number data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
Number | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedString
implements AdditionalPropertiesBoxed
record that stores validated String payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedString(String data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
String | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedList
implements AdditionalPropertiesBoxed
record that stores validated List payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedList(FrozenList<@Nullable Object> data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
FrozenList<@Nullable Object> | data() validated payload |
@Nullable Object | getData() validated payload |
public record AdditionalPropertiesBoxedMap
implements AdditionalPropertiesBoxed
record that stores validated Map payloads, sealed permits implementation
Constructor and Description |
---|
AdditionalPropertiesBoxedMap(FrozenMap<@Nullable Object> data) Creates an instance, private visibility |
Modifier and Type | Method and Description |
---|---|
FrozenMap<@Nullable Object> | data() validated payload |
@Nullable Object | getData() validated payload |
public static class AdditionalProperties
extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1
A schema class that validates payloads
Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 |
---|
validate |
validateAndBox |