From 70924058c7414a29b0b76e14bdf5d36826d142de Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 14 Dec 2023 21:49:44 -0800 Subject: [PATCH 01/12] Partial update of JsonSchema --- .../client/schemas/validation/JsonSchema.java | 197 +++++++++++++++++- .../schemas/validation/JsonSchemaInfo.java | 34 +++ .../generators/JavaClientGenerator.java | 2 + .../_Schema_anytypeOrMultitype.hbs | 8 +- .../schemas/SchemaClass/_Schema_boolean.hbs | 6 +- .../schemas/SchemaClass/_Schema_list.hbs | 6 +- .../schemas/SchemaClass/_Schema_map.hbs | 6 +- .../schemas/SchemaClass/_Schema_null.hbs | 6 +- .../schemas/SchemaClass/_Schema_number.hbs | 8 +- .../schemas/SchemaClass/_Schema_string.hbs | 8 +- .../schemas/SchemaClass/_format.hbs | 4 +- .../components/schemas/SchemaClass/_types.hbs | 12 +- .../schemas/validation/JsonSchema.hbs | 197 +++++++++++++++++- .../schemas/validation/JsonSchemaInfo.hbs | 34 +++ 14 files changed, 494 insertions(+), 34 deletions(-) create mode 100644 samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java create mode 100644 src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java index b5b773c518c..187d28b6d01 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java @@ -3,6 +3,7 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.exceptions.InvalidTypeException; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -12,11 +13,205 @@ import java.util.Map; import java.util.Set; import java.util.UUID; +import java.util.regex.Pattern; public abstract class JsonSchema { + public final Set> type; + public final String format; + public final Class items; + public final Map> properties; + public final Set required; + public final Number exclusiveMaximum; + public final Number exclusiveMinimum; + public final Integer maxItems; + public final Integer minItems; + public final Integer maxLength; + public final Integer minLength; + public final Integer maxProperties; + public final Integer minProperties; + public final Number maximum; + public final Number minimum; + public final BigDecimal multipleOf; + public final Class additionalProperties; + public final List> allOf; + public final List> anyOf; + public final List> oneOf; + public final Class not; + public final Boolean uniqueItems; + public final Set enumValues; + public final Pattern pattern; public final LinkedHashMap keywordToValidator; - protected JsonSchema(LinkedHashMap keywordToValidator) { + protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { + LinkedHashMap keywordToValidator = new LinkedHashMap<>(); + this.type = jsonSchemaInfo.type; + if (this.type != null) { + keywordToValidator.put( + "type", + new TypeValidator(this.type) + ); + } + this.format = jsonSchemaInfo.format; + if (this.format != null) { + keywordToValidator.put( + "format", + new FormatValidator(this.format) + ); + } + this.items = jsonSchemaInfo.items; + if (this.items != null) { + keywordToValidator.put( + "items", + new ItemsValidator(this.items) + ); + } + this.properties = jsonSchemaInfo.properties; + if (this.properties != null) { + keywordToValidator.put( + "properties", + new PropertiesValidator(this.properties) + ); + } + this.required = jsonSchemaInfo.required; + if (this.required != null) { + keywordToValidator.put( + "required", + new RequiredValidator(this.required) + ); + } + this.exclusiveMaximum = jsonSchemaInfo.exclusiveMaximum; + if (this.exclusiveMaximum != null) { + keywordToValidator.put( + "exclusiveMaximum", + new ExclusiveMaximumValidator(this.exclusiveMaximum) + ); + } + this.exclusiveMinimum = jsonSchemaInfo.exclusiveMinimum; + if (this.exclusiveMinimum != null) { + keywordToValidator.put( + "exclusiveMinimum", + new ExclusiveMinimumValidator(this.exclusiveMinimum) + ); + } + this.maxItems = jsonSchemaInfo.maxItems; + if (this.maxItems != null) { + keywordToValidator.put( + "maxItems", + new MaxItemsValidator(this.maxItems) + ); + } + this.minItems = jsonSchemaInfo.minItems; + if (this.minItems != null) { + keywordToValidator.put( + "minItems", + new MinItemsValidator(this.minItems) + ); + } + this.maxLength = jsonSchemaInfo.maxLength; + if (this.maxLength != null) { + keywordToValidator.put( + "maxLength", + new MaxLengthValidator(this.maxLength) + ); + } + this.minLength = jsonSchemaInfo.minLength; + if (this.minLength != null) { + keywordToValidator.put( + "minLength", + new MinLengthValidator(this.minLength) + ); + } + this.maxProperties = jsonSchemaInfo.maxProperties; + if (this.maxProperties != null) { + keywordToValidator.put( + "maxProperties", + new MaxPropertiesValidator(this.maxProperties) + ); + } + this.minProperties = jsonSchemaInfo.minProperties; + if (this.minProperties != null) { + keywordToValidator.put( + "minProperties", + new MinPropertiesValidator(this.minProperties) + ); + } + this.maximum = jsonSchemaInfo.maximum; + if (this.maximum != null) { + keywordToValidator.put( + "maximum", + new MaximumValidator(this.maximum) + ); + } + this.minimum = jsonSchemaInfo.minimum; + if (this.minimum != null) { + keywordToValidator.put( + "minimum", + new MinimumValidator(this.minimum) + ); + } + this.multipleOf = jsonSchemaInfo.multipleOf; + if (this.multipleOf != null) { + keywordToValidator.put( + "multipleOf", + new MultipleOfValidator(this.multipleOf) + ); + } + this.additionalProperties = jsonSchemaInfo.additionalProperties; + if (this.additionalProperties != null) { + keywordToValidator.put( + "additionalProperties", + new AdditionalPropertiesValidator(this.additionalProperties) + ); + } + this.allOf = jsonSchemaInfo.allOf; + if (this.allOf != null) { + keywordToValidator.put( + "allOf", + new AllOfValidator(this.allOf) + ); + } + this.anyOf = jsonSchemaInfo.anyOf; + if (this.anyOf != null) { + keywordToValidator.put( + "anyOf", + new AnyOfValidator(this.anyOf) + ); + } + this.oneOf = jsonSchemaInfo.oneOf; + if (this.oneOf != null) { + keywordToValidator.put( + "oneOf", + new OneOfValidator(this.oneOf) + ); + } + this.not = jsonSchemaInfo.not; + if (this.not != null) { + keywordToValidator.put( + "not", + new NotValidator(this.not) + ); + } + this.uniqueItems = jsonSchemaInfo.uniqueItems; + if (this.uniqueItems != null) { + keywordToValidator.put( + "uniqueItems", + new UniqueItemsValidator(this.uniqueItems) + ); + } + this.enumValues = jsonSchemaInfo.enumValues; + if (this.enumValues != null) { + keywordToValidator.put( + "enum", + new EnumValidator(this.enumValues) + ); + } + this.pattern = jsonSchemaInfo.pattern; + if (this.pattern != null) { + keywordToValidator.put( + "pattern", + new PatternValidator(this.pattern) + ); + } this.keywordToValidator = keywordToValidator; } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java new file mode 100644 index 00000000000..67da443bdac --- /dev/null +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java @@ -0,0 +1,34 @@ +package org.openapijsonschematools.client.schemas.validation; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +public class JsonSchemaInfo { + public Set> type; + public String format; + public Class items; + public Map> properties; + public Set required; + public Number exclusiveMaximum; + public Number exclusiveMinimum; + public Integer maxItems; + public Integer minItems; + public Integer maxLength; + public Integer minLength; + public Integer maxProperties; + public Integer minProperties; + public Number maximum; + public Number minimum; + public BigDecimal multipleOf; + public Class additionalProperties; + public List> allOf; + public List> anyOf; + public List> oneOf; + public Class not; + public Boolean uniqueItems; + public Set enumValues; + public Pattern pattern; +} diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 9fe400f2560..251bdf3aee2 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -407,6 +407,7 @@ public void processOpts() { keywordValidatorFiles.add("ItemsValidator"); keywordValidatorFiles.add("JsonSchema"); keywordValidatorFiles.add("JsonSchemaFactory"); + keywordValidatorFiles.add("JsonSchemaInfo"); keywordValidatorFiles.add("KeywordEntry"); keywordValidatorFiles.add("KeywordValidator"); keywordValidatorFiles.add("LengthValidator"); @@ -1719,6 +1720,7 @@ private void addMultipleOfValidator(CodegenSchema schema, Set imports) { private void addCustomSchemaImports(Set imports, CodegenSchema schema) { imports.add("import " + packageName + ".schemas.validation.JsonSchema;"); + imports.add("import " + packageName + ".schemas.validation.JsonSchemaInfo;"); imports.add("import "+packageName + ".configurations.SchemaConfiguration;"); imports.add("import "+packageName + ".exceptions.ValidationException;"); imports.add("import "+packageName + ".exceptions.InvalidTypeException;"); // for castToAllowedTypes diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs index 6a38a865d37..f97c5407200 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs @@ -21,13 +21,13 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - super(new LinkedHashMap<>(Map.ofEntries( + JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "format"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} {{/eq}} {{#eq this "items"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_items }} @@ -96,7 +96,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} {{/eq}} {{#if @last}} - ))); + super(schemaInfo); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs index 012a9cb0d5f..516e8071396 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs @@ -17,10 +17,10 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - super(new LinkedHashMap<>(Map.ofEntries( + JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "allOf"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} @@ -38,7 +38,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} {{/eq}} {{#if @last}} - ))); + super(schemaInfo); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs index d29f32b8a70..b7015cbcd20 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs @@ -17,10 +17,10 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - super(new LinkedHashMap<>(Map.ofEntries( + JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "items"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_items }} @@ -47,7 +47,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems }} {{/eq}} {{#if @last}} - ))); + super(schemaInfo); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs index 8429975d59c..f5069c88f38 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs @@ -17,10 +17,10 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - super(new LinkedHashMap<>(Map.ofEntries( + JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "properties"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_properties }} @@ -50,7 +50,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} {{/eq}} {{#if @last}} - ))); + super(schemaInfo); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs index 02a395d0312..37996346368 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs @@ -17,10 +17,10 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - super(new LinkedHashMap<>(Map.ofEntries( + JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "allOf"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} @@ -38,7 +38,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} {{/eq}} {{#if @last}} - ))); + super(schemaInfo); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs index a392877f2f7..5087bdb7d56 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs @@ -17,13 +17,13 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - super(new LinkedHashMap<>(Map.ofEntries( + JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "format"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} {{/eq}} {{#eq this "exclusiveMaximum"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum }} @@ -56,7 +56,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} {{/eq}} {{#if @last}} - ))); + super(schemaInfo); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs index 0841dfbae20..4f13d7918aa 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs @@ -18,13 +18,13 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - super(new LinkedHashMap<>(Map.ofEntries( + JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "format"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} {{/eq}} {{#eq this "maxLength"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxLength }} @@ -51,7 +51,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} {{/eq}} {{#if @last}} - ))); + super(schemaInfo); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs index c791f67b4f5..20b75190765 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("format", new FormatValidator("{{format}}")){{#unless @last}},{{/unless}}
+    type = "{{format}}";
{{~else}} -new KeywordEntry("format", new FormatValidator("{{format}}")){{#unless @last}},{{/unless}} +schemaInfo.type = "{{format}}"; {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs index 066e23f1e78..297dd066d57 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs @@ -1,13 +1,13 @@ {{#if types}} {{#and (eq types.size 1) (or (contains types "null") (contains types "object") (contains types "array") (contains types "boolean"))}} {{#if forDocs}} -    new KeywordEntry("type", new TypeValidator(Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}}))){{#unless @last}},{{/unless}}
+    Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}})
{{~else}} -new KeywordEntry("type", new TypeValidator(Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}}))){{#unless @last}},{{/unless}} +schemaInfo.type = Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}}); {{/if}} {{else}} {{#if forDocs}} -    new KeywordEntry("type", new TypeValidator(Set.of(
+    type = Set.of(
{{~#each types}} {{#eq this "null"}}         Void.class{{#unless @last}},{{/unless}}
@@ -36,9 +36,9 @@ new KeywordEntry("type", new TypeValidator(Set.of({{#contains types "null"}}Void         Boolean.class{{#unless @last}},{{/unless}}
{{~/eq}} {{/each}} -    ))){{#unless @last}},{{/unless}}
+    )
{{~else}} -new KeywordEntry("type", new TypeValidator(Set.of( +schemaInfo.type = Set.of( {{#each types}} {{#eq this "null"}} Void.class{{#unless @last}},{{/unless}} @@ -73,7 +73,7 @@ new KeywordEntry("type", new TypeValidator(Set.of( Boolean.class{{#unless @last}},{{/unless}} {{/eq}} {{/each}} -))){{#unless @last}},{{/unless}} +); {{/if}} {{/and}} {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs index 1ca25b7d965..b02da82b477 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs @@ -3,6 +3,7 @@ package {{{packageName}}}.schemas.validation; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.exceptions.InvalidTypeException; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -12,11 +13,205 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; +import java.util.regex.Pattern; public abstract class JsonSchema { + public final Set> type; + public final String format; + public final Class items; + public final Map> properties; + public final Set required; + public final Number exclusiveMaximum; + public final Number exclusiveMinimum; + public final Integer maxItems; + public final Integer minItems; + public final Integer maxLength; + public final Integer minLength; + public final Integer maxProperties; + public final Integer minProperties; + public final Number maximum; + public final Number minimum; + public final BigDecimal multipleOf; + public final Class additionalProperties; + public final List> allOf; + public final List> anyOf; + public final List> oneOf; + public final Class not; + public final Boolean uniqueItems; + public final Set enumValues; + public final Pattern pattern; public final LinkedHashMap keywordToValidator; - protected JsonSchema(LinkedHashMap keywordToValidator) { + protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { + LinkedHashMap keywordToValidator = new LinkedHashMap<>(); + this.type = jsonSchemaInfo.type; + if (this.type != null) { + keywordToValidator.put( + "type", + new TypeValidator(this.type) + ); + } + this.format = jsonSchemaInfo.format; + if (this.format != null) { + keywordToValidator.put( + "format", + new FormatValidator(this.format) + ); + } + this.items = jsonSchemaInfo.items; + if (this.items != null) { + keywordToValidator.put( + "items", + new ItemsValidator(this.items) + ); + } + this.properties = jsonSchemaInfo.properties; + if (this.properties != null) { + keywordToValidator.put( + "properties", + new PropertiesValidator(this.properties) + ); + } + this.required = jsonSchemaInfo.required; + if (this.required != null) { + keywordToValidator.put( + "required", + new RequiredValidator(this.required) + ); + } + this.exclusiveMaximum = jsonSchemaInfo.exclusiveMaximum; + if (this.exclusiveMaximum != null) { + keywordToValidator.put( + "exclusiveMaximum", + new ExclusiveMaximumValidator(this.exclusiveMaximum) + ); + } + this.exclusiveMinimum = jsonSchemaInfo.exclusiveMinimum; + if (this.exclusiveMinimum != null) { + keywordToValidator.put( + "exclusiveMinimum", + new ExclusiveMinimumValidator(this.exclusiveMinimum) + ); + } + this.maxItems = jsonSchemaInfo.maxItems; + if (this.maxItems != null) { + keywordToValidator.put( + "maxItems", + new MaxItemsValidator(this.maxItems) + ); + } + this.minItems = jsonSchemaInfo.minItems; + if (this.minItems != null) { + keywordToValidator.put( + "minItems", + new MinItemsValidator(this.minItems) + ); + } + this.maxLength = jsonSchemaInfo.maxLength; + if (this.maxLength != null) { + keywordToValidator.put( + "maxLength", + new MaxLengthValidator(this.maxLength) + ); + } + this.minLength = jsonSchemaInfo.minLength; + if (this.minLength != null) { + keywordToValidator.put( + "minLength", + new MinLengthValidator(this.minLength) + ); + } + this.maxProperties = jsonSchemaInfo.maxProperties; + if (this.maxProperties != null) { + keywordToValidator.put( + "maxProperties", + new MaxPropertiesValidator(this.maxProperties) + ); + } + this.minProperties = jsonSchemaInfo.minProperties; + if (this.minProperties != null) { + keywordToValidator.put( + "minProperties", + new MinPropertiesValidator(this.minProperties) + ); + } + this.maximum = jsonSchemaInfo.maximum; + if (this.maximum != null) { + keywordToValidator.put( + "maximum", + new MaximumValidator(this.maximum) + ); + } + this.minimum = jsonSchemaInfo.minimum; + if (this.minimum != null) { + keywordToValidator.put( + "minimum", + new MinimumValidator(this.minimum) + ); + } + this.multipleOf = jsonSchemaInfo.multipleOf; + if (this.multipleOf != null) { + keywordToValidator.put( + "multipleOf", + new MultipleOfValidator(this.multipleOf) + ); + } + this.additionalProperties = jsonSchemaInfo.additionalProperties; + if (this.additionalProperties != null) { + keywordToValidator.put( + "additionalProperties", + new AdditionalPropertiesValidator(this.additionalProperties) + ); + } + this.allOf = jsonSchemaInfo.allOf; + if (this.allOf != null) { + keywordToValidator.put( + "allOf", + new AllOfValidator(this.allOf) + ); + } + this.anyOf = jsonSchemaInfo.anyOf; + if (this.anyOf != null) { + keywordToValidator.put( + "anyOf", + new AnyOfValidator(this.anyOf) + ); + } + this.oneOf = jsonSchemaInfo.oneOf; + if (this.oneOf != null) { + keywordToValidator.put( + "oneOf", + new OneOfValidator(this.oneOf) + ); + } + this.not = jsonSchemaInfo.not; + if (this.not != null) { + keywordToValidator.put( + "not", + new NotValidator(this.not) + ); + } + this.uniqueItems = jsonSchemaInfo.uniqueItems; + if (this.uniqueItems != null) { + keywordToValidator.put( + "uniqueItems", + new UniqueItemsValidator(this.uniqueItems) + ); + } + this.enumValues = jsonSchemaInfo.enumValues; + if (this.enumValues != null) { + keywordToValidator.put( + "enum", + new EnumValidator(this.enumValues) + ); + } + this.pattern = jsonSchemaInfo.pattern; + if (this.pattern != null) { + keywordToValidator.put( + "pattern", + new PatternValidator(this.pattern) + ); + } this.keywordToValidator = keywordToValidator; } diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs new file mode 100644 index 00000000000..3c11ad6bdcc --- /dev/null +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs @@ -0,0 +1,34 @@ +package {{{packageName}}}.schemas.validation; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +public class JsonSchemaInfo { + public Set> type; + public String format; + public Class items; + public Map> properties; + public Set required; + public Number exclusiveMaximum; + public Number exclusiveMinimum; + public Integer maxItems; + public Integer minItems; + public Integer maxLength; + public Integer minLength; + public Integer maxProperties; + public Integer minProperties; + public Number maximum; + public Number minimum; + public BigDecimal multipleOf; + public Class additionalProperties; + public List> allOf; + public List> anyOf; + public List> oneOf; + public Class not; + public Boolean uniqueItems; + public Set enumValues; + public Pattern pattern; +} From 77e066826d1a8ddd342a9d48e7d9f4f658cf7b54 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 14 Dec 2023 22:28:25 -0800 Subject: [PATCH 02/12] Removes some unused validator imports --- .../java/.openapi-generator/FILES | 1 + ...pertiesAllowsASchemaWhichShouldValidate.md | 2 +- ...AdditionalpropertiesAreAllowedByDefault.md | 2 +- .../AdditionalpropertiesCanExistByItself.md | 2 +- ...nalpropertiesShouldNotLookInApplicators.md | 4 +- .../java/docs/components/schemas/Allof.md | 4 +- .../components/schemas/AllofWithBaseSchema.md | 6 +- .../components/schemas/AnyofComplexTypes.md | 4 +- .../components/schemas/AnyofWithBaseSchema.md | 2 +- .../schemas/ArrayTypeMatchesArrays.md | 2 +- .../docs/components/schemas/DateTimeFormat.md | 2 +- .../docs/components/schemas/EmailFormat.md | 2 +- .../schemas/EnumWith0DoesNotMatchFalse.md | 2 +- .../schemas/EnumWith1DoesNotMatchTrue.md | 2 +- .../schemas/EnumWithEscapedCharacters.md | 2 +- .../schemas/EnumWithFalseDoesNotMatch0.md | 2 +- .../schemas/EnumWithTrueDoesNotMatch1.md | 2 +- .../components/schemas/EnumsInProperties.md | 6 +- .../components/schemas/ForbiddenProperty.md | 2 +- .../docs/components/schemas/HostnameFormat.md | 2 +- ...ShouldNotRaiseErrorWhenFloatDivisionInf.md | 2 +- .../schemas/InvalidStringValueForDefault.md | 4 +- .../docs/components/schemas/Ipv4Format.md | 2 +- .../docs/components/schemas/Ipv6Format.md | 2 +- .../components/schemas/JsonPointerFormat.md | 2 +- .../docs/components/schemas/NestedItems.md | 8 +- .../schemas/NotMoreComplexSchema.md | 2 +- .../schemas/NulCharactersInStrings.md | 2 +- .../schemas/ObjectPropertiesValidation.md | 2 +- .../components/schemas/OneofComplexTypes.md | 4 +- .../components/schemas/OneofWithBaseSchema.md | 2 +- .../components/schemas/OneofWithRequired.md | 2 +- .../PropertiesWithEscapedCharacters.md | 2 +- .../PropertyNamedRefThatIsNotAReference.md | 2 +- .../schemas/RefInAdditionalproperties.md | 2 +- .../docs/components/schemas/RefInItems.md | 2 +- .../docs/components/schemas/RefInProperty.md | 2 +- .../schemas/RequiredDefaultValidation.md | 2 +- .../components/schemas/RequiredValidation.md | 2 +- .../schemas/RequiredWithEmptyArray.md | 2 +- .../schemas/SimpleEnumValidation.md | 2 +- ...DoesNotDoAnythingIfThePropertyIsMissing.md | 4 +- .../java/docs/components/schemas/UriFormat.md | 2 +- .../components/schemas/UriReferenceFormat.md | 2 +- .../components/schemas/UriTemplateFormat.md | 2 +- ...rtiesAllowsASchemaWhichShouldValidate.java | 16 ++- ...ditionalpropertiesAreAllowedByDefault.java | 11 +-- .../AdditionalpropertiesCanExistByItself.java | 11 +-- ...lpropertiesShouldNotLookInApplicators.java | 17 ++-- .../client/components/schemas/Allof.java | 23 +++-- .../schemas/AllofCombinedWithAnyofOneof.java | 18 ++-- .../components/schemas/AllofSimpleTypes.java | 14 +-- .../schemas/AllofWithBaseSchema.java | 27 +++-- .../schemas/AllofWithOneEmptySchema.java | 6 +- .../schemas/AllofWithTheFirstEmptySchema.java | 6 +- .../schemas/AllofWithTheLastEmptySchema.java | 6 +- .../schemas/AllofWithTwoEmptySchemas.java | 6 +- .../client/components/schemas/Anyof.java | 10 +- .../components/schemas/AnyofComplexTypes.java | 23 +++-- .../schemas/AnyofWithBaseSchema.java | 19 ++-- .../schemas/AnyofWithOneEmptySchema.java | 6 +- .../schemas/ArrayTypeMatchesArrays.java | 9 +- .../client/components/schemas/ByInt.java | 6 +- .../client/components/schemas/ByNumber.java | 6 +- .../components/schemas/BySmallNumber.java | 6 +- .../components/schemas/DateTimeFormat.java | 9 +- .../components/schemas/EmailFormat.java | 9 +- .../schemas/EnumWith0DoesNotMatchFalse.java | 11 +-- .../schemas/EnumWith1DoesNotMatchTrue.java | 11 +-- .../schemas/EnumWithEscapedCharacters.java | 11 +-- .../schemas/EnumWithFalseDoesNotMatch0.java | 9 +- .../schemas/EnumWithTrueDoesNotMatch1.java | 9 +- .../components/schemas/EnumsInProperties.java | 30 +++--- .../components/schemas/ForbiddenProperty.java | 11 +-- .../components/schemas/HostnameFormat.java | 9 +- ...ouldNotRaiseErrorWhenFloatDivisionInf.java | 11 +-- .../schemas/InvalidStringValueForDefault.java | 20 ++-- .../client/components/schemas/Ipv4Format.java | 9 +- .../client/components/schemas/Ipv6Format.java | 9 +- .../components/schemas/JsonPointerFormat.java | 9 +- .../components/schemas/MaximumValidation.java | 6 +- .../MaximumValidationWithUnsignedInteger.java | 6 +- .../schemas/MaxitemsValidation.java | 6 +- .../schemas/MaxlengthValidation.java | 6 +- .../Maxproperties0MeansTheObjectIsEmpty.java | 6 +- .../schemas/MaxpropertiesValidation.java | 6 +- .../components/schemas/MinimumValidation.java | 6 +- .../MinimumValidationWithSignedInteger.java | 6 +- .../schemas/MinitemsValidation.java | 6 +- .../schemas/MinlengthValidation.java | 6 +- .../schemas/MinpropertiesValidation.java | 6 +- ...NestedAllofToCheckValidationSemantics.java | 10 +- ...NestedAnyofToCheckValidationSemantics.java | 10 +- .../components/schemas/NestedItems.java | 27 +++-- ...NestedOneofToCheckValidationSemantics.java | 10 +- .../client/components/schemas/Not.java | 6 +- .../schemas/NotMoreComplexSchema.java | 18 ++-- .../schemas/NulCharactersInStrings.java | 11 +-- .../schemas/ObjectPropertiesValidation.java | 11 +-- .../client/components/schemas/Oneof.java | 10 +- .../components/schemas/OneofComplexTypes.java | 23 +++-- .../schemas/OneofWithBaseSchema.java | 19 ++-- .../schemas/OneofWithEmptySchema.java | 6 +- .../components/schemas/OneofWithRequired.java | 17 ++-- .../schemas/PatternIsNotAnchored.java | 6 +- .../components/schemas/PatternValidation.java | 6 +- .../PropertiesWithEscapedCharacters.java | 11 +-- .../PropertyNamedRefThatIsNotAReference.java | 11 +-- .../schemas/RefInAdditionalproperties.java | 11 +-- .../client/components/schemas/RefInAllof.java | 6 +- .../client/components/schemas/RefInAnyof.java | 6 +- .../client/components/schemas/RefInItems.java | 9 +- .../client/components/schemas/RefInNot.java | 6 +- .../client/components/schemas/RefInOneof.java | 6 +- .../components/schemas/RefInProperty.java | 11 +-- .../schemas/RequiredDefaultValidation.java | 11 +-- .../schemas/RequiredValidation.java | 11 +-- .../schemas/RequiredWithEmptyArray.java | 11 +-- .../RequiredWithEscapedCharacters.java | 6 +- .../schemas/SimpleEnumValidation.java | 11 +-- ...esNotDoAnythingIfThePropertyIsMissing.java | 22 ++--- .../schemas/UniqueitemsFalseValidation.java | 6 +- .../schemas/UniqueitemsValidation.java | 6 +- .../client/components/schemas/UriFormat.java | 9 +- .../schemas/UriReferenceFormat.java | 9 +- .../components/schemas/UriTemplateFormat.java | 9 +- .../schemas/validation/JsonSchemaInfo.java | 98 ++++++++++++++++++- .../generators/JavaClientGenerator.java | 27 ----- .../_Schema_anytypeOrMultitype.hbs | 8 +- .../schemas/SchemaClass/_Schema_boolean.hbs | 6 +- .../schemas/SchemaClass/_Schema_list.hbs | 4 +- .../schemas/SchemaClass/_Schema_map.hbs | 6 +- .../schemas/SchemaClass/_Schema_null.hbs | 6 +- .../schemas/SchemaClass/_Schema_number.hbs | 8 +- .../schemas/SchemaClass/_Schema_string.hbs | 8 +- .../SchemaClass/_additionalProperties.hbs | 8 +- .../schemas/SchemaClass/_format.hbs | 2 +- .../schemas/SchemaClass/_properties.hbs | 6 +- .../components/schemas/SchemaClass/_types.hbs | 6 +- .../schemas/validation/JsonSchemaInfo.hbs | 98 ++++++++++++++++++- 140 files changed, 695 insertions(+), 578 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES b/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES index 48162be553e..f9577b3c188 100644 --- a/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES +++ b/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES @@ -214,6 +214,7 @@ src/main/java/org/openapijsonschematools/client/schemas/validation/FrozenMap.jav src/main/java/org/openapijsonschematools/client/schemas/validation/ItemsValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaFactory.java +src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordEntry.java src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/LengthValidator.java diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md index a1fdead352c..c708ce95306 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md @@ -52,7 +52,7 @@ AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsA ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md index ecd3c05d979..1f718e9f190 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md index d6025b38622..7df2aa9f254 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md @@ -50,7 +50,7 @@ AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap val ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md index 2997dce75f6..15230ec1f08 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md @@ -30,7 +30,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -77,7 +77,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md index 6baecd57b59..1f0c43731d3 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md @@ -55,7 +55,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +114,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md index d610f2e1bbf..c5d2f908981 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md @@ -34,7 +34,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    ))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    ))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -93,7 +93,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("baz", [Baz.class](#baz)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "baz"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("baz", [Baz.class](#baz)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "baz"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -152,7 +152,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md index de364e91761..1d2887472a8 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md @@ -55,7 +55,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +114,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md index e2fe0b17fdb..91bd3df0440 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md @@ -47,7 +47,7 @@ String validatedPayload = AnyofWithBaseSchema.AnyofWithBaseSchema1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md index 359a5373652..155b773ae0f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md @@ -50,7 +50,7 @@ ArrayTypeMatchesArrays.ArrayTypeMatchesArraysList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md index 4dd56482c25..95ad606d332 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("date-time"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "date-time";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md index 6c1161c1c01..44f2590fc0c 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("email"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "email";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md index fc48294219f..7a36486c715 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md @@ -45,7 +45,7 @@ int validatedPayload = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.va ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        0)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        0)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md index c1e70047004..f13ebb1dedb 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md @@ -45,7 +45,7 @@ int validatedPayload = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.vali ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md index bc14f176607..1cf4f546f70 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md @@ -45,7 +45,7 @@ String validatedPayload = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.v ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "foo\nbar",
        "foo\rbar"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "foo\nbar",
        "foo\rbar"
)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md index 906593d76d1..eaa7495ff4f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md @@ -45,7 +45,7 @@ boolean validatedPayload = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch0 ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        false)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        false)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md index dc92ec8ea36..693303d923f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md @@ -45,7 +45,7 @@ boolean validatedPayload = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11. ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        true)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        true)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md index 74d05be69bf..64b6f8e7615 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md @@ -59,7 +59,7 @@ EnumsInProperties.EnumsInPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -124,7 +124,7 @@ String validatedPayload = EnumsInProperties.Bar.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "bar"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "bar"
)))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -162,7 +162,7 @@ String validatedPayload = EnumsInProperties.Foo.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "foo"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "foo"
)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md index ec59b727745..f0e972fbe14 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md index c19534d3d8d..5ed4d192c2e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("hostname"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "hostname";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md index 6488cfa2f27..ee91e112605 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md @@ -45,7 +45,7 @@ long validatedPayload = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.I ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("multipleOf", new MultipleOfValidator(0.123456789))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("multipleOf", new MultipleOfValidator(0.123456789))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md index 96c40a54f16..bd82082ad14 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -97,7 +97,7 @@ String validatedPayload = InvalidStringValueForDefault.Bar.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(4))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("minLength", new MinLengthValidator(4))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md index 486ba3e614d..26ae3fb2961 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("ipv4"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "ipv4";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md index b22c8130af8..c3bdacc2c16 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("ipv6"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "ipv6";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md index 705d0efde79..5a6563174e7 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("json-pointer"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "json-pointer";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md index 46da1ab29dc..b6ec5ce21f5 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md @@ -66,7 +66,7 @@ NestedItems.NestedItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -133,7 +133,7 @@ NestedItems.ItemsList2 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items1.class](#items1)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items1.class](#items1)))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -198,7 +198,7 @@ NestedItems.ItemsList1 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -261,7 +261,7 @@ NestedItems.ItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items3.class](#items3)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items3.class](#items3)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md index 46bbbb5b1dc..bfaa7c6cadc 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md @@ -79,7 +79,7 @@ NotMoreComplexSchema.NotMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md index f27ed5b08eb..b98f5e37fa5 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md @@ -45,7 +45,7 @@ String validatedPayload = NulCharactersInStrings.NulCharactersInStrings1.validat ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "hello\0there"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "hello\0there"
)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md index c48db59c128..0c852d1a775 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md index 18085a91a61..b38dbcfc94b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md @@ -55,7 +55,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +114,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md index 400527b664c..b00b1b02706 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md @@ -47,7 +47,7 @@ String validatedPayload = OneofWithBaseSchema.OneofWithBaseSchema1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md index a329cdfaa6f..2a41de8d192 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md @@ -29,7 +29,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md index 3a2a2e724ff..ae37703e455 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo\nbar", [Foonbar.class](#foonbar))),
        new PropertyEntry("foo\"bar", [Foobar.class](#foobar))),
        new PropertyEntry("foo\\bar", [Foobar1.class](#foobar1))),
        new PropertyEntry("foo\rbar", [Foorbar.class](#foorbar))),
        new PropertyEntry("foo\tbar", [Footbar.class](#footbar))),
        new PropertyEntry("foo\fbar", [Foofbar.class](#foofbar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo\nbar", [Foonbar.class](#foonbar))),
        new PropertyEntry("foo\"bar", [Foobar.class](#foobar))),
        new PropertyEntry("foo\\bar", [Foobar1.class](#foobar1))),
        new PropertyEntry("foo\rbar", [Foorbar.class](#foorbar))),
        new PropertyEntry("foo\tbar", [Footbar.class](#footbar))),
        new PropertyEntry("foo\fbar", [Foofbar.class](#foofbar)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md index 3f09a02b347..c9cd4195cbd 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("$ref", [Ref.class](#ref)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("$ref", [Ref.class](#ref)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md index 866322eb3ca..4103bbce7ad 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md @@ -49,7 +49,7 @@ RefInAdditionalproperties.RefInAdditionalpropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    additionalProperties = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md index ba497b1a3c0..d357b6a6983 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md @@ -49,7 +49,7 @@ RefInItems.RefInItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md index 44110154189..a2bdbe64cb2 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("a", [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("a", [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md index 1f7d1e795e9..82cb1628214 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md index edc91a6b1a9..d7ab9ae4dbe 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md index 55d133a5546..eef7ccfbf9e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md index 9e1d0e5cacb..1548c719669 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md @@ -45,7 +45,7 @@ int validatedPayload = SimpleEnumValidation.SimpleEnumValidation1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1,        2,        3)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1,        2,        3)))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md index 942eb4757ae..3a4c6d10a39 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md @@ -54,7 +54,7 @@ TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.TheDefaultKeywordDoesNo ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("alpha", [Alpha.class](#alpha)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("alpha", [Alpha.class](#alpha)))
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -117,7 +117,7 @@ int validatedPayload = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing. ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("maximum", new MaximumValidator(3))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("maximum", new MaximumValidator(3))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md index 14560e3d94a..9d07a6f7f9b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("uri"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "uri";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md index bfd028c9e30..6d3f2888f0e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("uri-reference"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "uri-reference";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md index 6ba24c13243..1ccdf229fc1 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("uri-template"))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "uri-template";
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java index 27dbb3a2810..dcc844a49af 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java @@ -16,12 +16,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AdditionalpropertiesAllowsASchemaWhichShouldValidate { @@ -81,14 +79,14 @@ public static class AdditionalpropertiesAllowsASchemaWhichShouldValidate1 extend */ private static AdditionalpropertiesAllowsASchemaWhichShouldValidate1 instance; protected AdditionalpropertiesAllowsASchemaWhichShouldValidate1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class), new PropertyEntry("bar", Bar.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static AdditionalpropertiesAllowsASchemaWhichShouldValidate1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java index d53a2180a20..127a7dfe06d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -85,12 +84,12 @@ public static class AdditionalpropertiesAreAllowedByDefault1 extends JsonSchema */ private static AdditionalpropertiesAreAllowedByDefault1 instance; protected AdditionalpropertiesAreAllowedByDefault1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class), new PropertyEntry("bar", Bar.class) - ))) - ))); + )) + ); } public static AdditionalpropertiesAreAllowedByDefault1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java index 7c8a84cedd4..61b5b2b74dc 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java @@ -15,10 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AdditionalpropertiesCanExistByItself { @@ -57,10 +56,10 @@ public static class AdditionalpropertiesCanExistByItself1 extends JsonSchema imp */ private static AdditionalpropertiesCanExistByItself1 instance; protected AdditionalpropertiesCanExistByItself1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static AdditionalpropertiesCanExistByItself1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java index 34b852d14e0..fc73b4b6a19 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java @@ -21,9 +21,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -75,11 +74,11 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))) - ))); + )) + ); } public static Schema0 getInstance() { @@ -326,12 +325,12 @@ public static class AdditionalpropertiesShouldNotLookInApplicators1 extends Json */ private static AdditionalpropertiesShouldNotLookInApplicators1 instance; protected AdditionalpropertiesShouldNotLookInApplicators1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)), + super(new JsonSchemaInfo() + .additionalProperties(AdditionalProperties.class) new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class ))) - ))); + ); } public static AdditionalpropertiesShouldNotLookInApplicators1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index 2857757a8d9..1ebdb68c410 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -20,9 +20,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -70,14 +69,14 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "bar" ))) - ))); + ); } public static Schema0 getInstance() { @@ -328,14 +327,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "foo" ))) - ))); + ); } public static Schema1 getInstance() { @@ -562,12 +561,12 @@ public static class Allof1 extends JsonSchema implements SchemaNullValidator, Sc */ private static Allof1 instance; protected Allof1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static Allof1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index ce8203c4f15..f62a078b20f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -19,7 +19,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -38,9 +38,9 @@ public class AllofCombinedWithAnyofOneof { public static class Schema02 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema02 instance; protected Schema02() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("multipleOf", new MultipleOfValidator(2)) - ))); + ); } public static Schema02 getInstance() { @@ -250,9 +250,9 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema01 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema01 instance; protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("multipleOf", new MultipleOfValidator(3)) - ))); + ); } public static Schema01 getInstance() { @@ -462,9 +462,9 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("multipleOf", new MultipleOfValidator(5)) - ))); + ); } public static Schema0 getInstance() { @@ -680,7 +680,7 @@ public static class AllofCombinedWithAnyofOneof1 extends JsonSchema implements S */ private static AllofCombinedWithAnyofOneof1 instance; protected AllofCombinedWithAnyofOneof1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema02.class ))), @@ -690,7 +690,7 @@ protected AllofCombinedWithAnyofOneof1() { new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema0.class ))) - ))); + ); } public static AllofCombinedWithAnyofOneof1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java index e29add28a9f..9860631273e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaximumValidator; import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -37,9 +37,9 @@ public class AllofSimpleTypes { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maximum", new MaximumValidator(30)) - ))); + ); } public static Schema0 getInstance() { @@ -249,9 +249,9 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minimum", new MinimumValidator(20)) - ))); + ); } public static Schema1 getInstance() { @@ -467,12 +467,12 @@ public static class AllofSimpleTypes1 extends JsonSchema implements SchemaNullVa */ private static AllofSimpleTypes1 instance; protected AllofSimpleTypes1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static AllofSimpleTypes1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index 45f23ca29c0..388704898f4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -21,9 +21,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -71,14 +70,14 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "foo" ))) - ))); + ); } public static Schema0 getInstance() { @@ -329,14 +328,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("baz", Baz.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "baz" ))) - ))); + ); } public static Schema1 getInstance() { @@ -593,10 +592,10 @@ public static class AllofWithBaseSchema1 extends JsonSchema implements SchemaNul */ private static AllofWithBaseSchema1 instance; protected AllofWithBaseSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "bar" ))), @@ -604,7 +603,7 @@ protected AllofWithBaseSchema1() { Schema0.class, Schema1.class ))) - ))); + ); } public static AllofWithBaseSchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java index ec6c79e3965..0f5d819f035 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java @@ -19,7 +19,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -45,11 +45,11 @@ public static class AllofWithOneEmptySchema1 extends JsonSchema implements Schem */ private static AllofWithOneEmptySchema1 instance; protected AllofWithOneEmptySchema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class ))) - ))); + ); } public static AllofWithOneEmptySchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java index fb531131a7a..f069a8c5936 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java @@ -20,7 +20,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -49,12 +49,12 @@ public static class AllofWithTheFirstEmptySchema1 extends JsonSchema implements */ private static AllofWithTheFirstEmptySchema1 instance; protected AllofWithTheFirstEmptySchema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static AllofWithTheFirstEmptySchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java index e061e8ee2f7..30cc99b0b66 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java @@ -20,7 +20,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -49,12 +49,12 @@ public static class AllofWithTheLastEmptySchema1 extends JsonSchema implements S */ private static AllofWithTheLastEmptySchema1 instance; protected AllofWithTheLastEmptySchema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static AllofWithTheLastEmptySchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java index ff52349b125..cfc84b9b4aa 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java @@ -19,7 +19,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -48,12 +48,12 @@ public static class AllofWithTwoEmptySchemas1 extends JsonSchema implements Sche */ private static AllofWithTwoEmptySchemas1 instance; protected AllofWithTwoEmptySchemas1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static AllofWithTwoEmptySchemas1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java index bbe8693701a..2fa13a547cb 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java @@ -19,7 +19,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -40,9 +40,9 @@ public static class Schema0 extends IntJsonSchema {} public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minimum", new MinimumValidator(2)) - ))); + ); } public static Schema1 getInstance() { @@ -258,12 +258,12 @@ public static class Anyof1 extends JsonSchema implements SchemaNullValidator, Sc */ private static Anyof1 instance; protected Anyof1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("anyOf", new AnyOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static Anyof1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index deb5ceea90d..6d74e830e49 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -20,9 +20,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -70,14 +69,14 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "bar" ))) - ))); + ); } public static Schema0 getInstance() { @@ -328,14 +327,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "foo" ))) - ))); + ); } public static Schema1 getInstance() { @@ -562,12 +561,12 @@ public static class AnyofComplexTypes1 extends JsonSchema implements SchemaNullV */ private static AnyofComplexTypes1 instance; protected AnyofComplexTypes1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("anyOf", new AnyOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static AnyofComplexTypes1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index c28ff344ebc..7d87ca727df 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -28,7 +28,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AnyofWithBaseSchema { @@ -38,9 +37,9 @@ public class AnyofWithBaseSchema { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maxLength", new MaxLengthValidator(2)) - ))); + ); } public static Schema0 getInstance() { @@ -250,9 +249,9 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minLength", new MinLengthValidator(4)) - ))); + ); } public static Schema1 getInstance() { @@ -469,15 +468,15 @@ public static class AnyofWithBaseSchema1 extends JsonSchema implements SchemaStr private static AnyofWithBaseSchema1 instance; protected AnyofWithBaseSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), + ) new KeywordEntry("anyOf", new AnyOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static AnyofWithBaseSchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java index a751f30d2af..a2dfa48b3e6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java @@ -20,7 +20,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -49,12 +49,12 @@ public static class AnyofWithOneEmptySchema1 extends JsonSchema implements Schem */ private static AnyofWithOneEmptySchema1 instance; protected AnyofWithOneEmptySchema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("anyOf", new AnyOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static AnyofWithOneEmptySchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java index 81b3f757104..6eee6464c0f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java @@ -15,10 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ArrayTypeMatchesArrays { @@ -51,10 +50,10 @@ public static class ArrayTypeMatchesArrays1 extends JsonSchema implements Schema */ private static ArrayTypeMatchesArrays1 instance; protected ArrayTypeMatchesArrays1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + ); } public static ArrayTypeMatchesArrays1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java index ab93a559462..4d03eaf7a66 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class ByInt1 extends JsonSchema implements SchemaNullValidator, Sc */ private static ByInt1 instance; protected ByInt1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("multipleOf", new MultipleOfValidator(2)) - ))); + ); } public static ByInt1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java index ff9504257a7..eaa074a2a07 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class ByNumber1 extends JsonSchema implements SchemaNullValidator, */ private static ByNumber1 instance; protected ByNumber1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("multipleOf", new MultipleOfValidator(1.5)) - ))); + ); } public static ByNumber1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java index 41b40eae7cd..38ca1b37dc7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class BySmallNumber1 extends JsonSchema implements SchemaNullValid */ private static BySmallNumber1 instance; protected BySmallNumber1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("multipleOf", new MultipleOfValidator(0.00010)) - ))); + ); } public static BySmallNumber1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java index 9b695c34b14..df34573c1ff 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class DateTimeFormat1 extends JsonSchema implements SchemaNullVali */ private static DateTimeFormat1 instance; protected DateTimeFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + super(new JsonSchemaInfo() + .format("date-time") + ); } public static DateTimeFormat1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java index 2587fbe5b1c..48bda53a254 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class EmailFormat1 extends JsonSchema implements SchemaNullValidat */ private static EmailFormat1 instance; protected EmailFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("email")) - ))); + super(new JsonSchemaInfo() + .format("email") + ); } public static EmailFormat1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java index 2f3147a8590..c9ca60512e1 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumWith0DoesNotMatchFalse { @@ -33,17 +32,17 @@ public static class EnumWith0DoesNotMatchFalse1 extends JsonSchema implements Sc */ private static EnumWith0DoesNotMatchFalse1 instance; protected EnumWith0DoesNotMatchFalse1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), + ) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( 0 ))) - ))); + ); } public static EnumWith0DoesNotMatchFalse1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java index 601450ab1a5..59c8a37f195 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumWith1DoesNotMatchTrue { @@ -33,17 +32,17 @@ public static class EnumWith1DoesNotMatchTrue1 extends JsonSchema implements Sch */ private static EnumWith1DoesNotMatchTrue1 instance; protected EnumWith1DoesNotMatchTrue1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), + ) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( 1 ))) - ))); + ); } public static EnumWith1DoesNotMatchTrue1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java index 237eaf33ba7..61582178fce 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumWithEscapedCharacters { @@ -34,15 +33,15 @@ public static class EnumWithEscapedCharacters1 extends JsonSchema implements Sch private static EnumWithEscapedCharacters1 instance; protected EnumWithEscapedCharacters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), + ) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( "foo\nbar", "foo\rbar" ))) - ))); + ); } public static EnumWithEscapedCharacters1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java index dd7d0a2a758..fbe3450f631 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumWithFalseDoesNotMatch0 { @@ -33,12 +32,12 @@ public static class EnumWithFalseDoesNotMatch01 extends JsonSchema implements Sc */ private static EnumWithFalseDoesNotMatch01 instance; protected EnumWithFalseDoesNotMatch01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))), + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( false ))) - ))); + ); } public static EnumWithFalseDoesNotMatch01 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java index a494fa2c13f..d7eaedfb19d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumWithTrueDoesNotMatch1 { @@ -33,12 +32,12 @@ public static class EnumWithTrueDoesNotMatch11 extends JsonSchema implements Sch */ private static EnumWithTrueDoesNotMatch11 instance; protected EnumWithTrueDoesNotMatch11() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))), + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( true ))) - ))); + ); } public static EnumWithTrueDoesNotMatch11 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java index 9744ab742e8..81e29cb1f07 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java @@ -15,14 +15,12 @@ import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumsInProperties { @@ -33,14 +31,14 @@ public static class Foo extends JsonSchema implements SchemaStringValidator { private static Foo instance; protected Foo() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), + ) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( "foo" ))) - ))); + ); } public static Foo getInstance() { @@ -84,14 +82,14 @@ public static class Bar extends JsonSchema implements SchemaStringValidator { private static Bar instance; protected Bar() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), + ) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( "bar" ))) - ))); + ); } public static Bar getInstance() { @@ -175,16 +173,16 @@ public static class EnumsInProperties1 extends JsonSchema implements SchemaMapVa */ private static EnumsInProperties1 instance; protected EnumsInProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class), new PropertyEntry("bar", Bar.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "bar" ))) - ))); + ); } public static EnumsInProperties1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java index ba3c9b57911..b174cbc1d03 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java @@ -19,9 +19,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -77,11 +76,11 @@ public static class ForbiddenProperty1 extends JsonSchema implements SchemaNullV */ private static ForbiddenProperty1 instance; protected ForbiddenProperty1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))) - ))); + )) + ); } public static ForbiddenProperty1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java index daf5de8d388..f5648bbb8d7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class HostnameFormat1 extends JsonSchema implements SchemaNullVali */ private static HostnameFormat1 instance; protected HostnameFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("hostname")) - ))); + super(new JsonSchemaInfo() + .format("hostname") + ); } public static HostnameFormat1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java index 298932a3cb1..edf23cee95a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java @@ -12,11 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf { @@ -32,15 +31,15 @@ public static class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1 exte */ private static InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1 instance; protected InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), + ) new KeywordEntry("multipleOf", new MultipleOfValidator(0.123456789)) - ))); + ); } public static InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java index 5efb2caac26..c749fe4f897 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java @@ -17,10 +17,9 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -28,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class InvalidStringValueForDefault { @@ -39,12 +37,12 @@ public static class Bar extends JsonSchema implements SchemaStringValidator { private static Bar instance; protected Bar() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), + ) new KeywordEntry("minLength", new MinLengthValidator(4)) - ))); + ); } public static Bar getInstance() { @@ -122,11 +120,11 @@ public static class InvalidStringValueForDefault1 extends JsonSchema implements */ private static InvalidStringValueForDefault1 instance; protected InvalidStringValueForDefault1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) - ))) - ))); + )) + ); } public static InvalidStringValueForDefault1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java index 762799c9071..2983cb7255d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class Ipv4Format1 extends JsonSchema implements SchemaNullValidato */ private static Ipv4Format1 instance; protected Ipv4Format1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("ipv4")) - ))); + super(new JsonSchemaInfo() + .format("ipv4") + ); } public static Ipv4Format1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java index 2d09b65f522..cf8b08a1e51 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class Ipv6Format1 extends JsonSchema implements SchemaNullValidato */ private static Ipv6Format1 instance; protected Ipv6Format1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("ipv6")) - ))); + super(new JsonSchemaInfo() + .format("ipv6") + ); } public static Ipv6Format1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java index d764e102b05..e45ba538ce3 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class JsonPointerFormat1 extends JsonSchema implements SchemaNullV */ private static JsonPointerFormat1 instance; protected JsonPointerFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("json-pointer")) - ))); + super(new JsonSchemaInfo() + .format("json-pointer") + ); } public static JsonPointerFormat1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java index 1c3ca4cd771..e7040d445db 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaximumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MaximumValidation1 extends JsonSchema implements SchemaNullV */ private static MaximumValidation1 instance; protected MaximumValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maximum", new MaximumValidator(3.0)) - ))); + ); } public static MaximumValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java index 8074bc4b14f..c5ae095b438 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaximumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MaximumValidationWithUnsignedInteger1 extends JsonSchema imp */ private static MaximumValidationWithUnsignedInteger1 instance; protected MaximumValidationWithUnsignedInteger1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maximum", new MaximumValidator(300)) - ))); + ); } public static MaximumValidationWithUnsignedInteger1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java index 8a1ea95ce6a..805ccffe669 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaxItemsValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MaxitemsValidation1 extends JsonSchema implements SchemaNull */ private static MaxitemsValidation1 instance; protected MaxitemsValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maxItems", new MaxItemsValidator(2)) - ))); + ); } public static MaxitemsValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java index 25b5fb06337..df7c3ea3aa8 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MaxlengthValidation1 extends JsonSchema implements SchemaNul */ private static MaxlengthValidation1 instance; protected MaxlengthValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maxLength", new MaxLengthValidator(2)) - ))); + ); } public static MaxlengthValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java index 27cd24f740e..e67215a150c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaxPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class Maxproperties0MeansTheObjectIsEmpty1 extends JsonSchema impl */ private static Maxproperties0MeansTheObjectIsEmpty1 instance; protected Maxproperties0MeansTheObjectIsEmpty1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maxProperties", new MaxPropertiesValidator(0)) - ))); + ); } public static Maxproperties0MeansTheObjectIsEmpty1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java index d6c8c795a68..6a95216fd1b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaxPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MaxpropertiesValidation1 extends JsonSchema implements Schem */ private static MaxpropertiesValidation1 instance; protected MaxpropertiesValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maxProperties", new MaxPropertiesValidator(2)) - ))); + ); } public static MaxpropertiesValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java index 97f8b915e75..33afed8a700 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MinimumValidation1 extends JsonSchema implements SchemaNullV */ private static MinimumValidation1 instance; protected MinimumValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minimum", new MinimumValidator(1.1)) - ))); + ); } public static MinimumValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java index acb6aa002c1..2ccd6b7060c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MinimumValidationWithSignedInteger1 extends JsonSchema imple */ private static MinimumValidationWithSignedInteger1 instance; protected MinimumValidationWithSignedInteger1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minimum", new MinimumValidator(-2)) - ))); + ); } public static MinimumValidationWithSignedInteger1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java index 721cef12d30..fbcca04b3e1 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinItemsValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MinitemsValidation1 extends JsonSchema implements SchemaNull */ private static MinitemsValidation1 instance; protected MinitemsValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minItems", new MinItemsValidator(1)) - ))); + ); } public static MinitemsValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java index a67c6f36c84..ecd9f44a582 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MinlengthValidation1 extends JsonSchema implements SchemaNul */ private static MinlengthValidation1 instance; protected MinlengthValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minLength", new MinLengthValidator(2)) - ))); + ); } public static MinlengthValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java index fc10de23c4a..c46cc77dcad 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class MinpropertiesValidation1 extends JsonSchema implements Schem */ private static MinpropertiesValidation1 instance; protected MinpropertiesValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minProperties", new MinPropertiesValidator(1)) - ))); + ); } public static MinpropertiesValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java index f78f8101f77..cb42f8c7604 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java @@ -19,7 +19,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -39,11 +39,11 @@ public static class Schema01 extends NullJsonSchema {} public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema01.class ))) - ))); + ); } public static Schema0 getInstance() { @@ -259,11 +259,11 @@ public static class NestedAllofToCheckValidationSemantics1 extends JsonSchema im */ private static NestedAllofToCheckValidationSemantics1 instance; protected NestedAllofToCheckValidationSemantics1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class ))) - ))); + ); } public static NestedAllofToCheckValidationSemantics1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java index ed59d0ed959..e36bc7f4e0b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java @@ -19,7 +19,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -39,11 +39,11 @@ public static class Schema01 extends NullJsonSchema {} public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("anyOf", new AnyOfValidator(List.of( Schema01.class ))) - ))); + ); } public static Schema0 getInstance() { @@ -259,11 +259,11 @@ public static class NestedAnyofToCheckValidationSemantics1 extends JsonSchema im */ private static NestedAnyofToCheckValidationSemantics1 instance; protected NestedAnyofToCheckValidationSemantics1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("anyOf", new AnyOfValidator(List.of( Schema0.class ))) - ))); + ); } public static NestedAnyofToCheckValidationSemantics1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java index 227e04d20c6..627d9c5c2a4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java @@ -15,10 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NestedItems { @@ -45,10 +44,10 @@ public static class ItemsListInput { public static class Items2 extends JsonSchema implements SchemaListValidator { private static Items2 instance; protected Items2() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) new KeywordEntry("items", new ItemsValidator(Items3.class)) - ))); + ); } public static Items2 getInstance() { @@ -127,10 +126,10 @@ public static class ItemsListInput1 { public static class Items1 extends JsonSchema implements SchemaListValidator, FrozenList, ItemsList1> { private static Items1 instance; protected Items1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) new KeywordEntry("items", new ItemsValidator(Items2.class)) - ))); + ); } public static Items1 getInstance() { @@ -209,10 +208,10 @@ public static class ItemsListInput2 { public static class Items extends JsonSchema implements SchemaListValidator>, FrozenList>, ItemsList2> { private static Items instance; protected Items() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) new KeywordEntry("items", new ItemsValidator(Items1.class)) - ))); + ); } public static Items getInstance() { @@ -297,10 +296,10 @@ public static class NestedItems1 extends JsonSchema implements SchemaListValidat */ private static NestedItems1 instance; protected NestedItems1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + ); } public static NestedItems1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java index 86d7f9f9272..8252777291a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -39,11 +39,11 @@ public static class Schema01 extends NullJsonSchema {} public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema01.class ))) - ))); + ); } public static Schema0 getInstance() { @@ -259,11 +259,11 @@ public static class NestedOneofToCheckValidationSemantics1 extends JsonSchema im */ private static NestedOneofToCheckValidationSemantics1 instance; protected NestedOneofToCheckValidationSemantics1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema0.class ))) - ))); + ); } public static NestedOneofToCheckValidationSemantics1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java index 205f2ef7ae3..62a5c2983e6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.NotValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -45,9 +45,9 @@ public static class Not1 extends JsonSchema implements SchemaNullValidator, Sche */ private static Not1 instance; protected Not1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("not", new NotValidator(Not2.class)) - ))); + ); } public static Not1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java index 04c0b28653f..fdbf5ec0b5b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java @@ -18,10 +18,9 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.NotValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +28,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NotMoreComplexSchema { @@ -71,12 +69,12 @@ public static class NotMapInput { public static class Not extends JsonSchema implements SchemaMapValidator { private static Not instance; protected Not() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))) - ))); + )) + ); } public static Not getInstance() { @@ -148,9 +146,9 @@ public static class NotMoreComplexSchema1 extends JsonSchema implements SchemaNu */ private static NotMoreComplexSchema1 instance; protected NotMoreComplexSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("not", new NotValidator(Not.class)) - ))); + ); } public static NotMoreComplexSchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java index d9bb819a248..1b3ff66078b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NulCharactersInStrings { @@ -34,14 +33,14 @@ public static class NulCharactersInStrings1 extends JsonSchema implements Schema private static NulCharactersInStrings1 instance; protected NulCharactersInStrings1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), + ) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( "hello\0there" ))) - ))); + ); } public static NulCharactersInStrings1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java index e25b551da0f..5c50d51e4f5 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java @@ -19,9 +19,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -86,12 +85,12 @@ public static class ObjectPropertiesValidation1 extends JsonSchema implements Sc */ private static ObjectPropertiesValidation1 instance; protected ObjectPropertiesValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class), new PropertyEntry("bar", Bar.class) - ))) - ))); + )) + ); } public static ObjectPropertiesValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java index 37fbde1a3c7..51f243a7805 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -40,9 +40,9 @@ public static class Schema0 extends IntJsonSchema {} public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minimum", new MinimumValidator(2)) - ))); + ); } public static Schema1 getInstance() { @@ -258,12 +258,12 @@ public static class Oneof1 extends JsonSchema implements SchemaNullValidator, Sc */ private static Oneof1 instance; protected Oneof1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static Oneof1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java index 122d907cbe4..6b2ade10eb1 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java @@ -19,10 +19,9 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -70,14 +69,14 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "bar" ))) - ))); + ); } public static Schema0 getInstance() { @@ -328,14 +327,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "foo" ))) - ))); + ); } public static Schema1 getInstance() { @@ -562,12 +561,12 @@ public static class OneofComplexTypes1 extends JsonSchema implements SchemaNullV */ private static OneofComplexTypes1 instance; protected OneofComplexTypes1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static OneofComplexTypes1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java index 8bf2a0f154b..b544ff09561 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; @@ -28,7 +28,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class OneofWithBaseSchema { @@ -38,9 +37,9 @@ public class OneofWithBaseSchema { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("minLength", new MinLengthValidator(2)) - ))); + ); } public static Schema0 getInstance() { @@ -250,9 +249,9 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("maxLength", new MaxLengthValidator(4)) - ))); + ); } public static Schema1 getInstance() { @@ -469,15 +468,15 @@ public static class OneofWithBaseSchema1 extends JsonSchema implements SchemaStr private static OneofWithBaseSchema1 instance; protected OneofWithBaseSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), + ) new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static OneofWithBaseSchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java index cfb7ce3ba80..594a074320d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java @@ -19,7 +19,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -49,12 +49,12 @@ public static class OneofWithEmptySchema1 extends JsonSchema implements SchemaNu */ private static OneofWithEmptySchema1 instance; protected OneofWithEmptySchema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static OneofWithEmptySchema1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java index b897f5a3137..af8e1654722 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; @@ -27,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class OneofWithRequired { @@ -69,12 +68,12 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("required", new RequiredValidator(Set.of( "bar", "foo" ))) - ))); + ); } public static Schema0 getInstance() { @@ -327,12 +326,12 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("required", new RequiredValidator(Set.of( "baz", "foo" ))) - ))); + ); } public static Schema1 getInstance() { @@ -559,13 +558,13 @@ public static class OneofWithRequired1 extends JsonSchema implements SchemaMapVa */ private static OneofWithRequired1 instance; protected OneofWithRequired1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) new KeywordEntry("oneOf", new OneOfValidator(List.of( Schema0.class, Schema1.class ))) - ))); + ); } public static OneofWithRequired1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java index be2381ed36f..2987da04c23 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PatternValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -42,11 +42,11 @@ public static class PatternIsNotAnchored1 extends JsonSchema implements SchemaNu */ private static PatternIsNotAnchored1 instance; protected PatternIsNotAnchored1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("pattern", new PatternValidator(Pattern.compile( "a+" ))) - ))); + ); } public static PatternIsNotAnchored1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java index 3b1f22698f3..6211a680845 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PatternValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -42,11 +42,11 @@ public static class PatternValidation1 extends JsonSchema implements SchemaNullV */ private static PatternValidation1 instance; protected PatternValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("pattern", new PatternValidator(Pattern.compile( "^a*$" ))) - ))); + ); } public static PatternValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java index 111d4fb0707..ec5fed465c7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -89,16 +88,16 @@ public static class PropertiesWithEscapedCharacters1 extends JsonSchema implemen */ private static PropertiesWithEscapedCharacters1 instance; protected PropertiesWithEscapedCharacters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo\nbar", Foonbar.class), new PropertyEntry("foo\"bar", Foobar.class), new PropertyEntry("foo\\bar", Foobar1.class), new PropertyEntry("foo\rbar", Foorbar.class), new PropertyEntry("foo\tbar", Footbar.class), new PropertyEntry("foo\fbar", Foofbar.class) - ))) - ))); + )) + ); } public static PropertiesWithEscapedCharacters1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java index 0db9f5bd2ab..993d7b9f8d3 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -69,11 +68,11 @@ public static class PropertyNamedRefThatIsNotAReference1 extends JsonSchema impl */ private static PropertyNamedRefThatIsNotAReference1 instance; protected PropertyNamedRefThatIsNotAReference1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("$ref", Ref.class) - ))) - ))); + )) + ); } public static PropertyNamedRefThatIsNotAReference1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java index c095be431df..6fd969d8090 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class RefInAdditionalproperties { @@ -53,10 +52,10 @@ public static class RefInAdditionalproperties1 extends JsonSchema implements Sch */ private static RefInAdditionalproperties1 instance; protected RefInAdditionalproperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class) + ); } public static RefInAdditionalproperties1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java index 51f29e7cfd3..7127e7ae8d0 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,11 +41,11 @@ public static class RefInAllof1 extends JsonSchema implements SchemaNullValidato */ private static RefInAllof1 instance; protected RefInAllof1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("allOf", new AllOfValidator(List.of( PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class ))) - ))); + ); } public static RefInAllof1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java index ab4e0a586e7..9e07be2df77 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java @@ -18,7 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,11 +41,11 @@ public static class RefInAnyof1 extends JsonSchema implements SchemaNullValidato */ private static RefInAnyof1 instance; protected RefInAnyof1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("anyOf", new AnyOfValidator(List.of( PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class ))) - ))); + ); } public static RefInAnyof1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java index 50ddc623462..ac350a35773 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class RefInItems { @@ -47,10 +46,10 @@ public static class RefInItems1 extends JsonSchema implements SchemaListValidato */ private static RefInItems1 instance; protected RefInItems1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) new KeywordEntry("items", new ItemsValidator(PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class)) - ))); + ); } public static RefInItems1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java index 980064ac4e4..25df913bb0a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.NotValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,9 +41,9 @@ public static class RefInNot1 extends JsonSchema implements SchemaNullValidator, */ private static RefInNot1 instance; protected RefInNot1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("not", new NotValidator(PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class)) - ))); + ); } public static RefInNot1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java index 989e6c6db09..4350a110130 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,11 +41,11 @@ public static class RefInOneof1 extends JsonSchema implements SchemaNullValidato */ private static RefInOneof1 instance; protected RefInOneof1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("oneOf", new OneOfValidator(List.of( PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class ))) - ))); + ); } public static RefInOneof1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java index f0f49d37035..e7bd54ae240 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java @@ -17,9 +17,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -71,11 +70,11 @@ public static class RefInProperty1 extends JsonSchema implements SchemaNullValid */ private static RefInProperty1 instance; protected RefInProperty1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("a", PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class) - ))) - ))); + )) + ); } public static RefInProperty1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java index 2973b53d8a3..79b0d2ff0f8 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -75,11 +74,11 @@ public static class RequiredDefaultValidation1 extends JsonSchema implements Sch */ private static RequiredDefaultValidation1 instance; protected RequiredDefaultValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))) - ))); + )) + ); } public static RequiredDefaultValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java index 586f3394800..5b05d3885df 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -85,15 +84,15 @@ public static class RequiredValidation1 extends JsonSchema implements SchemaNull */ private static RequiredValidation1 instance; protected RequiredValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class), new PropertyEntry("bar", Bar.class) - ))), + )) new KeywordEntry("required", new RequiredValidator(Set.of( "foo" ))) - ))); + ); } public static RequiredValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java index b98df3ae4ca..11a51bf221e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -75,11 +74,11 @@ public static class RequiredWithEmptyArray1 extends JsonSchema implements Schema */ private static RequiredWithEmptyArray1 instance; protected RequiredWithEmptyArray1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) - ))) - ))); + )) + ); } public static RequiredWithEmptyArray1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java index 046ded8a5b9..dd10893cb68 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -69,7 +69,7 @@ public static class RequiredWithEscapedCharacters1 extends JsonSchema implements */ private static RequiredWithEscapedCharacters1 instance; protected RequiredWithEscapedCharacters1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("required", new RequiredValidator(Set.of( "foo\tbar", "foo\nbar", @@ -78,7 +78,7 @@ protected RequiredWithEscapedCharacters1() { "foo\"bar", "foo\\bar" ))) - ))); + ); } public static RequiredWithEscapedCharacters1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java index db1e9e8b786..d9c32875b55 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java @@ -14,10 +14,9 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class SimpleEnumValidation { @@ -33,19 +32,19 @@ public static class SimpleEnumValidation1 extends JsonSchema implements SchemaNu */ private static SimpleEnumValidation1 instance; protected SimpleEnumValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), + ) new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( 1, 2, 3 ))) - ))); + ); } public static SimpleEnumValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java index 35b19faa95d..1f6d2f5cea4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java @@ -13,14 +13,12 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.MaximumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing { @@ -30,15 +28,15 @@ public class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing { public static class Alpha extends JsonSchema implements SchemaNumberValidator { private static Alpha instance; protected Alpha() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), + ) new KeywordEntry("maximum", new MaximumValidator(3)) - ))); + ); } public static Alpha getInstance() { @@ -131,12 +129,12 @@ public static class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing1 ex */ private static TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing1 instance; protected TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("alpha", Alpha.class) - ))) - ))); + )) + ); } public static TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java index 03f08f0e87f..f0d87647f41 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +41,9 @@ public static class UniqueitemsFalseValidation1 extends JsonSchema implements Sc */ private static UniqueitemsFalseValidation1 instance; protected UniqueitemsFalseValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("uniqueItems", new UniqueItemsValidator(false)) - ))); + ); } public static UniqueitemsFalseValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java index 2dca92cb6d4..2e5503e2393 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java @@ -17,7 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +41,9 @@ public static class UniqueitemsValidation1 extends JsonSchema implements SchemaN */ private static UniqueitemsValidation1 instance; protected UniqueitemsValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( + super(new JsonSchemaInfo() new KeywordEntry("uniqueItems", new UniqueItemsValidator(true)) - ))); + ); } public static UniqueitemsValidation1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java index 91502a9fdd1..3b81b61695f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class UriFormat1 extends JsonSchema implements SchemaNullValidator */ private static UriFormat1 instance; protected UriFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("uri")) - ))); + super(new JsonSchemaInfo() + .format("uri") + ); } public static UriFormat1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java index f7c3924643f..ec712b56576 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class UriReferenceFormat1 extends JsonSchema implements SchemaNull */ private static UriReferenceFormat1 instance; protected UriReferenceFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("uri-reference")) - ))); + super(new JsonSchemaInfo() + .format("uri-reference") + ); } public static UriReferenceFormat1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java index c34641f9ae9..ac0b8d695ea 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,9 +40,9 @@ public static class UriTemplateFormat1 extends JsonSchema implements SchemaNullV */ private static UriTemplateFormat1 instance; protected UriTemplateFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("uri-template")) - ))); + super(new JsonSchemaInfo() + .format("uri-template") + ); } public static UriTemplateFormat1 getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java index 67da443bdac..6133b7b3298 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java @@ -8,27 +8,123 @@ public class JsonSchemaInfo { public Set> type; + public JsonSchemaInfo type(Set> type) { + this.type = type; + return this; + } public String format; + public JsonSchemaInfo format(String format) { + this.format = format; + return this; + } public Class items; + public JsonSchemaInfo items(Class items) { + this.items = items; + return this; + } public Map> properties; + public JsonSchemaInfo properties(Map> properties) { + this.properties = properties; + return this; + } public Set required; + public JsonSchemaInfo required(Set required) { + this.required = required; + return this; + } public Number exclusiveMaximum; + public JsonSchemaInfo exclusiveMaximum(Number exclusiveMaximum) { + this.exclusiveMaximum = exclusiveMaximum; + return this; + } public Number exclusiveMinimum; + public JsonSchemaInfo exclusiveMinimum(Number exclusiveMinimum) { + this.exclusiveMinimum = exclusiveMinimum; + return this; + } public Integer maxItems; + public JsonSchemaInfo maxItems(Integer maxItems) { + this.maxItems = maxItems; + return this; + } public Integer minItems; + public JsonSchemaInfo minItems(Integer minItems) { + this.minItems = minItems; + return this; + } public Integer maxLength; + public JsonSchemaInfo maxLength(Integer maxLength) { + this.maxLength = maxLength; + return this; + } public Integer minLength; + public JsonSchemaInfo minLength(Integer minLength) { + this.minLength = minLength; + return this; + } public Integer maxProperties; + public JsonSchemaInfo maxProperties(Integer maxProperties) { + this.maxProperties = maxProperties; + return this; + } public Integer minProperties; + public JsonSchemaInfo minProperties(Integer minProperties) { + this.minProperties = minProperties; + return this; + } public Number maximum; + public JsonSchemaInfo maximum(Number maximum) { + this.maximum = maximum; + return this; + } public Number minimum; + public JsonSchemaInfo minimum(Number minimum) { + this.minimum = minimum; + return this; + } public BigDecimal multipleOf; + public JsonSchemaInfo multipleOf(BigDecimal multipleOf) { + this.multipleOf = multipleOf; + return this; + } public Class additionalProperties; + public JsonSchemaInfo additionalProperties(Class additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } public List> allOf; + public JsonSchemaInfo allOf(List> allOf) { + this.allOf = allOf; + return this; + } public List> anyOf; + public JsonSchemaInfo anyOf(List> anyOf) { + this.anyOf = anyOf; + return this; + } public List> oneOf; + public JsonSchemaInfo oneOf(List> oneOf) { + this.oneOf = oneOf; + return this; + } public Class not; + public JsonSchemaInfo not(Class not) { + this.not = not; + return this; + } public Boolean uniqueItems; + public JsonSchemaInfo uniqueItems(Boolean uniqueItems) { + this.uniqueItems = uniqueItems; + return this; + } public Set enumValues; + public JsonSchemaInfo enumValues(Set enumValues) { + this.enumValues = enumValues; + return this; + } public Pattern pattern; -} + public JsonSchemaInfo enumValues(Pattern pattern) { + this.pattern = pattern; + return this; + } +} \ No newline at end of file diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 251bdf3aee2..dd920f762df 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -1356,8 +1356,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu imports.add("import "+packageName + ".schemas.BooleanJsonSchema;"); } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1368,8 +1366,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu imports.add("import "+packageName + ".schemas.NullJsonSchema;"); } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1386,8 +1382,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu } } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1408,8 +1402,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu } } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1436,8 +1428,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu } } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1450,8 +1440,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu imports.add("import "+packageName + ".schemas.validation.FrozenMap;"); } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1467,8 +1455,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu imports.add("import "+packageName + ".schemas.validation.FrozenList;"); } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1480,8 +1466,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu } } else if (schema.types.size() > 1) { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); - imports.add("import "+packageName + ".schemas.validation.TypeValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); @@ -1522,7 +1506,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu imports.add("import "+packageName + ".schemas.AnyTypeJsonSchema;"); } else { addCustomSchemaImports(imports, schema); - imports.add("import "+packageName + ".schemas.validation.KeywordEntry;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.time.LocalDate;"); imports.add("import java.time.ZonedDateTime;"); @@ -1540,7 +1523,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu addPropertiesValidator(schema, imports); addRequiredValidator(schema, imports); addAdditionalPropertiesValidator(schema, imports); - addFormatValidator(schema, imports); addExclusiveMaximumValidator(schema, imports); addExclusiveMinimumValidator(schema, imports); addItemsValidator(schema, imports); @@ -1594,7 +1576,6 @@ private void addUniqueItemsValidator(CodegenSchema schema, Set imports) private void addPropertiesValidator(CodegenSchema schema, Set imports) { if (schema.properties != null) { imports.add("import "+packageName + ".schemas.validation.PropertyEntry;"); - imports.add("import "+packageName + ".schemas.validation.PropertiesValidator;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); } @@ -1640,12 +1621,6 @@ private void addAdditionalPropertiesValidator(CodegenSchema schema, Set } } - private void addFormatValidator(CodegenSchema schema, Set imports) { - if (schema.format != null) { - imports.add("import "+packageName + ".schemas.validation.FormatValidator;"); - } - } - private void addExclusiveMinimumValidator(CodegenSchema schema, Set imports) { if (schema.exclusiveMaximum != null) { imports.add("import "+packageName + ".schemas.validation.ExclusiveMinimumValidator;"); @@ -1786,7 +1761,6 @@ private void addListSchemaImports(Set imports, CodegenSchema schema) { private void addNumberSchemaImports(Set imports, CodegenSchema schema) { imports.add("import " + packageName + ".schemas.validation.SchemaNumberValidator;"); - addFormatValidator(schema, imports); addExclusiveMaximumValidator(schema, imports); addExclusiveMinimumValidator(schema, imports); addMaximumValidator(schema, imports); @@ -1810,7 +1784,6 @@ private void addStringSchemaImports(Set imports, CodegenSchema schema) { } } imports.add("import " + packageName + ".schemas.validation.SchemaStringValidator;"); - addFormatValidator(schema, imports); addMaxLengthValidator(schema, imports); addMinLengthValidator(schema, imports); addAllOfValidator(schema, imports); diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs index f97c5407200..d27db67b007 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs @@ -21,13 +21,13 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); + super(new JsonSchemaInfo() {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "format"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} {{/eq}} {{#eq this "items"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_items }} @@ -96,7 +96,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} {{/eq}} {{#if @last}} - super(schemaInfo); + ); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs index 516e8071396..5795c97c75a 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs @@ -17,10 +17,10 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); + super(new JsonSchemaInfo() {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "allOf"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} @@ -38,7 +38,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} {{/eq}} {{#if @last}} - super(schemaInfo); + ); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs index b7015cbcd20..55273eff25d 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs @@ -17,7 +17,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); + super(new JsonSchemaInfo() {{/if}} {{#eq this "type"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} @@ -47,7 +47,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems }} {{/eq}} {{#if @last}} - super(schemaInfo); + ); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs index f5069c88f38..8cbd757a42f 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs @@ -17,10 +17,10 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); + super(new JsonSchemaInfo() {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "properties"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_properties }} @@ -50,7 +50,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} {{/eq}} {{#if @last}} - super(schemaInfo); + ); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs index 37996346368..a0a95cd4d11 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs @@ -17,10 +17,10 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); + super(new JsonSchemaInfo() {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "allOf"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} @@ -38,7 +38,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} {{/eq}} {{#if @last}} - super(schemaInfo); + ); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs index 5087bdb7d56..57845c63d7f 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs @@ -17,13 +17,13 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#each keywords}} {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); + super(new JsonSchemaInfo() {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "format"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} {{/eq}} {{#eq this "exclusiveMaximum"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum }} @@ -56,7 +56,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} {{/eq}} {{#if @last}} - super(schemaInfo); + ); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs index 4f13d7918aa..c827a087262 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs @@ -18,13 +18,13 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { - JsonSchemaInfo schemaInfo = new JsonSchemaInfo(); + super(new JsonSchemaInfo() {{/if}} {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/eq}} {{#eq this "format"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} + {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} {{/eq}} {{#eq this "maxLength"}} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxLength }} @@ -51,7 +51,7 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc {{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} {{/eq}} {{#if @last}} - super(schemaInfo); + ); } {{/if}} {{/each}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties.hbs index c552d98a79e..f8636275086 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties.hbs @@ -2,16 +2,16 @@ {{#with additionalProperties}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} -    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([{{refInfo.refModule}}.{{refInfo.refClass}}.class]({{docRoot}}{{refInfo.ref.pathFromDocRoot}}.md#{{refInfo.ref.jsonPathPiece.anchorPiece}})){{#unless @last}},{{/unless}}
+    additionalProperties = [{{refInfo.refModule}}.{{refInfo.refClass}}.class]({{docRoot}}{{refInfo.ref.pathFromDocRoot}}.md#{{refInfo.ref.jsonPathPiece.anchorPiece}})
{{~else}} -    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([{{refInfo.refClass}}.class](#{{refInfo.ref.jsonPathPiece.anchorPiece}}))){{#unless @last}},{{/unless}}
+    additionalProperties = [{{refInfo.refClass}}.class](#{{refInfo.ref.jsonPathPiece.anchorPiece}})
{{~/if}} {{else}} -    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}}))){{#unless @last}},{{/unless}}
+    additionalProperties = [{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}})
{{~/if}} {{~/with}} {{else}} {{#with additionalProperties}} -new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator({{#if refInfo.refClass}}{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}{{else}}{{jsonPathPiece.camelCase}}{{/if}}.class)){{#unless @last}},{{/unless}} +.additionalProperties({{#if refInfo.refClass}}{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}{{else}}{{jsonPathPiece.camelCase}}{{/if}}.class) {{/with}} {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs index 20b75190765..7d34df6cbcc 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_format.hbs @@ -1,5 +1,5 @@ {{#if forDocs}}     type = "{{format}}";
{{~else}} -schemaInfo.type = "{{format}}"; +.format("{{format}}") {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs index 5d6355f409d..d351be7d31e 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
+    properties = Map.ofEntries(
{{~#each properties}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -13,7 +13,7 @@ {{/each}}     ))){{#unless @last}},{{/unless}}
{{~else}} -new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( +.properties(Map.ofEntries( {{#each properties}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -25,5 +25,5 @@ new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( new PropertyEntry("{{{@key.original}}}", {{jsonPathPiece.camelCase}}.class){{#unless @last}},{{/unless}} {{/if}} {{/each}} -))){{#unless @last}},{{/unless}} +)) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs index 297dd066d57..30a89703eac 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs @@ -3,7 +3,7 @@ {{#if forDocs}}     Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}})
{{~else}} -schemaInfo.type = Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}}); +.type(Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}})) {{/if}} {{else}} {{#if forDocs}} @@ -38,7 +38,7 @@ schemaInfo.type = Set.of({{#contains types "null"}}Void.class{{/contains}}{{#con {{/each}}     )
{{~else}} -schemaInfo.type = Set.of( +.type(Set.of( {{#each types}} {{#eq this "null"}} Void.class{{#unless @last}},{{/unless}} @@ -73,7 +73,7 @@ schemaInfo.type = Set.of( Boolean.class{{#unless @last}},{{/unless}} {{/eq}} {{/each}} -); +) {{/if}} {{/and}} {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs index 3c11ad6bdcc..237e86fd8a0 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs @@ -8,27 +8,123 @@ import java.util.regex.Pattern; public class JsonSchemaInfo { public Set> type; + public JsonSchemaInfo type(Set> type) { + this.type = type; + return this; + } public String format; + public JsonSchemaInfo format(String format) { + this.format = format; + return this; + } public Class items; + public JsonSchemaInfo items(Class items) { + this.items = items; + return this; + } public Map> properties; + public JsonSchemaInfo properties(Map> properties) { + this.properties = properties; + return this; + } public Set required; + public JsonSchemaInfo required(Set required) { + this.required = required; + return this; + } public Number exclusiveMaximum; + public JsonSchemaInfo exclusiveMaximum(Number exclusiveMaximum) { + this.exclusiveMaximum = exclusiveMaximum; + return this; + } public Number exclusiveMinimum; + public JsonSchemaInfo exclusiveMinimum(Number exclusiveMinimum) { + this.exclusiveMinimum = exclusiveMinimum; + return this; + } public Integer maxItems; + public JsonSchemaInfo maxItems(Integer maxItems) { + this.maxItems = maxItems; + return this; + } public Integer minItems; + public JsonSchemaInfo minItems(Integer minItems) { + this.minItems = minItems; + return this; + } public Integer maxLength; + public JsonSchemaInfo maxLength(Integer maxLength) { + this.maxLength = maxLength; + return this; + } public Integer minLength; + public JsonSchemaInfo minLength(Integer minLength) { + this.minLength = minLength; + return this; + } public Integer maxProperties; + public JsonSchemaInfo maxProperties(Integer maxProperties) { + this.maxProperties = maxProperties; + return this; + } public Integer minProperties; + public JsonSchemaInfo minProperties(Integer minProperties) { + this.minProperties = minProperties; + return this; + } public Number maximum; + public JsonSchemaInfo maximum(Number maximum) { + this.maximum = maximum; + return this; + } public Number minimum; + public JsonSchemaInfo minimum(Number minimum) { + this.minimum = minimum; + return this; + } public BigDecimal multipleOf; + public JsonSchemaInfo multipleOf(BigDecimal multipleOf) { + this.multipleOf = multipleOf; + return this; + } public Class additionalProperties; + public JsonSchemaInfo additionalProperties(Class additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } public List> allOf; + public JsonSchemaInfo allOf(List> allOf) { + this.allOf = allOf; + return this; + } public List> anyOf; + public JsonSchemaInfo anyOf(List> anyOf) { + this.anyOf = anyOf; + return this; + } public List> oneOf; + public JsonSchemaInfo oneOf(List> oneOf) { + this.oneOf = oneOf; + return this; + } public Class not; + public JsonSchemaInfo not(Class not) { + this.not = not; + return this; + } public Boolean uniqueItems; + public JsonSchemaInfo uniqueItems(Boolean uniqueItems) { + this.uniqueItems = uniqueItems; + return this; + } public Set enumValues; + public JsonSchemaInfo enumValues(Set enumValues) { + this.enumValues = enumValues; + return this; + } public Pattern pattern; -} + public JsonSchemaInfo enumValues(Pattern pattern) { + this.pattern = pattern; + return this; + } +} \ No newline at end of file From a0adfdf31ef70457567c5abc53d6e317cfc7b8fa Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 14 Dec 2023 22:39:44 -0800 Subject: [PATCH 03/12] Updates 4 more keywords --- ...nalpropertiesAllowsASchemaWhichShouldValidate.md | 2 +- .../AdditionalpropertiesAreAllowedByDefault.md | 2 +- ...dditionalpropertiesShouldNotLookInApplicators.md | 2 +- .../java/docs/components/schemas/Allof.md | 4 ++-- .../docs/components/schemas/AllofWithBaseSchema.md | 6 +++--- .../docs/components/schemas/AnyofComplexTypes.md | 4 ++-- .../docs/components/schemas/EnumsInProperties.md | 2 +- .../docs/components/schemas/ForbiddenProperty.md | 2 +- .../schemas/InvalidStringValueForDefault.md | 2 +- .../docs/components/schemas/NotMoreComplexSchema.md | 2 +- .../schemas/ObjectPropertiesValidation.md | 2 +- .../docs/components/schemas/OneofComplexTypes.md | 4 ++-- .../docs/components/schemas/OneofWithRequired.md | 4 ++-- .../docs/components/schemas/PatternIsNotAnchored.md | 2 +- .../docs/components/schemas/PatternValidation.md | 2 +- .../schemas/PropertiesWithEscapedCharacters.md | 2 +- .../schemas/PropertyNamedRefThatIsNotAReference.md | 2 +- .../java/docs/components/schemas/RefInProperty.md | 2 +- .../components/schemas/RequiredDefaultValidation.md | 2 +- .../docs/components/schemas/RequiredValidation.md | 2 +- .../components/schemas/RequiredWithEmptyArray.md | 2 +- .../schemas/RequiredWithEscapedCharacters.md | 2 +- ...eywordDoesNotDoAnythingIfThePropertyIsMissing.md | 2 +- .../schemas/UniqueitemsFalseValidation.md | 2 +- .../components/schemas/UniqueitemsValidation.md | 2 +- .../client/components/schemas/Allof.java | 9 ++++----- .../components/schemas/AllofWithBaseSchema.java | 13 ++++++------- .../components/schemas/AnyofComplexTypes.java | 9 ++++----- .../components/schemas/EnumsInProperties.java | 5 ++--- .../components/schemas/OneofComplexTypes.java | 9 ++++----- .../components/schemas/OneofWithRequired.java | 9 ++++----- .../components/schemas/PatternIsNotAnchored.java | 5 ++--- .../components/schemas/PatternValidation.java | 5 ++--- .../components/schemas/RequiredValidation.java | 5 ++--- .../schemas/RequiredWithEscapedCharacters.java | 5 ++--- .../schemas/UniqueitemsFalseValidation.java | 3 +-- .../components/schemas/UniqueitemsValidation.java | 3 +-- .../codegen/generators/JavaClientGenerator.java | 10 ---------- .../components/schemas/SchemaClass/_pattern.hbs | 8 ++++---- .../components/schemas/SchemaClass/_properties.hbs | 2 +- .../components/schemas/SchemaClass/_required.hbs | 8 ++++---- .../components/schemas/SchemaClass/_uniqueItems.hbs | 4 ++-- 42 files changed, 76 insertions(+), 98 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md index c708ce95306..9470bdcb9db 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md @@ -52,7 +52,7 @@ AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsA ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md index 1f718e9f190..b8a62202d19 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md index 15230ec1f08..35edb4c7e2d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md @@ -77,7 +77,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md index 1f0c43731d3..c39caf86b0b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md @@ -55,7 +55,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +114,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md index c5d2f908981..3eec93244dd 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md @@ -34,7 +34,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    ))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -93,7 +93,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("baz", [Baz.class](#baz)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "baz"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("baz", [Baz.class](#baz)))
    )
    required = Set.of(
        "baz"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -152,7 +152,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md index 1d2887472a8..a834b4f2354 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md @@ -55,7 +55,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +114,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md index 64b6f8e7615..5393119e93c 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md @@ -59,7 +59,7 @@ EnumsInProperties.EnumsInPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md index f0e972fbe14..8dc9c628d0d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md index bd82082ad14..f43c22e5cc7 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md index bfaa7c6cadc..bf82e79405a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md @@ -79,7 +79,7 @@ NotMoreComplexSchema.NotMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md index 0c852d1a775..44928133996 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md index b38dbcfc94b..50e960045b6 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md @@ -55,7 +55,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +114,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md index 2a41de8d192..2d23839ff77 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md @@ -45,7 +45,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "baz",
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    required = Set.of(
        "baz",
        "foo"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -96,7 +96,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "bar",
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    required = Set.of(
        "bar",
        "foo"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md index b84cf04f3ea..c8768ccf59d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("pattern", new PatternValidator(
        "a+"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    pattern =
        "a+"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md index 882e09214d4..7740be5e958 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("pattern", new PatternValidator(
        "^a*$"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    pattern =
        "^a*$"
    )))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md index ae37703e455..e97cafa83fd 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo\nbar", [Foonbar.class](#foonbar))),
        new PropertyEntry("foo\"bar", [Foobar.class](#foobar))),
        new PropertyEntry("foo\\bar", [Foobar1.class](#foobar1))),
        new PropertyEntry("foo\rbar", [Foorbar.class](#foorbar))),
        new PropertyEntry("foo\tbar", [Footbar.class](#footbar))),
        new PropertyEntry("foo\fbar", [Foofbar.class](#foofbar)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo\nbar", [Foonbar.class](#foonbar))),
        new PropertyEntry("foo\"bar", [Foobar.class](#foobar))),
        new PropertyEntry("foo\\bar", [Foobar1.class](#foobar1))),
        new PropertyEntry("foo\rbar", [Foorbar.class](#foorbar))),
        new PropertyEntry("foo\tbar", [Footbar.class](#footbar))),
        new PropertyEntry("foo\fbar", [Foofbar.class](#foofbar)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md index c9cd4195cbd..0810b83a961 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("$ref", [Ref.class](#ref)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("$ref", [Ref.class](#ref)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md index a2bdbe64cb2..e859aba96cc 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("a", [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("a", [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md index 82cb1628214..c1224a737b0 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md index d7ab9ae4dbe..7a42c5ab79e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "foo"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md index eef7ccfbf9e..6cef992c745 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md index 067d61415bc..51c701d6139 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "foo\tbar",
        "foo\nbar",
        "foo\fbar",
        "foo\rbar",
        "foo\"bar",
        "foo\\bar"
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    required = Set.of(
        "foo\tbar",
        "foo\nbar",
        "foo\fbar",
        "foo\rbar",
        "foo\"bar",
        "foo\\bar"
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md index 3a4c6d10a39..279f193c57e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md @@ -54,7 +54,7 @@ TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.TheDefaultKeywordDoesNo ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("alpha", [Alpha.class](#alpha)))
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("alpha", [Alpha.class](#alpha)))
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md index 3627422d3e0..6b170ea5d4b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("uniqueItems", new UniqueItemsValidator(false))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    uniqueItems = false
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md index c8f9d553a2e..156e4d55127 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("uniqueItems", new UniqueItemsValidator(true))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    uniqueItems = true
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index 1ebdb68c410..bdb744a0ba9 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -23,7 +23,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -73,9 +72,9 @@ protected Schema0() { .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "bar" - ))) + )) ); } @@ -331,9 +330,9 @@ protected Schema1() { .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "foo" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index 388704898f4..449dec09994 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -24,7 +24,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -74,9 +73,9 @@ protected Schema0() { .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "foo" - ))) + )) ); } @@ -332,9 +331,9 @@ protected Schema1() { .properties(Map.ofEntries( new PropertyEntry("baz", Baz.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "baz" - ))) + )) ); } @@ -596,9 +595,9 @@ protected AllofWithBaseSchema1() { .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "bar" - ))), + )) new KeywordEntry("allOf", new AllOfValidator(List.of( Schema0.class, Schema1.class diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index 6d74e830e49..3afc6bcd140 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -23,7 +23,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -73,9 +72,9 @@ protected Schema0() { .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "bar" - ))) + )) ); } @@ -331,9 +330,9 @@ protected Schema1() { .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "foo" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java index 81e29cb1f07..24c11ce95dd 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; @@ -179,9 +178,9 @@ protected EnumsInProperties1() { new PropertyEntry("foo", Foo.class), new PropertyEntry("bar", Bar.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "bar" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java index 6b2ade10eb1..73e169d88b4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java @@ -23,7 +23,6 @@ import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -73,9 +72,9 @@ protected Schema0() { .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "bar" - ))) + )) ); } @@ -331,9 +330,9 @@ protected Schema1() { .properties(Map.ofEntries( new PropertyEntry("foo", Foo.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "foo" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java index af8e1654722..a2ce801c917 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java @@ -20,7 +20,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -69,10 +68,10 @@ public static class Schema0 extends JsonSchema implements SchemaNullValidator, S private static Schema0 instance; protected Schema0() { super(new JsonSchemaInfo() - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "bar", "foo" - ))) + )) ); } @@ -327,10 +326,10 @@ public static class Schema1 extends JsonSchema implements SchemaNullValidator, S private static Schema1 instance; protected Schema1() { super(new JsonSchemaInfo() - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "baz", "foo" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java index 2987da04c23..0f62f471e83 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java @@ -20,7 +20,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -43,9 +42,9 @@ public static class PatternIsNotAnchored1 extends JsonSchema implements SchemaNu private static PatternIsNotAnchored1 instance; protected PatternIsNotAnchored1() { super(new JsonSchemaInfo() - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + .pattern(Pattern.compile( "a+" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java index 6211a680845..bd2d026a841 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java @@ -20,7 +20,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -43,9 +42,9 @@ public static class PatternValidation1 extends JsonSchema implements SchemaNullV private static PatternValidation1 instance; protected PatternValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + .pattern(Pattern.compile( "^a*$" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java index 5b05d3885df..6c951877abd 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java @@ -21,7 +21,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -89,9 +88,9 @@ protected RequiredValidation1() { new PropertyEntry("foo", Foo.class), new PropertyEntry("bar", Bar.class) )) - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "foo" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java index dd10893cb68..1f7329f0324 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java @@ -19,7 +19,6 @@ import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -70,14 +69,14 @@ public static class RequiredWithEscapedCharacters1 extends JsonSchema implements private static RequiredWithEscapedCharacters1 instance; protected RequiredWithEscapedCharacters1() { super(new JsonSchemaInfo() - new KeywordEntry("required", new RequiredValidator(Set.of( + .required(Set.of( "foo\tbar", "foo\nbar", "foo\fbar", "foo\rbar", "foo\"bar", "foo\\bar" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java index f0d87647f41..191afe8560d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java @@ -25,7 +25,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.UniqueItemsValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class UniqueitemsFalseValidation { @@ -42,7 +41,7 @@ public static class UniqueitemsFalseValidation1 extends JsonSchema implements Sc private static UniqueitemsFalseValidation1 instance; protected UniqueitemsFalseValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("uniqueItems", new UniqueItemsValidator(false)) + .uniqueItems(false) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java index 2e5503e2393..05f26c8e057 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java @@ -25,7 +25,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.UniqueItemsValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class UniqueitemsValidation { @@ -42,7 +41,7 @@ public static class UniqueitemsValidation1 extends JsonSchema implements SchemaN private static UniqueitemsValidation1 instance; protected UniqueitemsValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("uniqueItems", new UniqueItemsValidator(true)) + .uniqueItems(true) ); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index dd920f762df..2f4bfb3769b 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -1535,7 +1535,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu addMaximumValidator(schema, imports); addMinimumValidator(schema, imports); addMultipleOfValidator(schema, imports); - addUniqueItemsValidator(schema, imports); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); @@ -1555,7 +1554,6 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu private void addPatternValidator(CodegenSchema schema, Set imports) { if (schema.patternInfo != null) { - imports.add("import "+packageName + ".schemas.validation.PatternValidator;"); imports.add("import java.util.regex.Pattern;"); } } @@ -1567,12 +1565,6 @@ private void addEnumValidator(CodegenSchema schema, Set imports) { } } - private void addUniqueItemsValidator(CodegenSchema schema, Set imports) { - if (schema.uniqueItems != null) { - imports.add("import "+packageName + ".schemas.validation.UniqueItemsValidator;"); - } - } - private void addPropertiesValidator(CodegenSchema schema, Set imports) { if (schema.properties != null) { imports.add("import "+packageName + ".schemas.validation.PropertyEntry;"); @@ -1610,7 +1602,6 @@ private void addNotValidator(CodegenSchema schema, Set imports) { private void addRequiredValidator(CodegenSchema schema, Set imports) { if (schema.requiredProperties != null) { - imports.add("import "+packageName + ".schemas.validation.RequiredValidator;"); imports.add("import java.util.Set;"); } } @@ -1752,7 +1743,6 @@ private void addListSchemaImports(Set imports, CodegenSchema schema) { addItemsValidator(schema, imports); addMaxItemsValidator(schema, imports); addMinItemsValidator(schema, imports); - addUniqueItemsValidator(schema, imports); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_pattern.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_pattern.hbs index 5a54caf1da6..a9ddeac501a 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_pattern.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_pattern.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("pattern", new PatternValidator(
+    pattern =
{{~#with patternInfo}}         "{{{pattern.codeEscaped}}}"{{#if flags}},{{/if}}
{{~#if flags}} @@ -21,13 +21,13 @@             Pattern.UNICODE_CHARACTER_CLASS{{#unless @last}} |{{/unless}}
{{~/eq}} {{/each}} -        )
+        
{{~/eq}} {{/if}} {{/with}}     ))){{#unless @last}},{{/unless}}
{{~else}} -new KeywordEntry("pattern", new PatternValidator(Pattern.compile( +.pattern(Pattern.compile( {{#with patternInfo}} "{{{pattern.codeEscaped}}}"{{#if flags}},{{/if}} {{#if flags}} @@ -53,5 +53,5 @@ new KeywordEntry("pattern", new PatternValidator(Pattern.compile( {{/eq}} {{/if}} {{/with}} -))){{#unless @last}},{{/unless}} +)) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs index d351be7d31e..f734b8097fd 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_properties.hbs @@ -11,7 +11,7 @@         new PropertyEntry("{{{@key.original}}}", [{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}}))){{#unless @last}},{{/unless}}
{{~/if}} {{/each}} -    ))){{#unless @last}},{{/unless}}
+    )
{{~else}} .properties(Map.ofEntries( {{#each properties}} diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_required.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_required.hbs index 81a4702f1b9..d470041934e 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_required.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_required.hbs @@ -1,13 +1,13 @@ {{#if forDocs}} -    new KeywordEntry("required", new RequiredValidator(Set.of(
+    required = Set.of(
{{~#each requiredProperties}}         "{{{@key.original}}}"{{#unless @last}},{{/unless}}
{{~/each}} -    ))){{#unless @last}},{{/unless}}
+    )
{{~else}} -new KeywordEntry("required", new RequiredValidator(Set.of( +.required(Set.of( {{#each requiredProperties}} "{{{@key.original}}}"{{#unless @last}},{{/unless}} {{/each}} -))){{#unless @last}},{{/unless}} +)) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems.hbs index 526bb6a84a9..e8383aa4a47 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("uniqueItems", new UniqueItemsValidator({{uniqueItems}})){{#unless @last}},{{/unless}}
+    uniqueItems = {{uniqueItems}}
{{~else}} -new KeywordEntry("uniqueItems", new UniqueItemsValidator({{uniqueItems}})){{#unless @last}},{{/unless}} +.uniqueItems({{uniqueItems}}) {{/if}} \ No newline at end of file From b56dab1cf2aa78d0b07d51bedb4c6360d72b3924 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 09:11:45 -0800 Subject: [PATCH 04/12] Removes all remaining validator imports --- ...nalpropertiesShouldNotLookInApplicators.md | 2 +- .../java/docs/components/schemas/Allof.md | 2 +- .../schemas/AllofCombinedWithAnyofOneof.md | 8 +- .../components/schemas/AllofSimpleTypes.md | 6 +- .../components/schemas/AllofWithBaseSchema.md | 2 +- .../schemas/AllofWithOneEmptySchema.md | 2 +- .../schemas/AllofWithTheFirstEmptySchema.md | 2 +- .../schemas/AllofWithTheLastEmptySchema.md | 2 +- .../schemas/AllofWithTwoEmptySchemas.md | 2 +- .../java/docs/components/schemas/Anyof.md | 4 +- .../components/schemas/AnyofComplexTypes.md | 2 +- .../components/schemas/AnyofWithBaseSchema.md | 6 +- .../schemas/AnyofWithOneEmptySchema.md | 2 +- .../schemas/ArrayTypeMatchesArrays.md | 2 +- .../java/docs/components/schemas/ByInt.md | 2 +- .../java/docs/components/schemas/ByNumber.md | 2 +- .../docs/components/schemas/BySmallNumber.md | 2 +- .../schemas/EnumWith0DoesNotMatchFalse.md | 2 +- .../schemas/EnumWith1DoesNotMatchTrue.md | 2 +- .../schemas/EnumWithEscapedCharacters.md | 2 +- .../schemas/EnumWithFalseDoesNotMatch0.md | 2 +- .../schemas/EnumWithTrueDoesNotMatch1.md | 2 +- .../components/schemas/EnumsInProperties.md | 4 +- ...ShouldNotRaiseErrorWhenFloatDivisionInf.md | 2 +- .../schemas/InvalidStringValueForDefault.md | 2 +- .../components/schemas/MaximumValidation.md | 2 +- .../MaximumValidationWithUnsignedInteger.md | 2 +- .../components/schemas/MaxitemsValidation.md | 2 +- .../components/schemas/MaxlengthValidation.md | 2 +- .../Maxproperties0MeansTheObjectIsEmpty.md | 2 +- .../schemas/MaxpropertiesValidation.md | 2 +- .../components/schemas/MinimumValidation.md | 2 +- .../MinimumValidationWithSignedInteger.md | 2 +- .../components/schemas/MinitemsValidation.md | 2 +- .../components/schemas/MinlengthValidation.md | 2 +- .../schemas/MinpropertiesValidation.md | 2 +- .../NestedAllofToCheckValidationSemantics.md | 4 +- .../NestedAnyofToCheckValidationSemantics.md | 4 +- .../docs/components/schemas/NestedItems.md | 8 +- .../NestedOneofToCheckValidationSemantics.md | 4 +- .../java/docs/components/schemas/Not.md | 2 +- .../schemas/NotMoreComplexSchema.md | 2 +- .../schemas/NulCharactersInStrings.md | 2 +- .../java/docs/components/schemas/Oneof.md | 4 +- .../components/schemas/OneofComplexTypes.md | 2 +- .../components/schemas/OneofWithBaseSchema.md | 6 +- .../schemas/OneofWithEmptySchema.md | 2 +- .../components/schemas/OneofWithRequired.md | 2 +- .../docs/components/schemas/RefInAllof.md | 2 +- .../docs/components/schemas/RefInAnyof.md | 2 +- .../docs/components/schemas/RefInItems.md | 2 +- .../java/docs/components/schemas/RefInNot.md | 2 +- .../docs/components/schemas/RefInOneof.md | 2 +- .../schemas/SimpleEnumValidation.md | 2 +- ...DoesNotDoAnythingIfThePropertyIsMissing.md | 2 +- ...lpropertiesShouldNotLookInApplicators.java | 5 +- .../client/components/schemas/Allof.java | 5 +- .../schemas/AllofCombinedWithAnyofOneof.java | 22 ++-- .../components/schemas/AllofSimpleTypes.java | 11 +- .../schemas/AllofWithBaseSchema.java | 5 +- .../schemas/AllofWithOneEmptySchema.java | 5 +- .../schemas/AllofWithTheFirstEmptySchema.java | 5 +- .../schemas/AllofWithTheLastEmptySchema.java | 5 +- .../schemas/AllofWithTwoEmptySchemas.java | 5 +- .../client/components/schemas/Anyof.java | 8 +- .../components/schemas/AnyofComplexTypes.java | 5 +- .../schemas/AnyofWithBaseSchema.java | 11 +- .../schemas/AnyofWithOneEmptySchema.java | 5 +- .../schemas/ArrayTypeMatchesArrays.java | 3 +- .../client/components/schemas/ByInt.java | 3 +- .../client/components/schemas/ByNumber.java | 3 +- .../components/schemas/BySmallNumber.java | 3 +- .../schemas/EnumWith0DoesNotMatchFalse.java | 5 +- .../schemas/EnumWith1DoesNotMatchTrue.java | 5 +- .../schemas/EnumWithEscapedCharacters.java | 5 +- .../schemas/EnumWithFalseDoesNotMatch0.java | 5 +- .../schemas/EnumWithTrueDoesNotMatch1.java | 5 +- .../components/schemas/EnumsInProperties.java | 9 +- ...ouldNotRaiseErrorWhenFloatDivisionInf.java | 3 +- .../schemas/InvalidStringValueForDefault.java | 3 +- .../components/schemas/MaximumValidation.java | 3 +- .../MaximumValidationWithUnsignedInteger.java | 3 +- .../schemas/MaxitemsValidation.java | 3 +- .../schemas/MaxlengthValidation.java | 3 +- .../Maxproperties0MeansTheObjectIsEmpty.java | 3 +- .../schemas/MaxpropertiesValidation.java | 3 +- .../components/schemas/MinimumValidation.java | 3 +- .../MinimumValidationWithSignedInteger.java | 3 +- .../schemas/MinitemsValidation.java | 3 +- .../schemas/MinlengthValidation.java | 3 +- .../schemas/MinpropertiesValidation.java | 3 +- ...NestedAllofToCheckValidationSemantics.java | 9 +- ...NestedAnyofToCheckValidationSemantics.java | 9 +- .../components/schemas/NestedItems.java | 9 +- ...NestedOneofToCheckValidationSemantics.java | 9 +- .../client/components/schemas/Not.java | 3 +- .../schemas/NotMoreComplexSchema.java | 3 +- .../schemas/NulCharactersInStrings.java | 5 +- .../client/components/schemas/Oneof.java | 8 +- .../components/schemas/OneofComplexTypes.java | 5 +- .../schemas/OneofWithBaseSchema.java | 11 +- .../schemas/OneofWithEmptySchema.java | 5 +- .../components/schemas/OneofWithRequired.java | 5 +- .../client/components/schemas/RefInAllof.java | 5 +- .../client/components/schemas/RefInAnyof.java | 5 +- .../client/components/schemas/RefInItems.java | 3 +- .../client/components/schemas/RefInNot.java | 3 +- .../client/components/schemas/RefInOneof.java | 5 +- .../schemas/SimpleEnumValidation.java | 5 +- ...esNotDoAnythingIfThePropertyIsMissing.java | 3 +- .../generators/JavaClientGenerator.java | 121 ------------------ .../components/schemas/SchemaClass/_allOf.hbs | 8 +- .../components/schemas/SchemaClass/_anyOf.hbs | 8 +- .../components/schemas/SchemaClass/_enum.hbs | 8 +- .../schemas/SchemaClass/_exclusiveMaximum.hbs | 4 +- .../schemas/SchemaClass/_exclusiveMinimum.hbs | 4 +- .../components/schemas/SchemaClass/_items.hbs | 8 +- .../schemas/SchemaClass/_maxItems.hbs | 4 +- .../schemas/SchemaClass/_maxLength.hbs | 4 +- .../schemas/SchemaClass/_maxProperties.hbs | 4 +- .../schemas/SchemaClass/_maximum.hbs | 4 +- .../schemas/SchemaClass/_minItems.hbs | 4 +- .../schemas/SchemaClass/_minLength.hbs | 4 +- .../schemas/SchemaClass/_minProperties.hbs | 4 +- .../schemas/SchemaClass/_minimum.hbs | 4 +- .../schemas/SchemaClass/_multipleOf.hbs | 4 +- .../components/schemas/SchemaClass/_not.hbs | 8 +- .../components/schemas/SchemaClass/_oneOf.hbs | 8 +- 128 files changed, 232 insertions(+), 419 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md index 35edb4c7e2d..0cbe982edc8 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md @@ -30,7 +30,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
    allOf = List.of(
        [Schema0.class](#schema0)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md index c39caf86b0b..8248213de9d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md index 2c6dff41f00..99681a23eae 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema02.class](#schema02)
    ))),
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema01.class](#schema01)
    ))),
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema02.class](#schema02)
    )
    anyOf = List.of(
        [Schema01.class](#schema01)
    )
    oneOf = List.of(
        [Schema0.class](#schema0)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -50,7 +50,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("multipleOf", new MultipleOfValidator(5))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 5
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -74,7 +74,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("multipleOf", new MultipleOfValidator(3))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 3
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -98,7 +98,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("multipleOf", new MultipleOfValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md index 7b9414b0d4c..6376c0132c6 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minimum", new MinimumValidator(20))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 20
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -73,7 +73,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maximum", new MaximumValidator(30))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maximum = 30
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md index 3eec93244dd..8cc73dcbc3e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md @@ -34,7 +34,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md index d4d5f2f1ea8..5cd9535fef7 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md index 50842d316ff..2ee6086f52d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md index 09ba239ccaa..eb75cd602ba 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md index a9f03ae2fe7..6eb5c2ad7ab 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md index d6e276eeeee..aeb487f0e8e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minimum", new MinimumValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md index a834b4f2354..a584c5ea7e9 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md index 91bd3df0440..bfed586284d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md @@ -47,7 +47,7 @@ String validatedPayload = AnyofWithBaseSchema.AnyofWithBaseSchema1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -63,7 +63,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minLength", new MinLengthValidator(4))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minLength = 4
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -87,7 +87,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maxLength", new MaxLengthValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxLength = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md index 7319e5eaabd..7b47b01a417 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md index 155b773ae0f..e441b5534b0 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md @@ -50,7 +50,7 @@ ArrayTypeMatchesArrays.ArrayTypeMatchesArraysList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items.class](#items)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md index 40e9d4a0125..688b5a59fef 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("multipleOf", new MultipleOfValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md index d07f34eff80..a679d3098a3 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("multipleOf", new MultipleOfValidator(1.5))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 1.5
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md index 3c31d090667..cd1da0ee032 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("multipleOf", new MultipleOfValidator(0.00010))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 0.00010
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md index 7a36486c715..130337b0842 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md @@ -45,7 +45,7 @@ int validatedPayload = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.va ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        0)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    enumValues = SetMaker.makeSet(
        0)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md index f13ebb1dedb..4078868d513 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md @@ -45,7 +45,7 @@ int validatedPayload = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.vali ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    enumValues = SetMaker.makeSet(
        1)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md index 1cf4f546f70..f85b05fc6ec 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md @@ -45,7 +45,7 @@ String validatedPayload = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.v ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "foo\nbar",
        "foo\rbar"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "foo\nbar",
        "foo\rbar"
)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md index eaa7495ff4f..23f06191b89 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md @@ -45,7 +45,7 @@ boolean validatedPayload = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch0 ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        false)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    enumValues = SetMaker.makeSet(
        false)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md index 693303d923f..125bdb0eab8 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md @@ -45,7 +45,7 @@ boolean validatedPayload = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11. ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        true)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    enumValues = SetMaker.makeSet(
        true)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md index 5393119e93c..587a83f7b0f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md @@ -124,7 +124,7 @@ String validatedPayload = EnumsInProperties.Bar.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "bar"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "bar"
)
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -162,7 +162,7 @@ String validatedPayload = EnumsInProperties.Foo.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "foo"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "foo"
)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md index ee91e112605..dab688a316f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md @@ -45,7 +45,7 @@ long validatedPayload = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.I ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("multipleOf", new MultipleOfValidator(0.123456789))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    multipleOf = 0.123456789
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md index f43c22e5cc7..962a34a5195 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md @@ -97,7 +97,7 @@ String validatedPayload = InvalidStringValueForDefault.Bar.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("minLength", new MinLengthValidator(4))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    minLength = 4
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md index b47b555845e..65b7306347b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maximum", new MaximumValidator(3.0))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maximum = 3.0
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md index c3ed21fd37a..8c16770f4d8 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maximum", new MaximumValidator(300))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maximum = 300
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md index 9dd65beae94..0ec2570415a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maxItems", new MaxItemsValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxItems = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md index 5da8d033bc6..c8a76c147f1 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maxLength", new MaxLengthValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxLength = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md index 18c5547866a..2de82aa050d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maxProperties", new MaxPropertiesValidator(0))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxProperties = 0
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md index 59b9e55f7b0..2700ac83d48 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maxProperties", new MaxPropertiesValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxProperties = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md index 3810c1ae948..6462cb0e70f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minimum", new MinimumValidator(1.1))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 1.1
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md index 663c0a9cf7f..5789e5e2b8f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minimum", new MinimumValidator(-2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = -2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md index 8edd68dd9e5..94eb21c786e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minItems", new MinItemsValidator(1))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minItems = 1
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md index caab703a305..e06ab6cd2d3 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minLength", new MinLengthValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minLength = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md index fa03d0bb0ce..363e417cb9e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minProperties", new MinPropertiesValidator(1))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minProperties = 1
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md index 0c9775b31ff..8a4f9bfd9cc 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema01.class](#schema01)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema01.class](#schema01)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md index f7ad48cf7ae..bde8264263b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema01.class](#schema01)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema01.class](#schema01)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md index b6ec5ce21f5..9b0a8668200 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md @@ -66,7 +66,7 @@ NestedItems.NestedItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items.class](#items)
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -133,7 +133,7 @@ NestedItems.ItemsList2 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items1.class](#items1)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items1.class](#items1)
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -198,7 +198,7 @@ NestedItems.ItemsList1 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items2.class](#items2)
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -261,7 +261,7 @@ NestedItems.ItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([Items3.class](#items3)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items3.class](#items3)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md index 8ad13960651..d7f243f914d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema01.class](#schema01)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema01.class](#schema01)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md index c2ec400dad6..89d61ee2154 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("not", new NotValidator([Not2.class](#not2)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    not = [Not2.class](#not2)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md index bf82e79405a..4944f80f57a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("not", new NotValidator([Not.class](#not)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    not = [Not.class](#not)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md index b98f5e37fa5..44212837de2 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md @@ -45,7 +45,7 @@ String validatedPayload = NulCharactersInStrings.NulCharactersInStrings1.validat ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "hello\0there"
)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "hello\0there"
)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md index c692c4c1b22..90af22a39ad 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minimum", new MinimumValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md index 50e960045b6..7af65f6a8fb 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md index b00b1b02706..47ad6ece5d5 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md @@ -47,7 +47,7 @@ String validatedPayload = OneofWithBaseSchema.OneofWithBaseSchema1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -63,7 +63,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maxLength", new MaxLengthValidator(4))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxLength = 4
)); | ### Method Summary | Modifier and Type | Method and Description | @@ -87,7 +87,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minLength", new MinLengthValidator(2))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minLength = 2
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md index 5f177604d03..bb4ded3e6c4 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md index 2d23839ff77..2cceb0296e5 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md @@ -29,7 +29,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md index fc605f02211..10de6f58c81 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md index 919d8dfc746..9e982728676 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md index d357b6a6983..7d0ce23d241 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md @@ -49,7 +49,7 @@ RefInItems.RefInItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    new KeywordEntry("items", new ItemsValidator([PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md index 1d8a8868c0c..58d9d6d763e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("not", new NotValidator([PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    not = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md index 96a06fef26b..861efd8a7ab 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    ))
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md index 1548c719669..047f4a1384f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md @@ -45,7 +45,7 @@ int validatedPayload = SimpleEnumValidation.SimpleEnumValidation1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1,        2,        3)))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    enumValues = SetMaker.makeSet(
        1,        2,        3)
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md index 279f193c57e..5f8bfa99f99 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md @@ -117,7 +117,7 @@ int validatedPayload = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing. ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    new KeywordEntry("maximum", new MaximumValidator(3))
)); | +| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    maximum = 3
)); | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java index fc73b4b6a19..412b64fd7b7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java @@ -17,7 +17,6 @@ import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -327,9 +326,9 @@ public static class AdditionalpropertiesShouldNotLookInApplicators1 extends Json protected AdditionalpropertiesShouldNotLookInApplicators1() { super(new JsonSchemaInfo() .additionalProperties(AdditionalProperties.class) - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index bdb744a0ba9..d7fab830155 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -561,10 +560,10 @@ public static class Allof1 extends JsonSchema implements SchemaNullValidator, Sc private static Allof1 instance; protected Allof1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index f62a078b20f..83a33b99e65 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -14,14 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -39,7 +35,7 @@ public static class Schema02 extends JsonSchema implements SchemaNullValidator, private static Schema02 instance; protected Schema02() { super(new JsonSchemaInfo() - new KeywordEntry("multipleOf", new MultipleOfValidator(2)) + .multipleOf(2) ); } @@ -251,7 +247,7 @@ public static class Schema01 extends JsonSchema implements SchemaNullValidator, private static Schema01 instance; protected Schema01() { super(new JsonSchemaInfo() - new KeywordEntry("multipleOf", new MultipleOfValidator(3)) + .multipleOf(3) ); } @@ -463,7 +459,7 @@ public static class Schema0 extends JsonSchema implements SchemaNullValidator, S private static Schema0 instance; protected Schema0() { super(new JsonSchemaInfo() - new KeywordEntry("multipleOf", new MultipleOfValidator(5)) + .multipleOf(5) ); } @@ -681,15 +677,15 @@ public static class AllofCombinedWithAnyofOneof1 extends JsonSchema implements S private static AllofCombinedWithAnyofOneof1 instance; protected AllofCombinedWithAnyofOneof1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema02.class - ))), - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + )) + .anyOf(List.of( Schema01.class - ))), - new KeywordEntry("oneOf", new OneOfValidator(List.of( + )) + .oneOf(List.of( Schema0.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java index 9860631273e..6567b0ef505 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -38,7 +35,7 @@ public static class Schema0 extends JsonSchema implements SchemaNullValidator, S private static Schema0 instance; protected Schema0() { super(new JsonSchemaInfo() - new KeywordEntry("maximum", new MaximumValidator(30)) + .maximum(30) ); } @@ -250,7 +247,7 @@ public static class Schema1 extends JsonSchema implements SchemaNullValidator, S private static Schema1 instance; protected Schema1() { super(new JsonSchemaInfo() - new KeywordEntry("minimum", new MinimumValidator(20)) + .minimum(20) ); } @@ -468,10 +465,10 @@ public static class AllofSimpleTypes1 extends JsonSchema implements SchemaNullVa private static AllofSimpleTypes1 instance; protected AllofSimpleTypes1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index 449dec09994..b9d3971c784 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -17,7 +17,6 @@ import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -598,10 +597,10 @@ protected AllofWithBaseSchema1() { .required(Set.of( "bar" )) - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java index 0f5d819f035..4175443862e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java @@ -15,7 +15,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -46,9 +45,9 @@ public static class AllofWithOneEmptySchema1 extends JsonSchema implements Schem private static AllofWithOneEmptySchema1 instance; protected AllofWithOneEmptySchema1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java index f069a8c5936..1e5e758cb3c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.NumberJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -50,10 +49,10 @@ public static class AllofWithTheFirstEmptySchema1 extends JsonSchema implements private static AllofWithTheFirstEmptySchema1 instance; protected AllofWithTheFirstEmptySchema1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java index 30cc99b0b66..94acb1446c3 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.NumberJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -50,10 +49,10 @@ public static class AllofWithTheLastEmptySchema1 extends JsonSchema implements S private static AllofWithTheLastEmptySchema1 instance; protected AllofWithTheLastEmptySchema1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java index cfc84b9b4aa..f980589d69c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java @@ -15,7 +15,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -49,10 +48,10 @@ public static class AllofWithTwoEmptySchemas1 extends JsonSchema implements Sche private static AllofWithTwoEmptySchemas1 instance; protected AllofWithTwoEmptySchemas1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java index 2fa13a547cb..68b5db52de6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java @@ -15,12 +15,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -41,7 +39,7 @@ public static class Schema1 extends JsonSchema implements SchemaNullValidator, S private static Schema1 instance; protected Schema1() { super(new JsonSchemaInfo() - new KeywordEntry("minimum", new MinimumValidator(2)) + .minimum(2) ); } @@ -259,10 +257,10 @@ public static class Anyof1 extends JsonSchema implements SchemaNullValidator, Sc private static Anyof1 instance; protected Anyof1() { super(new JsonSchemaInfo() - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + .anyOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index 3afc6bcd140..9b11b56ae4a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -561,10 +560,10 @@ public static class AnyofComplexTypes1 extends JsonSchema implements SchemaNullV private static AnyofComplexTypes1 instance; protected AnyofComplexTypes1() { super(new JsonSchemaInfo() - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + .anyOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index 7d87ca727df..5006bde2c1e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -38,7 +35,7 @@ public static class Schema0 extends JsonSchema implements SchemaNullValidator, S private static Schema0 instance; protected Schema0() { super(new JsonSchemaInfo() - new KeywordEntry("maxLength", new MaxLengthValidator(2)) + .maxLength(2) ); } @@ -250,7 +247,7 @@ public static class Schema1 extends JsonSchema implements SchemaNullValidator, S private static Schema1 instance; protected Schema1() { super(new JsonSchemaInfo() - new KeywordEntry("minLength", new MinLengthValidator(4)) + .minLength(4) ); } @@ -472,10 +469,10 @@ protected AnyofWithBaseSchema1() { .type(Set.of( String.class ) - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + .anyOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java index a2dfa48b3e6..0bc323844d2 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.NumberJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -50,10 +49,10 @@ public static class AnyofWithOneEmptySchema1 extends JsonSchema implements Schem private static AnyofWithOneEmptySchema1 instance; protected AnyofWithOneEmptySchema1() { super(new JsonSchemaInfo() - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + .anyOf(List.of( Schema0.class, Schema1.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java index 6eee6464c0f..4b8cc28d2c1 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -52,7 +51,7 @@ public static class ArrayTypeMatchesArrays1 extends JsonSchema implements Schema protected ArrayTypeMatchesArrays1() { super(new JsonSchemaInfo() .type(Set.of(FrozenList.class)) - new KeywordEntry("items", new ItemsValidator(Items.class)) + .items(Items.class) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java index 4d03eaf7a66..9dda33e145a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class ByInt1 extends JsonSchema implements SchemaNullValidator, Sc private static ByInt1 instance; protected ByInt1() { super(new JsonSchemaInfo() - new KeywordEntry("multipleOf", new MultipleOfValidator(2)) + .multipleOf(2) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java index eaa074a2a07..02230d8d5fc 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class ByNumber1 extends JsonSchema implements SchemaNullValidator, private static ByNumber1 instance; protected ByNumber1() { super(new JsonSchemaInfo() - new KeywordEntry("multipleOf", new MultipleOfValidator(1.5)) + .multipleOf(1.5) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java index 38ca1b37dc7..b0dff255b8d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class BySmallNumber1 extends JsonSchema implements SchemaNullValid private static BySmallNumber1 instance; protected BySmallNumber1() { super(new JsonSchemaInfo() - new KeywordEntry("multipleOf", new MultipleOfValidator(0.00010)) + .multipleOf(0.00010) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java index c9ca60512e1..0ee52e6cec6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -39,9 +38,9 @@ protected EnumWith0DoesNotMatchFalse1() { Float.class, Double.class ) - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + .enumValues(SetMaker.makeSet( 0 - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java index 59c8a37f195..00dbf704218 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -39,9 +38,9 @@ protected EnumWith1DoesNotMatchTrue1() { Float.class, Double.class ) - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + .enumValues(SetMaker.makeSet( 1 - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java index 61582178fce..1f21f41ddc6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -37,10 +36,10 @@ protected EnumWithEscapedCharacters1() { .type(Set.of( String.class ) - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + .enumValues(SetMaker.makeSet( "foo\nbar", "foo\rbar" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java index fbe3450f631..8a43d460c02 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -34,9 +33,9 @@ public static class EnumWithFalseDoesNotMatch01 extends JsonSchema implements Sc protected EnumWithFalseDoesNotMatch01() { super(new JsonSchemaInfo() .type(Set.of(Boolean.class)) - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + .enumValues(SetMaker.makeSet( false - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java index d7eaedfb19d..a8aa2ab4179 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -34,9 +33,9 @@ public static class EnumWithTrueDoesNotMatch11 extends JsonSchema implements Sch protected EnumWithTrueDoesNotMatch11() { super(new JsonSchemaInfo() .type(Set.of(Boolean.class)) - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + .enumValues(SetMaker.makeSet( true - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java index 24c11ce95dd..24e2203017d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; @@ -34,9 +33,9 @@ protected Foo() { .type(Set.of( String.class ) - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + .enumValues(SetMaker.makeSet( "foo" - ))) + )) ); } @@ -85,9 +84,9 @@ protected Bar() { .type(Set.of( String.class ) - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + .enumValues(SetMaker.makeSet( "bar" - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java index edf23cee95a..86de8ac5876 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; @@ -38,7 +37,7 @@ protected InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1() { Float.class, Double.class ) - new KeywordEntry("multipleOf", new MultipleOfValidator(0.123456789)) + .multipleOf(0.123456789) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java index c749fe4f897..494b5d95e9d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -41,7 +40,7 @@ protected Bar() { .type(Set.of( String.class ) - new KeywordEntry("minLength", new MinLengthValidator(4)) + .minLength(4) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java index e7040d445db..b3fc71bba37 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MaximumValidation1 extends JsonSchema implements SchemaNullV private static MaximumValidation1 instance; protected MaximumValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("maximum", new MaximumValidator(3.0)) + .maximum(3.0) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java index c5ae095b438..b211e521443 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MaximumValidationWithUnsignedInteger1 extends JsonSchema imp private static MaximumValidationWithUnsignedInteger1 instance; protected MaximumValidationWithUnsignedInteger1() { super(new JsonSchemaInfo() - new KeywordEntry("maximum", new MaximumValidator(300)) + .maximum(300) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java index 805ccffe669..ada38526598 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaxItemsValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MaxitemsValidation1 extends JsonSchema implements SchemaNull private static MaxitemsValidation1 instance; protected MaxitemsValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("maxItems", new MaxItemsValidator(2)) + .maxItems(2) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java index df7c3ea3aa8..cac5560e7cd 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MaxlengthValidation1 extends JsonSchema implements SchemaNul private static MaxlengthValidation1 instance; protected MaxlengthValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("maxLength", new MaxLengthValidator(2)) + .maxLength(2) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java index e67215a150c..2ca7286f072 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaxPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class Maxproperties0MeansTheObjectIsEmpty1 extends JsonSchema impl private static Maxproperties0MeansTheObjectIsEmpty1 instance; protected Maxproperties0MeansTheObjectIsEmpty1() { super(new JsonSchemaInfo() - new KeywordEntry("maxProperties", new MaxPropertiesValidator(0)) + .maxProperties(0) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java index 6a95216fd1b..96cb55987c3 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MaxPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MaxpropertiesValidation1 extends JsonSchema implements Schem private static MaxpropertiesValidation1 instance; protected MaxpropertiesValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("maxProperties", new MaxPropertiesValidator(2)) + .maxProperties(2) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java index 33afed8a700..0d03039b598 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MinimumValidation1 extends JsonSchema implements SchemaNullV private static MinimumValidation1 instance; protected MinimumValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("minimum", new MinimumValidator(1.1)) + .minimum(1.1) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java index 2ccd6b7060c..0ed434f0938 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MinimumValidationWithSignedInteger1 extends JsonSchema imple private static MinimumValidationWithSignedInteger1 instance; protected MinimumValidationWithSignedInteger1() { super(new JsonSchemaInfo() - new KeywordEntry("minimum", new MinimumValidator(-2)) + .minimum(-2) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java index fbcca04b3e1..e19ed72e24b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MinItemsValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MinitemsValidation1 extends JsonSchema implements SchemaNull private static MinitemsValidation1 instance; protected MinitemsValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("minItems", new MinItemsValidator(1)) + .minItems(1) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java index ecd9f44a582..54447c9b445 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MinlengthValidation1 extends JsonSchema implements SchemaNul private static MinlengthValidation1 instance; protected MinlengthValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("minLength", new MinLengthValidator(2)) + .minLength(2) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java index c46cc77dcad..2b526918adf 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MinPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -42,7 +41,7 @@ public static class MinpropertiesValidation1 extends JsonSchema implements Schem private static MinpropertiesValidation1 instance; protected MinpropertiesValidation1() { super(new JsonSchemaInfo() - new KeywordEntry("minProperties", new MinPropertiesValidator(1)) + .minProperties(1) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java index cb42f8c7604..750506e577e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java @@ -15,7 +15,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.NullJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -40,9 +39,9 @@ public static class Schema0 extends JsonSchema implements SchemaNullValidator, S private static Schema0 instance; protected Schema0() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema01.class - ))) + )) ); } @@ -260,9 +259,9 @@ public static class NestedAllofToCheckValidationSemantics1 extends JsonSchema im private static NestedAllofToCheckValidationSemantics1 instance; protected NestedAllofToCheckValidationSemantics1() { super(new JsonSchemaInfo() - new KeywordEntry("allOf", new AllOfValidator(List.of( + .allOf(List.of( Schema0.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java index e36bc7f4e0b..d6c742d288b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java @@ -15,7 +15,6 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.NullJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; @@ -40,9 +39,9 @@ public static class Schema0 extends JsonSchema implements SchemaNullValidator, S private static Schema0 instance; protected Schema0() { super(new JsonSchemaInfo() - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + .anyOf(List.of( Schema01.class - ))) + )) ); } @@ -260,9 +259,9 @@ public static class NestedAnyofToCheckValidationSemantics1 extends JsonSchema im private static NestedAnyofToCheckValidationSemantics1 instance; protected NestedAnyofToCheckValidationSemantics1() { super(new JsonSchemaInfo() - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + .anyOf(List.of( Schema0.class - ))) + )) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java index 627d9c5c2a4..f6224b9d88b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -46,7 +45,7 @@ public static class Items2 extends JsonSchema implements SchemaListValidator getImports(String sourceJsonPath, CodegenSchema schema, Featu addPropertiesValidator(schema, imports); addRequiredValidator(schema, imports); addAdditionalPropertiesValidator(schema, imports); - addExclusiveMaximumValidator(schema, imports); - addExclusiveMinimumValidator(schema, imports); - addItemsValidator(schema, imports); - addMaxItemsValidator(schema, imports); - addMinItemsValidator(schema, imports); - addMaxLengthValidator(schema, imports); - addMinLengthValidator(schema, imports); - addMaxPropertiesValidator(schema, imports); - addMinPropertiesValidator(schema, imports); - addMaximumValidator(schema, imports); - addMinimumValidator(schema, imports); - addMultipleOfValidator(schema, imports); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); - addNotValidator(schema, imports); addEnumValidator(schema, imports); addPatternValidator(schema, imports); if (schema.mapValueSchema != null) { @@ -1560,7 +1539,6 @@ private void addPatternValidator(CodegenSchema schema, Set imports) { private void addEnumValidator(CodegenSchema schema, Set imports) { if (schema.enumInfo != null) { - imports.add("import "+packageName + ".schemas.validation.EnumValidator;"); imports.add("import "+packageName + ".schemas.SetMaker;"); } } @@ -1575,31 +1553,22 @@ private void addPropertiesValidator(CodegenSchema schema, Set imports) { private void addAllOfValidator(CodegenSchema schema, Set imports) { if (schema.allOf != null) { - imports.add("import "+packageName + ".schemas.validation.AllOfValidator;"); imports.add("import java.util.List;"); } } private void addAnyOfValidator(CodegenSchema schema, Set imports) { if (schema.anyOf != null) { - imports.add("import "+packageName + ".schemas.validation.AnyOfValidator;"); imports.add("import java.util.List;"); } } private void addOneOfValidator(CodegenSchema schema, Set imports) { if (schema.oneOf != null) { - imports.add("import "+packageName + ".schemas.validation.OneOfValidator;"); imports.add("import java.util.List;"); } } - private void addNotValidator(CodegenSchema schema, Set imports) { - if (schema.not != null) { - imports.add("import "+packageName + ".schemas.validation.NotValidator;"); - } - } - private void addRequiredValidator(CodegenSchema schema, Set imports) { if (schema.requiredProperties != null) { imports.add("import java.util.Set;"); @@ -1612,78 +1581,6 @@ private void addAdditionalPropertiesValidator(CodegenSchema schema, Set } } - private void addExclusiveMinimumValidator(CodegenSchema schema, Set imports) { - if (schema.exclusiveMaximum != null) { - imports.add("import "+packageName + ".schemas.validation.ExclusiveMinimumValidator;"); - } - } - - private void addExclusiveMaximumValidator(CodegenSchema schema, Set imports) { - if (schema.exclusiveMaximum != null) { - imports.add("import "+packageName + ".schemas.validation.ExclusiveMaximumValidator;"); - } - } - - private void addItemsValidator(CodegenSchema schema, Set imports) { - if (schema.items != null) { - imports.add("import "+packageName + ".schemas.validation.ItemsValidator;"); - } - } - - private void addMaxItemsValidator(CodegenSchema schema, Set imports) { - if (schema.maxItems != null) { - imports.add("import "+packageName + ".schemas.validation.MaxItemsValidator;"); - } - } - - private void addMinItemsValidator(CodegenSchema schema, Set imports) { - if (schema.minItems != null) { - imports.add("import "+packageName + ".schemas.validation.MinItemsValidator;"); - } - } - - private void addMaxLengthValidator(CodegenSchema schema, Set imports) { - if (schema.maxLength != null) { - imports.add("import "+packageName + ".schemas.validation.MaxLengthValidator;"); - } - } - - private void addMinLengthValidator(CodegenSchema schema, Set imports) { - if (schema.minLength != null) { - imports.add("import "+packageName + ".schemas.validation.MinLengthValidator;"); - } - } - - private void addMaxPropertiesValidator(CodegenSchema schema, Set imports) { - if (schema.maxProperties != null) { - imports.add("import "+packageName + ".schemas.validation.MaxPropertiesValidator;"); - } - } - - private void addMinPropertiesValidator(CodegenSchema schema, Set imports) { - if (schema.minProperties != null) { - imports.add("import "+packageName + ".schemas.validation.MinPropertiesValidator;"); - } - } - - private void addMaximumValidator(CodegenSchema schema, Set imports) { - if (schema.maximum != null && schema.exclusiveMaximum == null) { - imports.add("import "+packageName + ".schemas.validation.MaximumValidator;"); - } - } - - private void addMinimumValidator(CodegenSchema schema, Set imports) { - if (schema.minimum != null && schema.exclusiveMinimum == null) { - imports.add("import "+packageName + ".schemas.validation.MinimumValidator;"); - } - } - - private void addMultipleOfValidator(CodegenSchema schema, Set imports) { - if (schema.multipleOf != null) { - imports.add("import "+packageName + ".schemas.validation.MultipleOfValidator;"); - } - } - private void addCustomSchemaImports(Set imports, CodegenSchema schema) { imports.add("import " + packageName + ".schemas.validation.JsonSchema;"); imports.add("import " + packageName + ".schemas.validation.JsonSchemaInfo;"); @@ -1706,7 +1603,6 @@ private void addBooleanSchemaImports(Set imports, CodegenSchema schema) addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); - addNotValidator(schema, imports); addEnumValidator(schema, imports); } @@ -1715,7 +1611,6 @@ private void addNullSchemaImports(Set imports, CodegenSchema schema) { addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); - addNotValidator(schema, imports); addEnumValidator(schema, imports); } @@ -1727,12 +1622,9 @@ private void addMapSchemaImports(Set imports, CodegenSchema schema) { addRequiredValidator(schema, imports); addAdditionalPropertiesValidator(schema, imports); addPropertiesValidator(schema, imports); - addMaxPropertiesValidator(schema, imports); - addMinPropertiesValidator(schema, imports); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); - addNotValidator(schema, imports); } private void addListSchemaImports(Set imports, CodegenSchema schema) { @@ -1740,26 +1632,16 @@ private void addListSchemaImports(Set imports, CodegenSchema schema) { imports.add("import "+packageName + ".schemas.validation.FrozenList;"); imports.add("import java.util.List;"); imports.add("import java.util.ArrayList;"); // for castToAllowedTypes - addItemsValidator(schema, imports); - addMaxItemsValidator(schema, imports); - addMinItemsValidator(schema, imports); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); - addNotValidator(schema, imports); } private void addNumberSchemaImports(Set imports, CodegenSchema schema) { imports.add("import " + packageName + ".schemas.validation.SchemaNumberValidator;"); - addExclusiveMaximumValidator(schema, imports); - addExclusiveMinimumValidator(schema, imports); - addMaximumValidator(schema, imports); - addMinimumValidator(schema, imports); - addMultipleOfValidator(schema, imports); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); - addNotValidator(schema, imports); addEnumValidator(schema, imports); } @@ -1774,12 +1656,9 @@ private void addStringSchemaImports(Set imports, CodegenSchema schema) { } } imports.add("import " + packageName + ".schemas.validation.SchemaStringValidator;"); - addMaxLengthValidator(schema, imports); - addMinLengthValidator(schema, imports); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); - addNotValidator(schema, imports); addEnumValidator(schema, imports); addPatternValidator(schema, imports); } diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_allOf.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_allOf.hbs index 9a4606ab683..00f1092d895 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_allOf.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_allOf.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("allOf", new AllOfValidator(List.of(
+    allOf = List.of(
{{~#each allOf}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -11,9 +11,9 @@         [{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}}){{#unless @last}},{{/unless}}
{{~/if}} {{/each}} -    ))){{#unless @last}},{{/unless}}
+    )
{{~else}} -new KeywordEntry("allOf", new AllOfValidator(List.of( +.allOf(List.of( {{#each allOf}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -25,5 +25,5 @@ new KeywordEntry("allOf", new AllOfValidator(List.of( {{jsonPathPiece.camelCase}}.class{{#unless @last}},{{/unless}} {{/if}} {{/each}} -))){{#unless @last}},{{/unless}} +)) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_anyOf.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_anyOf.hbs index f9ca4e5dd2e..d4f2b86cab3 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_anyOf.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_anyOf.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
+    anyOf = List.of(
{{~#each anyOf}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -11,9 +11,9 @@         [{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}}){{#unless @last}},{{/unless}}
{{~/if}} {{/each}} -    ))){{#unless @last}},{{/unless}}
+    )
{{~else}} -new KeywordEntry("anyOf", new AnyOfValidator(List.of( +.anyOf(List.of( {{#each anyOf}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -25,5 +25,5 @@ new KeywordEntry("anyOf", new AnyOfValidator(List.of( {{jsonPathPiece.camelCase}}.class{{#unless @last}},{{/unless}} {{/if}} {{/each}} -))){{#unless @last}},{{/unless}} +)) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_enum.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_enum.hbs index cab84ef8181..53d2367f265 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_enum.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_enum.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
+    enumValues = SetMaker.makeSet(
{{~#each enumInfo.valueToName}} {{#with @key}} {{#eq type "string"}} @@ -13,9 +13,9 @@ {{~/eq}} {{/with}} {{/each}} -))){{#unless @last}},{{/unless}}
+)
{{~else}} -new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( +.enumValues(SetMaker.makeSet( {{#each enumInfo.valueToName}} {{#with @key}} {{#eq type "string"}} @@ -29,5 +29,5 @@ new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( {{/eq}} {{/with}} {{/each}} -))){{#unless @last}},{{/unless}} +)) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum.hbs index 83273f80699..a3491bf0cdf 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("exclusiveMaximum", new ExclusiveMaximumValidator({{exclusiveMaximum}})){{#unless @last}},{{/unless}}
+    exclusiveMaximum = {{exclusiveMaximum}}
{{~else}} -new KeywordEntry("exclusiveMaximum", new ExclusiveMaximumValidator({{exclusiveMaximum}})){{#unless @last}},{{/unless}} +.exclusiveMaximum({{exclusiveMaximum}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum.hbs index 0fb56705da7..247a773a683 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("exclusiveMinimum", new ExclusiveMinimumValidator({{exclusiveMinimum}})){{#unless @last}},{{/unless}}
+    exclusiveMinimum = {{exclusiveMinimum}}
{{~else}} -new KeywordEntry("exclusiveMinimum", new ExclusiveMinimumValidator({{exclusiveMinimum}})){{#unless @last}},{{/unless}} +.exclusiveMinimum({{exclusiveMinimum}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_items.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_items.hbs index 8dc1bb0305e..c13f6b65b7c 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_items.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_items.hbs @@ -2,16 +2,16 @@ {{#with items}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} -    new KeywordEntry("items", new ItemsValidator([{{refInfo.refModule}}.{{refInfo.refClass}}.class]({{docRoot}}{{refInfo.ref.pathFromDocRoot}}.md#{{refInfo.ref.jsonPathPiece.anchorPiece}})){{#unless @last}},{{/unless}}
+    items = [{{refInfo.refModule}}.{{refInfo.refClass}}.class]({{docRoot}}{{refInfo.ref.pathFromDocRoot}}.md#{{refInfo.ref.jsonPathPiece.anchorPiece}})
{{~else}} -    new KeywordEntry("items", new ItemsValidator([{{refInfo.refClass}}.class](#{{refInfo.ref.jsonPathPiece.anchorPiece}}))){{#unless @last}},{{/unless}}
+    items = [{{refInfo.refClass}}.class](#{{refInfo.ref.jsonPathPiece.anchorPiece}})
{{~/if}} {{else}} -    new KeywordEntry("items", new ItemsValidator([{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}}))){{#unless @last}},{{/unless}}
+    items = [{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}})
{{~/if}} {{/with}} {{else}} {{#with items}} -new KeywordEntry("items", new ItemsValidator({{#if refInfo.refClass}}{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}{{else}}{{jsonPathPiece.camelCase}}{{/if}}.class)){{#unless @last}},{{/unless}} +.items({{#if refInfo.refClass}}{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}{{else}}{{jsonPathPiece.camelCase}}{{/if}}.class) {{/with}} {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxItems.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxItems.hbs index d1372cbed61..a24e9873d28 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxItems.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxItems.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("maxItems", new MaxItemsValidator({{maxItems}})){{#unless @last}},{{/unless}}
+    maxItems = {{maxItems}}
{{~else}} -new KeywordEntry("maxItems", new MaxItemsValidator({{maxItems}})){{#unless @last}},{{/unless}} +.maxItems({{maxItems}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxLength.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxLength.hbs index 88b40017c42..2528d175543 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxLength.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxLength.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("maxLength", new MaxLengthValidator({{maxLength}})){{#unless @last}},{{/unless}}
+    maxLength = {{maxLength}}
{{~else}} -new KeywordEntry("maxLength", new MaxLengthValidator({{maxLength}})){{#unless @last}},{{/unless}} +.maxLength({{maxLength}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxProperties.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxProperties.hbs index f5ccae19891..ccdc650911e 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxProperties.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maxProperties.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("maxProperties", new MaxPropertiesValidator({{maxProperties}})){{#unless @last}},{{/unless}}
+    maxProperties = {{maxProperties}}
{{~else}} -new KeywordEntry("maxProperties", new MaxPropertiesValidator({{maxProperties}})){{#unless @last}},{{/unless}} +.maxProperties({{maxProperties}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maximum.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maximum.hbs index 825959db156..5fb86f6a3d9 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maximum.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_maximum.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("maximum", new MaximumValidator({{maximum}})){{#unless @last}},{{/unless}}
+    maximum = {{maximum}}
{{~else}} -new KeywordEntry("maximum", new MaximumValidator({{maximum}})){{#unless @last}},{{/unless}} +.maximum({{maximum}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minItems.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minItems.hbs index 4e47c9a19b8..b7ba9f558a0 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minItems.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minItems.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("minItems", new MinItemsValidator({{minItems}})){{#unless @last}},{{/unless}}
+    minItems = {{minItems}}
{{~else}} -new KeywordEntry("minItems", new MinItemsValidator({{minItems}})){{#unless @last}},{{/unless}} +.minItems({{minItems}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minLength.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minLength.hbs index c367c2caaa7..bb19079b96f 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minLength.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minLength.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("minLength", new MinLengthValidator({{minLength}})){{#unless @last}},{{/unless}}
+    minLength = {{minLength}}
{{~else}} -new KeywordEntry("minLength", new MinLengthValidator({{minLength}})){{#unless @last}},{{/unless}} +.minLength({{minLength}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minProperties.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minProperties.hbs index 7621a2a27ea..ee44d0be08b 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minProperties.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minProperties.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("minProperties", new MinPropertiesValidator({{minProperties}})){{#unless @last}},{{/unless}}
+    minProperties = {{minProperties}}
{{~else}} -new KeywordEntry("minProperties", new MinPropertiesValidator({{minProperties}})){{#unless @last}},{{/unless}} +.minProperties({{minProperties}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minimum.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minimum.hbs index 79de6e694d4..3a3168c2700 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minimum.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_minimum.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("minimum", new MinimumValidator({{minimum}})){{#unless @last}},{{/unless}}
+    minimum = {{minimum}}
{{~else}} -new KeywordEntry("minimum", new MinimumValidator({{minimum}})){{#unless @last}},{{/unless}} +.minimum({{minimum}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs index 37ab5eb9bf3..c65758658c9 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("multipleOf", new MultipleOfValidator({{multipleOf}})){{#unless @last}},{{/unless}}
+    multipleOf = {{multipleOf}}
{{~else}} -new KeywordEntry("multipleOf", new MultipleOfValidator({{multipleOf}})){{#unless @last}},{{/unless}} +.multipleOf({{multipleOf}}) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_not.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_not.hbs index 5a9086d0f8d..7f30cd16b1c 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_not.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_not.hbs @@ -2,16 +2,16 @@ {{#with not}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} -    new KeywordEntry("not", new NotValidator([{{refInfo.refModule}}.{{refInfo.refClass}}.class]({{docRoot}}{{refInfo.ref.pathFromDocRoot}}.md#{{refInfo.ref.jsonPathPiece.anchorPiece}})){{#unless @last}},{{/unless}}
+    not = [{{refInfo.refModule}}.{{refInfo.refClass}}.class]({{docRoot}}{{refInfo.ref.pathFromDocRoot}}.md#{{refInfo.ref.jsonPathPiece.anchorPiece}})
{{~else}} -    new KeywordEntry("not", new NotValidator([{{refInfo.refClass}}.class](#{{refInfo.ref.jsonPathPiece.anchorPiece}}))){{#unless @last}},{{/unless}}
+    not = [{{refInfo.refClass}}.class](#{{refInfo.ref.jsonPathPiece.anchorPiece}})
{{~/if}} {{else}} -    new KeywordEntry("not", new NotValidator([{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}}))){{#unless @last}},{{/unless}}
+    not = [{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}})
{{~/if}} {{~/with}} {{else}} {{#with not}} -new KeywordEntry("not", new NotValidator({{#if refInfo.refClass}}{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}{{else}}{{jsonPathPiece.camelCase}}{{/if}}.class)){{#unless @last}},{{/unless}} +.not({{#if refInfo.refClass}}{{#if refInfo.refModule}}{{refInfo.refModule}}.{{/if}}{{refInfo.refClass}}{{else}}{{jsonPathPiece.camelCase}}{{/if}}.class) {{/with}} {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_oneOf.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_oneOf.hbs index 1592ddf7948..7b0efdf4722 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_oneOf.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_oneOf.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    new KeywordEntry("oneOf", new OneOfValidator(List.of(
+    oneOf = List.of(
{{~#each oneOf}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -11,9 +11,9 @@         [{{jsonPathPiece.camelCase}}.class](#{{jsonPathPiece.anchorPiece}}){{#unless @last}},{{/unless}}
{{~/if}} {{/each}} -    ))){{#unless @last}},{{/unless}}
+    ))
{{~else}} -new KeywordEntry("oneOf", new OneOfValidator(List.of( +.oneOf(List.of( {{#each oneOf}} {{#if refInfo.refClass}} {{#if refInfo.refModule}} @@ -25,5 +25,5 @@ new KeywordEntry("oneOf", new OneOfValidator(List.of( {{jsonPathPiece.camelCase}}.class{{#unless @last}},{{/unless}} {{/if}} {{/each}} -))){{#unless @last}},{{/unless}} +)) {{/if}} \ No newline at end of file From 91f18ed0e046cf9c412acc8de2c4caab66f78c68 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 09:39:21 -0800 Subject: [PATCH 05/12] Removes CodegenSchema keywords usage from schema java files --- ...rtiesAllowsASchemaWhichShouldValidate.java | 1 + ...ditionalpropertiesAreAllowedByDefault.java | 1 + .../AdditionalpropertiesCanExistByItself.java | 1 + ...lpropertiesShouldNotLookInApplicators.java | 2 + .../client/components/schemas/Allof.java | 3 + .../schemas/AllofCombinedWithAnyofOneof.java | 4 + .../components/schemas/AllofSimpleTypes.java | 3 + .../schemas/AllofWithBaseSchema.java | 3 + .../schemas/AllofWithOneEmptySchema.java | 1 + .../schemas/AllofWithTheFirstEmptySchema.java | 1 + .../schemas/AllofWithTheLastEmptySchema.java | 1 + .../schemas/AllofWithTwoEmptySchemas.java | 1 + .../client/components/schemas/Anyof.java | 2 + .../components/schemas/AnyofComplexTypes.java | 3 + .../schemas/AnyofWithBaseSchema.java | 2 + .../schemas/AnyofWithOneEmptySchema.java | 1 + .../schemas/ArrayTypeMatchesArrays.java | 3 +- .../client/components/schemas/ByInt.java | 1 + .../client/components/schemas/ByNumber.java | 1 + .../components/schemas/BySmallNumber.java | 1 + .../components/schemas/DateTimeFormat.java | 1 + .../components/schemas/EmailFormat.java | 1 + .../schemas/EnumWith0DoesNotMatchFalse.java | 1 + .../schemas/EnumWith1DoesNotMatchTrue.java | 1 + .../schemas/EnumWithFalseDoesNotMatch0.java | 1 + .../schemas/EnumWithTrueDoesNotMatch1.java | 1 + .../components/schemas/EnumsInProperties.java | 1 + .../components/schemas/ForbiddenProperty.java | 1 + .../components/schemas/HostnameFormat.java | 1 + ...ouldNotRaiseErrorWhenFloatDivisionInf.java | 1 + .../schemas/InvalidStringValueForDefault.java | 1 + .../client/components/schemas/Ipv4Format.java | 1 + .../client/components/schemas/Ipv6Format.java | 1 + .../components/schemas/JsonPointerFormat.java | 1 + .../components/schemas/MaximumValidation.java | 1 + .../MaximumValidationWithUnsignedInteger.java | 1 + .../schemas/MaxitemsValidation.java | 1 + .../schemas/MaxlengthValidation.java | 1 + .../Maxproperties0MeansTheObjectIsEmpty.java | 1 + .../schemas/MaxpropertiesValidation.java | 1 + .../components/schemas/MinimumValidation.java | 1 + .../MinimumValidationWithSignedInteger.java | 1 + .../schemas/MinitemsValidation.java | 1 + .../schemas/MinlengthValidation.java | 1 + .../schemas/MinpropertiesValidation.java | 1 + ...NestedAllofToCheckValidationSemantics.java | 2 + ...NestedAnyofToCheckValidationSemantics.java | 2 + .../components/schemas/NestedItems.java | 12 +- ...NestedOneofToCheckValidationSemantics.java | 2 + .../client/components/schemas/Not.java | 1 + .../schemas/NotMoreComplexSchema.java | 2 + .../schemas/ObjectPropertiesValidation.java | 1 + .../client/components/schemas/Oneof.java | 2 + .../components/schemas/OneofComplexTypes.java | 3 + .../schemas/OneofWithBaseSchema.java | 2 + .../schemas/OneofWithEmptySchema.java | 1 + .../components/schemas/OneofWithRequired.java | 3 + .../schemas/PatternIsNotAnchored.java | 1 + .../components/schemas/PatternValidation.java | 1 + .../PropertiesWithEscapedCharacters.java | 1 + .../PropertyNamedRefThatIsNotAReference.java | 1 + .../schemas/RefInAdditionalproperties.java | 1 + .../client/components/schemas/RefInAllof.java | 1 + .../client/components/schemas/RefInAnyof.java | 1 + .../client/components/schemas/RefInItems.java | 3 +- .../client/components/schemas/RefInNot.java | 1 + .../client/components/schemas/RefInOneof.java | 1 + .../components/schemas/RefInProperty.java | 1 + .../schemas/RequiredDefaultValidation.java | 1 + .../schemas/RequiredValidation.java | 1 + .../schemas/RequiredWithEmptyArray.java | 1 + .../RequiredWithEscapedCharacters.java | 1 + .../schemas/SimpleEnumValidation.java | 1 + ...esNotDoAnythingIfThePropertyIsMissing.java | 2 + .../schemas/UniqueitemsFalseValidation.java | 1 + .../schemas/UniqueitemsValidation.java | 1 + .../client/components/schemas/UriFormat.java | 1 + .../schemas/UriReferenceFormat.java | 1 + .../components/schemas/UriTemplateFormat.java | 1 + .../_Schema_anytypeOrMultitype.hbs | 109 +++++++++--------- .../schemas/SchemaClass/_Schema_boolean.hbs | 31 +++-- .../schemas/SchemaClass/_Schema_list.hbs | 43 +++---- .../schemas/SchemaClass/_Schema_map.hbs | 47 ++++---- .../schemas/SchemaClass/_Schema_null.hbs | 31 +++-- .../schemas/SchemaClass/_Schema_number.hbs | 55 ++++----- .../schemas/SchemaClass/_Schema_string.hbs | 46 ++++---- 86 files changed, 276 insertions(+), 205 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java index dcc844a49af..9de74a42a03 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.java @@ -78,6 +78,7 @@ public static class AdditionalpropertiesAllowsASchemaWhichShouldValidate1 extend Do not edit the class manually. */ private static AdditionalpropertiesAllowsASchemaWhichShouldValidate1 instance; + protected AdditionalpropertiesAllowsASchemaWhichShouldValidate1() { super(new JsonSchemaInfo() .type(Set.of(FrozenMap.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java index 127a7dfe06d..3048267cde0 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java @@ -83,6 +83,7 @@ public static class AdditionalpropertiesAreAllowedByDefault1 extends JsonSchema Do not edit the class manually. */ private static AdditionalpropertiesAreAllowedByDefault1 instance; + protected AdditionalpropertiesAreAllowedByDefault1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java index 61b5b2b74dc..9a8194c421b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java @@ -55,6 +55,7 @@ public static class AdditionalpropertiesCanExistByItself1 extends JsonSchema imp Do not edit the class manually. */ private static AdditionalpropertiesCanExistByItself1 instance; + protected AdditionalpropertiesCanExistByItself1() { super(new JsonSchemaInfo() .type(Set.of(FrozenMap.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java index 412b64fd7b7..30bd1f0c696 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java @@ -72,6 +72,7 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -323,6 +324,7 @@ public static class AdditionalpropertiesShouldNotLookInApplicators1 extends Json Do not edit the class manually. */ private static AdditionalpropertiesShouldNotLookInApplicators1 instance; + protected AdditionalpropertiesShouldNotLookInApplicators1() { super(new JsonSchemaInfo() .additionalProperties(AdditionalProperties.class) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index d7fab830155..d673b013f48 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -66,6 +66,7 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -324,6 +325,7 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -558,6 +560,7 @@ public static class Allof1 extends JsonSchema implements SchemaNullValidator, Sc Do not edit the class manually. */ private static Allof1 instance; + protected Allof1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index 83a33b99e65..fafb47f8301 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -33,6 +33,7 @@ public class AllofCombinedWithAnyofOneof { public static class Schema02 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema02 instance; + protected Schema02() { super(new JsonSchemaInfo() .multipleOf(2) @@ -245,6 +246,7 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema01 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema01 instance; + protected Schema01() { super(new JsonSchemaInfo() .multipleOf(3) @@ -457,6 +459,7 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .multipleOf(5) @@ -675,6 +678,7 @@ public static class AllofCombinedWithAnyofOneof1 extends JsonSchema implements S Do not edit the class manually. */ private static AllofCombinedWithAnyofOneof1 instance; + protected AllofCombinedWithAnyofOneof1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java index 6567b0ef505..db8c9026d46 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java @@ -33,6 +33,7 @@ public class AllofSimpleTypes { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .maximum(30) @@ -245,6 +246,7 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .minimum(20) @@ -463,6 +465,7 @@ public static class AllofSimpleTypes1 extends JsonSchema implements SchemaNullVa Do not edit the class manually. */ private static AllofSimpleTypes1 instance; + protected AllofSimpleTypes1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index b9d3971c784..bce7b957bd2 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -67,6 +67,7 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -325,6 +326,7 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -589,6 +591,7 @@ public static class AllofWithBaseSchema1 extends JsonSchema implements SchemaNul Do not edit the class manually. */ private static AllofWithBaseSchema1 instance; + protected AllofWithBaseSchema1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java index 4175443862e..64a51548fdc 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java @@ -43,6 +43,7 @@ public static class AllofWithOneEmptySchema1 extends JsonSchema implements Schem Do not edit the class manually. */ private static AllofWithOneEmptySchema1 instance; + protected AllofWithOneEmptySchema1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java index 1e5e758cb3c..bf4386844a9 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java @@ -47,6 +47,7 @@ public static class AllofWithTheFirstEmptySchema1 extends JsonSchema implements Do not edit the class manually. */ private static AllofWithTheFirstEmptySchema1 instance; + protected AllofWithTheFirstEmptySchema1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java index 94acb1446c3..2e9cdcb1050 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java @@ -47,6 +47,7 @@ public static class AllofWithTheLastEmptySchema1 extends JsonSchema implements S Do not edit the class manually. */ private static AllofWithTheLastEmptySchema1 instance; + protected AllofWithTheLastEmptySchema1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java index f980589d69c..632f48c8a51 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java @@ -46,6 +46,7 @@ public static class AllofWithTwoEmptySchemas1 extends JsonSchema implements Sche Do not edit the class manually. */ private static AllofWithTwoEmptySchemas1 instance; + protected AllofWithTwoEmptySchemas1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java index 68b5db52de6..843f5680e86 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java @@ -37,6 +37,7 @@ public static class Schema0 extends IntJsonSchema {} public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .minimum(2) @@ -255,6 +256,7 @@ public static class Anyof1 extends JsonSchema implements SchemaNullValidator, Sc Do not edit the class manually. */ private static Anyof1 instance; + protected Anyof1() { super(new JsonSchemaInfo() .anyOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index 9b11b56ae4a..581d8720cb6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -66,6 +66,7 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -324,6 +325,7 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -558,6 +560,7 @@ public static class AnyofComplexTypes1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static AnyofComplexTypes1 instance; + protected AnyofComplexTypes1() { super(new JsonSchemaInfo() .anyOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index 5006bde2c1e..19b7b1ddd86 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -33,6 +33,7 @@ public class AnyofWithBaseSchema { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .maxLength(2) @@ -245,6 +246,7 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .minLength(4) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java index 0bc323844d2..9ed3b2c92b9 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java @@ -47,6 +47,7 @@ public static class AnyofWithOneEmptySchema1 extends JsonSchema implements Schem Do not edit the class manually. */ private static AnyofWithOneEmptySchema1 instance; + protected AnyofWithOneEmptySchema1() { super(new JsonSchemaInfo() .anyOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java index 4b8cc28d2c1..f7c9fdf98fb 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java @@ -48,9 +48,10 @@ public static class ArrayTypeMatchesArrays1 extends JsonSchema implements Schema Do not edit the class manually. */ private static ArrayTypeMatchesArrays1 instance; + protected ArrayTypeMatchesArrays1() { super(new JsonSchemaInfo() - .type(Set.of(FrozenList.class)) + .type(Set.of(FrozenList.class)) .items(Items.class) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java index 9dda33e145a..51f617c164e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java @@ -39,6 +39,7 @@ public static class ByInt1 extends JsonSchema implements SchemaNullValidator, Sc Do not edit the class manually. */ private static ByInt1 instance; + protected ByInt1() { super(new JsonSchemaInfo() .multipleOf(2) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java index 02230d8d5fc..eb635b1e4ea 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java @@ -39,6 +39,7 @@ public static class ByNumber1 extends JsonSchema implements SchemaNullValidator, Do not edit the class manually. */ private static ByNumber1 instance; + protected ByNumber1() { super(new JsonSchemaInfo() .multipleOf(1.5) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java index b0dff255b8d..964b85cb04a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java @@ -39,6 +39,7 @@ public static class BySmallNumber1 extends JsonSchema implements SchemaNullValid Do not edit the class manually. */ private static BySmallNumber1 instance; + protected BySmallNumber1() { super(new JsonSchemaInfo() .multipleOf(0.00010) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java index df34573c1ff..4c2415fa202 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java @@ -39,6 +39,7 @@ public static class DateTimeFormat1 extends JsonSchema implements SchemaNullVali Do not edit the class manually. */ private static DateTimeFormat1 instance; + protected DateTimeFormat1() { super(new JsonSchemaInfo() .format("date-time") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java index 48bda53a254..835934dd32a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java @@ -39,6 +39,7 @@ public static class EmailFormat1 extends JsonSchema implements SchemaNullValidat Do not edit the class manually. */ private static EmailFormat1 instance; + protected EmailFormat1() { super(new JsonSchemaInfo() .format("email") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java index 0ee52e6cec6..c0ffbdfac12 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java @@ -30,6 +30,7 @@ public static class EnumWith0DoesNotMatchFalse1 extends JsonSchema implements Sc Do not edit the class manually. */ private static EnumWith0DoesNotMatchFalse1 instance; + protected EnumWith0DoesNotMatchFalse1() { super(new JsonSchemaInfo() .type(Set.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java index 00dbf704218..adbcfac4f49 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java @@ -30,6 +30,7 @@ public static class EnumWith1DoesNotMatchTrue1 extends JsonSchema implements Sch Do not edit the class manually. */ private static EnumWith1DoesNotMatchTrue1 instance; + protected EnumWith1DoesNotMatchTrue1() { super(new JsonSchemaInfo() .type(Set.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java index 8a43d460c02..f4c408addd5 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java @@ -30,6 +30,7 @@ public static class EnumWithFalseDoesNotMatch01 extends JsonSchema implements Sc Do not edit the class manually. */ private static EnumWithFalseDoesNotMatch01 instance; + protected EnumWithFalseDoesNotMatch01() { super(new JsonSchemaInfo() .type(Set.of(Boolean.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java index a8aa2ab4179..fbe3ea84b05 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java @@ -30,6 +30,7 @@ public static class EnumWithTrueDoesNotMatch11 extends JsonSchema implements Sch Do not edit the class manually. */ private static EnumWithTrueDoesNotMatch11 instance; + protected EnumWithTrueDoesNotMatch11() { super(new JsonSchemaInfo() .type(Set.of(Boolean.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java index 24e2203017d..cf0c61ab987 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java @@ -170,6 +170,7 @@ public static class EnumsInProperties1 extends JsonSchema implements SchemaMapVa Do not edit the class manually. */ private static EnumsInProperties1 instance; + protected EnumsInProperties1() { super(new JsonSchemaInfo() .type(Set.of(FrozenMap.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java index b174cbc1d03..a1dc08eac94 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java @@ -75,6 +75,7 @@ public static class ForbiddenProperty1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static ForbiddenProperty1 instance; + protected ForbiddenProperty1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java index f5648bbb8d7..3473d216c88 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java @@ -39,6 +39,7 @@ public static class HostnameFormat1 extends JsonSchema implements SchemaNullVali Do not edit the class manually. */ private static HostnameFormat1 instance; + protected HostnameFormat1() { super(new JsonSchemaInfo() .format("hostname") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java index 86de8ac5876..d83abf617da 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java @@ -29,6 +29,7 @@ public static class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1 exte Do not edit the class manually. */ private static InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1 instance; + protected InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1() { super(new JsonSchemaInfo() .type(Set.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java index 494b5d95e9d..4f20d04fa17 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java @@ -118,6 +118,7 @@ public static class InvalidStringValueForDefault1 extends JsonSchema implements Do not edit the class manually. */ private static InvalidStringValueForDefault1 instance; + protected InvalidStringValueForDefault1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java index 2983cb7255d..97b37e6909b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java @@ -39,6 +39,7 @@ public static class Ipv4Format1 extends JsonSchema implements SchemaNullValidato Do not edit the class manually. */ private static Ipv4Format1 instance; + protected Ipv4Format1() { super(new JsonSchemaInfo() .format("ipv4") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java index cf8b08a1e51..ade1f42eb77 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java @@ -39,6 +39,7 @@ public static class Ipv6Format1 extends JsonSchema implements SchemaNullValidato Do not edit the class manually. */ private static Ipv6Format1 instance; + protected Ipv6Format1() { super(new JsonSchemaInfo() .format("ipv6") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java index e45ba538ce3..97ebd069ef2 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java @@ -39,6 +39,7 @@ public static class JsonPointerFormat1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static JsonPointerFormat1 instance; + protected JsonPointerFormat1() { super(new JsonSchemaInfo() .format("json-pointer") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java index b3fc71bba37..c85ef985ac8 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java @@ -39,6 +39,7 @@ public static class MaximumValidation1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static MaximumValidation1 instance; + protected MaximumValidation1() { super(new JsonSchemaInfo() .maximum(3.0) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java index b211e521443..aedbd5b391d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java @@ -39,6 +39,7 @@ public static class MaximumValidationWithUnsignedInteger1 extends JsonSchema imp Do not edit the class manually. */ private static MaximumValidationWithUnsignedInteger1 instance; + protected MaximumValidationWithUnsignedInteger1() { super(new JsonSchemaInfo() .maximum(300) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java index ada38526598..b3babb2eee1 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java @@ -39,6 +39,7 @@ public static class MaxitemsValidation1 extends JsonSchema implements SchemaNull Do not edit the class manually. */ private static MaxitemsValidation1 instance; + protected MaxitemsValidation1() { super(new JsonSchemaInfo() .maxItems(2) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java index cac5560e7cd..07d36a83436 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java @@ -39,6 +39,7 @@ public static class MaxlengthValidation1 extends JsonSchema implements SchemaNul Do not edit the class manually. */ private static MaxlengthValidation1 instance; + protected MaxlengthValidation1() { super(new JsonSchemaInfo() .maxLength(2) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java index 2ca7286f072..e37d7160de4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java @@ -39,6 +39,7 @@ public static class Maxproperties0MeansTheObjectIsEmpty1 extends JsonSchema impl Do not edit the class manually. */ private static Maxproperties0MeansTheObjectIsEmpty1 instance; + protected Maxproperties0MeansTheObjectIsEmpty1() { super(new JsonSchemaInfo() .maxProperties(0) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java index 96cb55987c3..82a58c49df7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java @@ -39,6 +39,7 @@ public static class MaxpropertiesValidation1 extends JsonSchema implements Schem Do not edit the class manually. */ private static MaxpropertiesValidation1 instance; + protected MaxpropertiesValidation1() { super(new JsonSchemaInfo() .maxProperties(2) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java index 0d03039b598..7259de1b10a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java @@ -39,6 +39,7 @@ public static class MinimumValidation1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static MinimumValidation1 instance; + protected MinimumValidation1() { super(new JsonSchemaInfo() .minimum(1.1) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java index 0ed434f0938..f6bf7b0bf27 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java @@ -39,6 +39,7 @@ public static class MinimumValidationWithSignedInteger1 extends JsonSchema imple Do not edit the class manually. */ private static MinimumValidationWithSignedInteger1 instance; + protected MinimumValidationWithSignedInteger1() { super(new JsonSchemaInfo() .minimum(-2) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java index e19ed72e24b..99bd779e0a8 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java @@ -39,6 +39,7 @@ public static class MinitemsValidation1 extends JsonSchema implements SchemaNull Do not edit the class manually. */ private static MinitemsValidation1 instance; + protected MinitemsValidation1() { super(new JsonSchemaInfo() .minItems(1) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java index 54447c9b445..c28426662d7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java @@ -39,6 +39,7 @@ public static class MinlengthValidation1 extends JsonSchema implements SchemaNul Do not edit the class manually. */ private static MinlengthValidation1 instance; + protected MinlengthValidation1() { super(new JsonSchemaInfo() .minLength(2) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java index 2b526918adf..e2f70199969 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java @@ -39,6 +39,7 @@ public static class MinpropertiesValidation1 extends JsonSchema implements Schem Do not edit the class manually. */ private static MinpropertiesValidation1 instance; + protected MinpropertiesValidation1() { super(new JsonSchemaInfo() .minProperties(1) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java index 750506e577e..e25610f3345 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java @@ -37,6 +37,7 @@ public static class Schema01 extends NullJsonSchema {} public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .allOf(List.of( @@ -257,6 +258,7 @@ public static class NestedAllofToCheckValidationSemantics1 extends JsonSchema im Do not edit the class manually. */ private static NestedAllofToCheckValidationSemantics1 instance; + protected NestedAllofToCheckValidationSemantics1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java index d6c742d288b..8066b90db5c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java @@ -37,6 +37,7 @@ public static class Schema01 extends NullJsonSchema {} public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .anyOf(List.of( @@ -257,6 +258,7 @@ public static class NestedAnyofToCheckValidationSemantics1 extends JsonSchema im Do not edit the class manually. */ private static NestedAnyofToCheckValidationSemantics1 instance; + protected NestedAnyofToCheckValidationSemantics1() { super(new JsonSchemaInfo() .anyOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java index f6224b9d88b..ff08e5fbdd9 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java @@ -42,9 +42,10 @@ public static class ItemsListInput { public static class Items2 extends JsonSchema implements SchemaListValidator { private static Items2 instance; + protected Items2() { super(new JsonSchemaInfo() - .type(Set.of(FrozenList.class)) + .type(Set.of(FrozenList.class)) .items(Items3.class) ); } @@ -124,9 +125,10 @@ public static class ItemsListInput1 { public static class Items1 extends JsonSchema implements SchemaListValidator, FrozenList, ItemsList1> { private static Items1 instance; + protected Items1() { super(new JsonSchemaInfo() - .type(Set.of(FrozenList.class)) + .type(Set.of(FrozenList.class)) .items(Items2.class) ); } @@ -206,9 +208,10 @@ public static class ItemsListInput2 { public static class Items extends JsonSchema implements SchemaListValidator>, FrozenList>, ItemsList2> { private static Items instance; + protected Items() { super(new JsonSchemaInfo() - .type(Set.of(FrozenList.class)) + .type(Set.of(FrozenList.class)) .items(Items1.class) ); } @@ -294,9 +297,10 @@ public static class NestedItems1 extends JsonSchema implements SchemaListValidat Do not edit the class manually. */ private static NestedItems1 instance; + protected NestedItems1() { super(new JsonSchemaInfo() - .type(Set.of(FrozenList.class)) + .type(Set.of(FrozenList.class)) .items(Items.class) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java index 7333c6abc19..26564b408b8 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java @@ -37,6 +37,7 @@ public static class Schema01 extends NullJsonSchema {} public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .oneOf(List.of( @@ -257,6 +258,7 @@ public static class NestedOneofToCheckValidationSemantics1 extends JsonSchema im Do not edit the class manually. */ private static NestedOneofToCheckValidationSemantics1 instance; + protected NestedOneofToCheckValidationSemantics1() { super(new JsonSchemaInfo() .oneOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java index c1cc2b77d26..61535a8c189 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java @@ -43,6 +43,7 @@ public static class Not1 extends JsonSchema implements SchemaNullValidator, Sche Do not edit the class manually. */ private static Not1 instance; + protected Not1() { super(new JsonSchemaInfo() .not(Not2.class) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java index d00f4a4cd39..61bf1402403 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java @@ -67,6 +67,7 @@ public static class NotMapInput { public static class Not extends JsonSchema implements SchemaMapValidator { private static Not instance; + protected Not() { super(new JsonSchemaInfo() .type(Set.of(FrozenMap.class)) @@ -144,6 +145,7 @@ public static class NotMoreComplexSchema1 extends JsonSchema implements SchemaNu Do not edit the class manually. */ private static NotMoreComplexSchema1 instance; + protected NotMoreComplexSchema1() { super(new JsonSchemaInfo() .not(Not.class) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java index 5c50d51e4f5..46d3bee3330 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java @@ -84,6 +84,7 @@ public static class ObjectPropertiesValidation1 extends JsonSchema implements Sc Do not edit the class manually. */ private static ObjectPropertiesValidation1 instance; + protected ObjectPropertiesValidation1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java index 33750a46b83..1c60d9b2a6d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java @@ -37,6 +37,7 @@ public static class Schema0 extends IntJsonSchema {} public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .minimum(2) @@ -255,6 +256,7 @@ public static class Oneof1 extends JsonSchema implements SchemaNullValidator, Sc Do not edit the class manually. */ private static Oneof1 instance; + protected Oneof1() { super(new JsonSchemaInfo() .oneOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java index 682e9c693d5..43aa52e17ac 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java @@ -66,6 +66,7 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -324,6 +325,7 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( @@ -558,6 +560,7 @@ public static class OneofComplexTypes1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static OneofComplexTypes1 instance; + protected OneofComplexTypes1() { super(new JsonSchemaInfo() .oneOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java index 3b9b6c6ec55..46d953fe9be 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java @@ -33,6 +33,7 @@ public class OneofWithBaseSchema { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .minLength(2) @@ -245,6 +246,7 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .maxLength(4) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java index 3dead283e8d..5a795c7d964 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java @@ -47,6 +47,7 @@ public static class OneofWithEmptySchema1 extends JsonSchema implements SchemaNu Do not edit the class manually. */ private static OneofWithEmptySchema1 instance; + protected OneofWithEmptySchema1() { super(new JsonSchemaInfo() .oneOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java index cfbe15338aa..6198f23c713 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java @@ -65,6 +65,7 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema0 instance; + protected Schema0() { super(new JsonSchemaInfo() .required(Set.of( @@ -323,6 +324,7 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator { private static Schema1 instance; + protected Schema1() { super(new JsonSchemaInfo() .required(Set.of( @@ -555,6 +557,7 @@ public static class OneofWithRequired1 extends JsonSchema implements SchemaMapVa Do not edit the class manually. */ private static OneofWithRequired1 instance; + protected OneofWithRequired1() { super(new JsonSchemaInfo() .type(Set.of(FrozenMap.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java index 0f62f471e83..7f50ecd8c69 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java @@ -40,6 +40,7 @@ public static class PatternIsNotAnchored1 extends JsonSchema implements SchemaNu Do not edit the class manually. */ private static PatternIsNotAnchored1 instance; + protected PatternIsNotAnchored1() { super(new JsonSchemaInfo() .pattern(Pattern.compile( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java index bd2d026a841..10629cdf327 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java @@ -40,6 +40,7 @@ public static class PatternValidation1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static PatternValidation1 instance; + protected PatternValidation1() { super(new JsonSchemaInfo() .pattern(Pattern.compile( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java index ec5fed465c7..85186739a97 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java @@ -87,6 +87,7 @@ public static class PropertiesWithEscapedCharacters1 extends JsonSchema implemen Do not edit the class manually. */ private static PropertiesWithEscapedCharacters1 instance; + protected PropertiesWithEscapedCharacters1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java index 993d7b9f8d3..6cfc7fffbe2 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java @@ -67,6 +67,7 @@ public static class PropertyNamedRefThatIsNotAReference1 extends JsonSchema impl Do not edit the class manually. */ private static PropertyNamedRefThatIsNotAReference1 instance; + protected PropertyNamedRefThatIsNotAReference1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java index 6fd969d8090..863e8fabab7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalproperties.java @@ -51,6 +51,7 @@ public static class RefInAdditionalproperties1 extends JsonSchema implements Sch Do not edit the class manually. */ private static RefInAdditionalproperties1 instance; + protected RefInAdditionalproperties1() { super(new JsonSchemaInfo() .type(Set.of(FrozenMap.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java index c23a0703622..d20543fbabd 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAllof.java @@ -39,6 +39,7 @@ public static class RefInAllof1 extends JsonSchema implements SchemaNullValidato Do not edit the class manually. */ private static RefInAllof1 instance; + protected RefInAllof1() { super(new JsonSchemaInfo() .allOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java index c25e29a58da..c5fbef39a3b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInAnyof.java @@ -39,6 +39,7 @@ public static class RefInAnyof1 extends JsonSchema implements SchemaNullValidato Do not edit the class manually. */ private static RefInAnyof1 instance; + protected RefInAnyof1() { super(new JsonSchemaInfo() .anyOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java index 1fd8298deb3..8a3366eda4d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInItems.java @@ -44,9 +44,10 @@ public static class RefInItems1 extends JsonSchema implements SchemaListValidato Do not edit the class manually. */ private static RefInItems1 instance; + protected RefInItems1() { super(new JsonSchemaInfo() - .type(Set.of(FrozenList.class)) + .type(Set.of(FrozenList.class)) .items(PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java index df4b1e77f71..ce6a8fdd2c4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInNot.java @@ -39,6 +39,7 @@ public static class RefInNot1 extends JsonSchema implements SchemaNullValidator, Do not edit the class manually. */ private static RefInNot1 instance; + protected RefInNot1() { super(new JsonSchemaInfo() .not(PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java index 7800673866a..c6b9888b901 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInOneof.java @@ -39,6 +39,7 @@ public static class RefInOneof1 extends JsonSchema implements SchemaNullValidato Do not edit the class manually. */ private static RefInOneof1 instance; + protected RefInOneof1() { super(new JsonSchemaInfo() .oneOf(List.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java index e7bd54ae240..6aceb7ddd75 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RefInProperty.java @@ -69,6 +69,7 @@ public static class RefInProperty1 extends JsonSchema implements SchemaNullValid Do not edit the class manually. */ private static RefInProperty1 instance; + protected RefInProperty1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java index 79b0d2ff0f8..e483d88e024 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java @@ -73,6 +73,7 @@ public static class RequiredDefaultValidation1 extends JsonSchema implements Sch Do not edit the class manually. */ private static RequiredDefaultValidation1 instance; + protected RequiredDefaultValidation1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java index 6c951877abd..cf5424ef96c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java @@ -82,6 +82,7 @@ public static class RequiredValidation1 extends JsonSchema implements SchemaNull Do not edit the class manually. */ private static RequiredValidation1 instance; + protected RequiredValidation1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java index 11a51bf221e..350c1934805 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java @@ -73,6 +73,7 @@ public static class RequiredWithEmptyArray1 extends JsonSchema implements Schema Do not edit the class manually. */ private static RequiredWithEmptyArray1 instance; + protected RequiredWithEmptyArray1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java index 1f7329f0324..1916242106b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java @@ -67,6 +67,7 @@ public static class RequiredWithEscapedCharacters1 extends JsonSchema implements Do not edit the class manually. */ private static RequiredWithEscapedCharacters1 instance; + protected RequiredWithEscapedCharacters1() { super(new JsonSchemaInfo() .required(Set.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java index e7990e983d9..204927ca40f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java @@ -30,6 +30,7 @@ public static class SimpleEnumValidation1 extends JsonSchema implements SchemaNu Do not edit the class manually. */ private static SimpleEnumValidation1 instance; + protected SimpleEnumValidation1() { super(new JsonSchemaInfo() .type(Set.of( diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java index fbca8c83ebe..dba654997e5 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java @@ -26,6 +26,7 @@ public class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing { public static class Alpha extends JsonSchema implements SchemaNumberValidator { private static Alpha instance; + protected Alpha() { super(new JsonSchemaInfo() .type(Set.of( @@ -127,6 +128,7 @@ public static class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing1 ex Do not edit the class manually. */ private static TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing1 instance; + protected TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing1() { super(new JsonSchemaInfo() .type(Set.of(FrozenMap.class)) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java index 191afe8560d..3f6c75ec9f3 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java @@ -39,6 +39,7 @@ public static class UniqueitemsFalseValidation1 extends JsonSchema implements Sc Do not edit the class manually. */ private static UniqueitemsFalseValidation1 instance; + protected UniqueitemsFalseValidation1() { super(new JsonSchemaInfo() .uniqueItems(false) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java index 05f26c8e057..06704398b3c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java @@ -39,6 +39,7 @@ public static class UniqueitemsValidation1 extends JsonSchema implements SchemaN Do not edit the class manually. */ private static UniqueitemsValidation1 instance; + protected UniqueitemsValidation1() { super(new JsonSchemaInfo() .uniqueItems(true) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java index 3b81b61695f..0866518b7b0 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java @@ -39,6 +39,7 @@ public static class UriFormat1 extends JsonSchema implements SchemaNullValidator Do not edit the class manually. */ private static UriFormat1 instance; + protected UriFormat1() { super(new JsonSchemaInfo() .format("uri") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java index ec712b56576..46a37ee4099 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java @@ -39,6 +39,7 @@ public static class UriReferenceFormat1 extends JsonSchema implements SchemaNull Do not edit the class manually. */ private static UriReferenceFormat1 instance; + protected UriReferenceFormat1() { super(new JsonSchemaInfo() .format("uri-reference") diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java index ac0b8d695ea..0b205be9d47 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java @@ -39,6 +39,7 @@ public static class UriTemplateFormat1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static UriTemplateFormat1 instance; + protected UriTemplateFormat1() { super(new JsonSchemaInfo() .format("uri-template") diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs index d27db67b007..159be7b7de6 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_anytypeOrMultitype.hbs @@ -18,88 +18,83 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc */ {{/if}} private static {{jsonPathPiece.camelCase}} instance; - {{#each keywords}} - {{#if @first}} + protected {{../jsonPathPiece.camelCase}}() { super(new JsonSchemaInfo() - {{/if}} - {{#eq this "type"}} + {{#if types}} {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{/eq}} - {{#eq this "format"}} + {{/if}} + {{#if format}} {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} - {{/eq}} - {{#eq this "items"}} + {{/if}} + {{#if items}} {{> src/main/java/packagename/components/schemas/SchemaClass/_items }} - {{/eq}} - {{#eq this "properties"}} + {{/if}} + {{#if properties}} {{> src/main/java/packagename/components/schemas/SchemaClass/_properties }} - {{/eq}} - {{#eq this "required"}} + {{/if}} + {{#if requiredProperties}} {{> src/main/java/packagename/components/schemas/SchemaClass/_required }} - {{/eq}} - {{#eq this "exclusiveMaximum"}} + {{/if}} + {{#neq exclusiveMaximum null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum }} - {{/eq}} - {{#eq this "exclusiveMinimum"}} + {{/neq}} + {{#neq exclusiveMinimum null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum }} - {{/eq}} - {{#eq this "maxItems"}} + {{/neq}} + {{#neq maximum null}} + {{> src/main/java/packagename/components/schemas/SchemaClass/_maximum }} + {{/neq}} + {{#neq minimum null}} + {{> src/main/java/packagename/components/schemas/SchemaClass/_minimum }} + {{/neq}} + {{#neq multipleOf null}} + {{> src/main/java/packagename/components/schemas/SchemaClass/_multipleOf }} + {{/neq}} + {{#neq maxItems null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxItems }} - {{/eq}} - {{#eq this "minItems"}} + {{/neq}} + {{#neq minItems null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_minItems }} - {{/eq}} - {{#eq this "maxLength"}} + {{/neq}} + {{#neq maxLength null }} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxLength }} - {{/eq}} - {{#eq this "minLength"}} + {{/neq}} + {{#neq minLength null }} {{> src/main/java/packagename/components/schemas/SchemaClass/_minLength }} - {{/eq}} - {{#eq this "maxProperties"}} + {{/neq}} + {{#neq maxProperties null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxProperties }} - {{/eq}} - {{#eq this "minProperties"}} + {{/neq}} + {{#neq minProperties null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_minProperties }} - {{/eq}} - {{#eq this "maximum"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_maximum }} - {{/eq}} - {{#eq this "minimum"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_minimum }} - {{/eq}} - {{#eq this "multipleOf"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_multipleOf }} - {{/eq}} - {{#eq this "additionalProperties"}} + {{/neq}} + {{#if additionalProperties}} {{> src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties }} - {{/eq}} - {{#eq this "allOf"}} + {{/if}} + {{#if allOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{/eq}} - {{#eq this "anyOf"}} + {{/if}} + {{#if anyOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{/eq}} - {{#eq this "oneOf"}} + {{/if}} + {{#if oneOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{/eq}} - {{#eq this "not"}} + {{/if}} + {{#if not}} {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{/eq}} - {{#eq this "uniqueItems"}} + {{/if}} + {{#neq uniqueItems null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems }} - {{/eq}} - {{#eq this "enum"}} + {{/neq}} + {{#if enumInfo}} {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} - {{/eq}} - {{#eq this "pattern"}} + {{/if}} + {{#if patternInfo}} {{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} - {{/eq}} - {{#if @last}} + {{/if}} ); } - {{/if}} - {{/each}} public static {{jsonPathPiece.camelCase}} getInstance() { if (instance == null) { diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs index 5795c97c75a..325e495fccf 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_boolean.hbs @@ -14,34 +14,29 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc */ {{/if}} private static {{jsonPathPiece.camelCase}} instance; - {{#each keywords}} - {{#if @first}} + protected {{../jsonPathPiece.camelCase}}() { super(new JsonSchemaInfo() - {{/if}} - {{#eq this "type"}} + {{#if types}} {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{/eq}} - {{#eq this "allOf"}} + {{/if}} + {{#if allOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{/eq}} - {{#eq this "anyOf"}} + {{/if}} + {{#if anyOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{/eq}} - {{#eq this "oneOf"}} + {{/if}} + {{#if oneOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{/eq}} - {{#eq this "not"}} + {{/if}} + {{#if not}} {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{/eq}} - {{#eq this "enum"}} + {{/if}} + {{#if enumInfo}} {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} - {{/eq}} - {{#if @last}} + {{/if}} ); } - {{/if}} - {{/each}} public static {{jsonPathPiece.camelCase}} getInstance() { if (instance == null) { diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs index 55273eff25d..cecb950a832 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_list.hbs @@ -14,43 +14,38 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc */ {{/if}} private static {{jsonPathPiece.camelCase}} instance; - {{#each keywords}} - {{#if @first}} + protected {{../jsonPathPiece.camelCase}}() { super(new JsonSchemaInfo() + {{#if types}} + {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} {{/if}} - {{#eq this "type"}} - {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{/eq}} - {{#eq this "items"}} + {{#if items}} {{> src/main/java/packagename/components/schemas/SchemaClass/_items }} - {{/eq}} - {{#eq this "maxItems"}} + {{/if}} + {{#neq maxItems null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxItems }} - {{/eq}} - {{#eq this "minItems"}} + {{/neq}} + {{#neq minItems null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_minItems }} - {{/eq}} - {{#eq this "allOf"}} + {{/neq}} + {{#if allOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{/eq}} - {{#eq this "anyOf"}} + {{/if}} + {{#if anyOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{/eq}} - {{#eq this "oneOf"}} + {{/if}} + {{#if oneOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{/eq}} - {{#eq this "not"}} + {{/if}} + {{#if not}} {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{/eq}} - {{#eq this "uniqueItems"}} + {{/if}} + {{#neq uniqueItems null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems }} - {{/eq}} - {{#if @last}} + {{/neq}} ); } - {{/if}} - {{/each}} public static {{jsonPathPiece.camelCase}} getInstance() { if (instance == null) { diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs index 8cbd757a42f..c4d7c9fdf23 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_map.hbs @@ -14,46 +14,41 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc */ {{/if}} private static {{jsonPathPiece.camelCase}} instance; - {{#each keywords}} - {{#if @first}} + protected {{../jsonPathPiece.camelCase}}() { super(new JsonSchemaInfo() - {{/if}} - {{#eq this "type"}} + {{#if types}} {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{/eq}} - {{#eq this "properties"}} + {{/if}} + {{#if properties}} {{> src/main/java/packagename/components/schemas/SchemaClass/_properties }} - {{/eq}} - {{#eq this "required"}} + {{/if}} + {{#if requiredProperties}} {{> src/main/java/packagename/components/schemas/SchemaClass/_required }} - {{/eq}} - {{#eq this "maxProperties"}} + {{/if}} + {{#neq maxProperties null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxProperties }} - {{/eq}} - {{#eq this "minProperties"}} + {{/neq}} + {{#neq minProperties null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_minProperties }} - {{/eq}} - {{#eq this "additionalProperties"}} + {{/neq}} + {{#if additionalProperties}} {{> src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties }} - {{/eq}} - {{#eq this "allOf"}} + {{/if}} + {{#if allOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{/eq}} - {{#eq this "anyOf"}} + {{/if}} + {{#if anyOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{/eq}} - {{#eq this "oneOf"}} + {{/if}} + {{#if oneOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{/eq}} - {{#eq this "not"}} + {{/if}} + {{#if not}} {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{/eq}} - {{#if @last}} + {{/if}} ); } - {{/if}} - {{/each}} public static {{jsonPathPiece.camelCase}} getInstance() { if (instance == null) { diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs index a0a95cd4d11..603168dc9d8 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_null.hbs @@ -14,34 +14,29 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc */ {{/if}} private static {{jsonPathPiece.camelCase}} instance; - {{#each keywords}} - {{#if @first}} + protected {{../jsonPathPiece.camelCase}}() { super(new JsonSchemaInfo() - {{/if}} - {{#eq this "type"}} + {{#if types}} {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{/eq}} - {{#eq this "allOf"}} + {{/if}} + {{#if allOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{/eq}} - {{#eq this "anyOf"}} + {{/if}} + {{#if anyOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{/eq}} - {{#eq this "oneOf"}} + {{/if}} + {{#if oneOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{/eq}} - {{#eq this "not"}} + {{/if}} + {{#if not}} {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{/eq}} - {{#eq this "enum"}} + {{/if}} + {{#if enumInfo}} {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} - {{/eq}} - {{#if @last}} + {{/if}} ); } - {{/if}} - {{/each}} public static {{jsonPathPiece.camelCase}} getInstance() { if (instance == null) { diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs index 57845c63d7f..1b67224a690 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_number.hbs @@ -14,52 +14,47 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc */ {{/if}} private static {{jsonPathPiece.camelCase}} instance; - {{#each keywords}} - {{#if @first}} + protected {{../jsonPathPiece.camelCase}}() { super(new JsonSchemaInfo() - {{/if}} - {{#eq this "type"}} + {{#if types}} {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{/eq}} - {{#eq this "format"}} + {{/if}} + {{#if format}} {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} - {{/eq}} - {{#eq this "exclusiveMaximum"}} + {{/if}} + {{#neq exclusiveMaximum null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum }} - {{/eq}} - {{#eq this "exclusiveMinimum"}} + {{/neq}} + {{#neq exclusiveMinimum null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum }} - {{/eq}} - {{#eq this "maximum"}} + {{/neq}} + {{#neq maximum null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_maximum }} - {{/eq}} - {{#eq this "minimum"}} + {{/neq}} + {{#neq minimum null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_minimum }} - {{/eq}} - {{#eq this "multipleOf"}} + {{/neq}} + {{#neq multipleOf null}} {{> src/main/java/packagename/components/schemas/SchemaClass/_multipleOf }} - {{/eq}} - {{#eq this "allOf"}} + {{/neq}} + {{#if allOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{/eq}} - {{#eq this "anyOf"}} + {{/if}} + {{#if anyOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{/eq}} - {{#eq this "oneOf"}} + {{/if}} + {{#if oneOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{/eq}} - {{#eq this "not"}} + {{/if}} + {{#if not}} {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{/eq}} - {{#eq this "enum"}} + {{/if}} + {{#if enumInfo}} {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} - {{/eq}} - {{#if @last}} + {{/if}} ); } - {{/if}} - {{/each}} public static {{jsonPathPiece.camelCase}} getInstance() { if (instance == null) { diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs index c827a087262..465dce06210 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_Schema_string.hbs @@ -14,47 +14,41 @@ public static class {{jsonPathPiece.camelCase}} extends JsonSchema implements Sc */ {{/if}} private static {{jsonPathPiece.camelCase}} instance; - {{#each keywords}} - {{#if @first}} protected {{../jsonPathPiece.camelCase}}() { super(new JsonSchemaInfo() - {{/if}} - {{#eq this "type"}} + {{#if types}} {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{/eq}} - {{#eq this "format"}} + {{/if}} + {{#if format}} {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} - {{/eq}} - {{#eq this "maxLength"}} + {{/if}} + {{#neq maxLength null }} {{> src/main/java/packagename/components/schemas/SchemaClass/_maxLength }} - {{/eq}} - {{#eq this "minLength"}} + {{/neq}} + {{#neq minLength null }} {{> src/main/java/packagename/components/schemas/SchemaClass/_minLength }} - {{/eq}} - {{#eq this "allOf"}} + {{/neq}} + {{#if allOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{/eq}} - {{#eq this "anyOf"}} + {{/if}} + {{#if anyOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{/eq}} - {{#eq this "oneOf"}} + {{/if}} + {{#if oneOf}} {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{/eq}} - {{#eq this "not"}} + {{/if}} + {{#if not}} {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{/eq}} - {{#eq this "enum"}} + {{/if}} + {{#if enumInfo}} {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} - {{/eq}} - {{#eq this "pattern"}} + {{/if}} + {{#if patternInfo}} {{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} - {{/eq}} - {{#if @last}} + {{/if}} ); } - {{/if}} - {{/each}} public static {{jsonPathPiece.camelCase}} getInstance() { if (instance == null) { From 9d5c5ab6eab40deed905b71a53205212a2efb945 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 09:54:05 -0800 Subject: [PATCH 06/12] Schema docs updated to not use keywords --- ...pertiesAllowsASchemaWhichShouldValidate.md | 4 +- ...AdditionalpropertiesAreAllowedByDefault.md | 2 +- .../AdditionalpropertiesCanExistByItself.md | 3 +- ...nalpropertiesShouldNotLookInApplicators.md | 5 +- .../java/docs/components/schemas/Allof.md | 8 +- .../schemas/AllofCombinedWithAnyofOneof.md | 10 +- .../components/schemas/AllofSimpleTypes.md | 6 +- .../components/schemas/AllofWithBaseSchema.md | 10 +- .../schemas/AllofWithOneEmptySchema.md | 2 +- .../schemas/AllofWithTheFirstEmptySchema.md | 2 +- .../schemas/AllofWithTheLastEmptySchema.md | 2 +- .../schemas/AllofWithTwoEmptySchemas.md | 2 +- .../java/docs/components/schemas/Anyof.md | 4 +- .../components/schemas/AnyofComplexTypes.md | 8 +- .../components/schemas/AnyofWithBaseSchema.md | 7 +- .../schemas/AnyofWithOneEmptySchema.md | 2 +- .../schemas/ArrayTypeMatchesArrays.md | 3 +- .../java/docs/components/schemas/ByInt.md | 2 +- .../java/docs/components/schemas/ByNumber.md | 2 +- .../docs/components/schemas/BySmallNumber.md | 2 +- .../docs/components/schemas/DateTimeFormat.md | 2 +- .../docs/components/schemas/EmailFormat.md | 2 +- .../schemas/EnumWith0DoesNotMatchFalse.md | 3 +- .../schemas/EnumWith1DoesNotMatchTrue.md | 3 +- .../schemas/EnumWithEscapedCharacters.md | 3 +- .../schemas/EnumWithFalseDoesNotMatch0.md | 3 +- .../schemas/EnumWithTrueDoesNotMatch1.md | 3 +- .../components/schemas/EnumsInProperties.md | 10 +- .../components/schemas/ForbiddenProperty.md | 2 +- .../docs/components/schemas/HostnameFormat.md | 2 +- ...ShouldNotRaiseErrorWhenFloatDivisionInf.md | 3 +- .../schemas/InvalidStringValueForDefault.md | 5 +- .../docs/components/schemas/Ipv4Format.md | 2 +- .../docs/components/schemas/Ipv6Format.md | 2 +- .../components/schemas/JsonPointerFormat.md | 2 +- .../components/schemas/MaximumValidation.md | 2 +- .../MaximumValidationWithUnsignedInteger.md | 2 +- .../components/schemas/MaxitemsValidation.md | 2 +- .../components/schemas/MaxlengthValidation.md | 2 +- .../Maxproperties0MeansTheObjectIsEmpty.md | 2 +- .../schemas/MaxpropertiesValidation.md | 2 +- .../components/schemas/MinimumValidation.md | 2 +- .../MinimumValidationWithSignedInteger.md | 2 +- .../components/schemas/MinitemsValidation.md | 2 +- .../components/schemas/MinlengthValidation.md | 2 +- .../schemas/MinpropertiesValidation.md | 2 +- .../NestedAllofToCheckValidationSemantics.md | 4 +- .../NestedAnyofToCheckValidationSemantics.md | 4 +- .../docs/components/schemas/NestedItems.md | 12 +- .../NestedOneofToCheckValidationSemantics.md | 4 +- .../java/docs/components/schemas/Not.md | 2 +- .../schemas/NotMoreComplexSchema.md | 5 +- .../schemas/NulCharactersInStrings.md | 3 +- .../schemas/ObjectPropertiesValidation.md | 2 +- .../java/docs/components/schemas/Oneof.md | 4 +- .../components/schemas/OneofComplexTypes.md | 8 +- .../components/schemas/OneofWithBaseSchema.md | 7 +- .../schemas/OneofWithEmptySchema.md | 2 +- .../components/schemas/OneofWithRequired.md | 7 +- .../schemas/PatternIsNotAnchored.md | 2 +- .../components/schemas/PatternValidation.md | 2 +- .../PropertiesWithEscapedCharacters.md | 2 +- .../PropertyNamedRefThatIsNotAReference.md | 2 +- .../schemas/RefInAdditionalproperties.md | 3 +- .../docs/components/schemas/RefInAllof.md | 2 +- .../docs/components/schemas/RefInAnyof.md | 2 +- .../docs/components/schemas/RefInItems.md | 3 +- .../java/docs/components/schemas/RefInNot.md | 2 +- .../docs/components/schemas/RefInOneof.md | 2 +- .../docs/components/schemas/RefInProperty.md | 2 +- .../schemas/RequiredDefaultValidation.md | 2 +- .../components/schemas/RequiredValidation.md | 3 +- .../schemas/RequiredWithEmptyArray.md | 2 +- .../schemas/RequiredWithEscapedCharacters.md | 2 +- .../schemas/SimpleEnumValidation.md | 3 +- ...DoesNotDoAnythingIfThePropertyIsMissing.md | 6 +- .../schemas/UniqueitemsFalseValidation.md | 2 +- .../schemas/UniqueitemsValidation.md | 2 +- .../java/docs/components/schemas/UriFormat.md | 2 +- .../components/schemas/UriReferenceFormat.md | 2 +- .../components/schemas/UriTemplateFormat.md | 2 +- .../schemas/docschema_fields_field.hbs | 152 +++++++++--------- 82 files changed, 229 insertions(+), 194 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md index 9470bdcb9db..cbe90588bb0 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md @@ -52,7 +52,9 @@ AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsA ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
)); | +| Set> |     Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md index b8a62202d19..aee08c84d47 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md index 7df2aa9f254..78fe3095fc9 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md @@ -50,7 +50,8 @@ AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap val ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
)); | +| Set> |     Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md index 0cbe982edc8..771dcf155a2 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.md @@ -30,7 +30,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    additionalProperties = [AdditionalProperties.class](#additionalproperties)
    allOf = List.of(
        [Schema0.class](#schema0)
    )
)); | +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -77,7 +78,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md index 8248213de9d..f3fd5969d50 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Allof.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -55,7 +55,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| +| Set |     required = Set.of(
        "foo"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +115,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| +| Set |     required = Set.of(
        "bar"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md index 99681a23eae..3e9598dff0d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md @@ -26,7 +26,9 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema02.class](#schema02)
    )
    anyOf = List.of(
        [Schema01.class](#schema01)
    )
    oneOf = List.of(
        [Schema0.class](#schema0)
    ))
)); | +| List> |     allOf = List.of(
        [Schema02.class](#schema02)
    )
| +| List> |     anyOf = List.of(
        [Schema01.class](#schema01)
    )
| +| List> |     oneOf = List.of(
        [Schema0.class](#schema0)
    ))
| ### Method Summary | Modifier and Type | Method and Description | @@ -50,7 +52,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 5
)); | +| BigDecimal |     multipleOf = 5
| ### Method Summary | Modifier and Type | Method and Description | @@ -74,7 +76,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 3
)); | +| BigDecimal |     multipleOf = 3
| ### Method Summary | Modifier and Type | Method and Description | @@ -98,7 +100,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 2
)); | +| BigDecimal |     multipleOf = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md index 6376c0132c6..c369ee6251d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofSimpleTypes.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 20
)); | +| Number |     minimum = 20
| ### Method Summary | Modifier and Type | Method and Description | @@ -73,7 +73,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maximum = 30
)); | +| Number |     maximum = 30
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md index 8cc73dcbc3e..4f5ca1116cd 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md @@ -34,7 +34,9 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| +| Set |     required = Set.of(
        "bar"
    )
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -93,7 +95,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("baz", [Baz.class](#baz)))
    )
    required = Set.of(
        "baz"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("baz", [Baz.class](#baz)))
    )
| +| Set |     required = Set.of(
        "baz"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -152,7 +155,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| +| Set |     required = Set.of(
        "foo"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md index 5cd9535fef7..631afad70fd 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0)
    )
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md index 2ee6086f52d..3ea53f74a00 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md index eb75cd602ba..2045ac2945e 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md index 6eb5c2ad7ab..b9ea3dba440 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md index aeb487f0e8e..35c947449eb 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Anyof.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 2
)); | +| Number |     minimum = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md index a584c5ea7e9..01a619c4022 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofComplexTypes.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -55,7 +55,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| +| Set |     required = Set.of(
        "foo"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +115,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| +| Set |     required = Set.of(
        "bar"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md index bfed586284d..6a35a025474 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md @@ -47,7 +47,8 @@ String validatedPayload = AnyofWithBaseSchema.AnyofWithBaseSchema1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| List> |     anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -63,7 +64,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minLength = 4
)); | +| Integer |     minLength = 4
| ### Method Summary | Modifier and Type | Method and Description | @@ -87,7 +88,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxLength = 2
)); | +| Integer |     maxLength = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md index 7b47b01a417..ac63ecebb09 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
)); | +| List> |     anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md index e441b5534b0..d8c61f85e8f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md @@ -50,7 +50,8 @@ ArrayTypeMatchesArrays.ArrayTypeMatchesArraysList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items.class](#items)
)); | +| Set> |     Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md index 688b5a59fef..ae4ddcec7b4 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 2
)); | +| BigDecimal |     multipleOf = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md index a679d3098a3..53f71e63fed 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 1.5
)); | +| BigDecimal |     multipleOf = 1.5
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md index cd1da0ee032..83b9f5096fe 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    multipleOf = 0.00010
)); | +| BigDecimal |     multipleOf = 0.00010
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md index 95ad606d332..dfcceb0ca6d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/DateTimeFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "date-time";
)); | +| String |     type = "date-time";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md index 44f2590fc0c..32fdc90a614 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EmailFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "email";
)); | +| String |     type = "email";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md index 130337b0842..f61b10a9647 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md @@ -45,7 +45,8 @@ int validatedPayload = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.va ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    enumValues = SetMaker.makeSet(
        0)
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        0)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md index 4078868d513..a1cace142a2 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md @@ -45,7 +45,8 @@ int validatedPayload = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.vali ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    enumValues = SetMaker.makeSet(
        1)
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md index f85b05fc6ec..c0401800d0c 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md @@ -45,7 +45,8 @@ String validatedPayload = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.v ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "foo\nbar",
        "foo\rbar"
)
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "foo\nbar",
        "foo\rbar"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md index 23f06191b89..a7196f69bb7 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md @@ -45,7 +45,8 @@ boolean validatedPayload = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch0 ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    enumValues = SetMaker.makeSet(
        false)
)); | +| Set> |     Set.of(Boolean.class)
| +| Set |     enumValues = SetMaker.makeSet(
        false)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md index 125bdb0eab8..112f885c50f 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md @@ -45,7 +45,8 @@ boolean validatedPayload = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11. ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(Boolean.class)
    enumValues = SetMaker.makeSet(
        true)
)); | +| Set> |     Set.of(Boolean.class)
| +| Set |     enumValues = SetMaker.makeSet(
        true)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md index 587a83f7b0f..166ac749cd4 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md @@ -59,7 +59,9 @@ EnumsInProperties.EnumsInPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | +| Set> |     Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| +| Set |     required = Set.of(
        "bar"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -124,7 +126,8 @@ String validatedPayload = EnumsInProperties.Bar.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "bar"
)
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "bar"
)
| ### Method Summary | Modifier and Type | Method and Description | @@ -162,7 +165,8 @@ String validatedPayload = EnumsInProperties.Foo.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "foo"
)
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "foo"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md index 8dc9c628d0d..cf51444902a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ForbiddenProperty.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md index 5ed4d192c2e..9b0c4330591 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/HostnameFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "hostname";
)); | +| String |     type = "hostname";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md index dab688a316f..971dcf5cde1 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md @@ -45,7 +45,8 @@ long validatedPayload = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.I ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    multipleOf = 0.123456789
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| BigDecimal |     multipleOf = 0.123456789
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md index 962a34a5195..82d432b975b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidStringValueForDefault.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -97,7 +97,8 @@ String validatedPayload = InvalidStringValueForDefault.Bar.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    minLength = 4
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 4
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md index 26ae3fb2961..2d5230e8ede 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv4Format.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "ipv4";
)); | +| String |     type = "ipv4";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md index c3bdacc2c16..5718fd0c337 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Ipv6Format.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "ipv6";
)); | +| String |     type = "ipv6";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md index 5a6563174e7..011d72097bc 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/JsonPointerFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "json-pointer";
)); | +| String |     type = "json-pointer";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md index 65b7306347b..3a64cd43215 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maximum = 3.0
)); | +| Number |     maximum = 3.0
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md index 8c16770f4d8..c34988b75ed 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maximum = 300
)); | +| Number |     maximum = 300
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md index 0ec2570415a..b60cf471d68 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxitemsValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxItems = 2
)); | +| Integer |     maxItems = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md index c8a76c147f1..f04b5ade63a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxlengthValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxLength = 2
)); | +| Integer |     maxLength = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md index 2de82aa050d..583ae3dac3b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxProperties = 0
)); | +| Integer |     maxProperties = 0
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md index 2700ac83d48..addaef400a2 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxProperties = 2
)); | +| Integer |     maxProperties = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md index 6462cb0e70f..6cabeb28194 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 1.1
)); | +| Number |     minimum = 1.1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md index 5789e5e2b8f..968699d2fef 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = -2
)); | +| Number |     minimum = -2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md index 94eb21c786e..1b231ad0d92 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinitemsValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minItems = 1
)); | +| Integer |     minItems = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md index e06ab6cd2d3..32cd5684701 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinlengthValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minLength = 2
)); | +| Integer |     minLength = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md index 363e417cb9e..19fa07abfbe 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/MinpropertiesValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minProperties = 1
)); | +| Integer |     minProperties = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md index 8a4f9bfd9cc..164caa527f8 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema0.class](#schema0)
    )
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [Schema01.class](#schema01)
    )
)); | +| List> |     allOf = List.of(
        [Schema01.class](#schema01)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md index bde8264263b..6ba65202a25 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema0.class](#schema0)
    )
)); | +| List> |     anyOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [Schema01.class](#schema01)
    )
)); | +| List> |     anyOf = List.of(
        [Schema01.class](#schema01)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md index 9b0a8668200..b24de72b917 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md @@ -66,7 +66,8 @@ NestedItems.NestedItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items.class](#items)
)); | +| Set> |     Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | @@ -133,7 +134,8 @@ NestedItems.ItemsList2 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items1.class](#items1)
)); | +| Set> |     Set.of(FrozenList.class)
| +| Class |     items = [Items1.class](#items1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -198,7 +200,8 @@ NestedItems.ItemsList1 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items2.class](#items2)
)); | +| Set> |     Set.of(FrozenList.class)
| +| Class |     items = [Items2.class](#items2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -261,7 +264,8 @@ NestedItems.ItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [Items3.class](#items3)
)); | +| Set> |     Set.of(FrozenList.class)
| +| Class |     items = [Items3.class](#items3)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md index d7f243f914d..5981969526b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0)
    ))
)); | +| List> |     oneOf = List.of(
        [Schema0.class](#schema0)
    ))
| ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema01.class](#schema01)
    ))
)); | +| List> |     oneOf = List.of(
        [Schema01.class](#schema01)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md index 89d61ee2154..2a2ae434290 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Not.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    not = [Not2.class](#not2)
)); | +| Class |     not = [Not2.class](#not2)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md index 4944f80f57a..7f8b6453838 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    not = [Not.class](#not)
)); | +| Class |     not = [Not.class](#not)
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ NotMoreComplexSchema.NotMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | +| Set> |     Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md index 44212837de2..148799027a1 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NulCharactersInStrings.md @@ -45,7 +45,8 @@ String validatedPayload = NulCharactersInStrings.NulCharactersInStrings1.validat ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    enumValues = SetMaker.makeSet(
        "hello\0there"
)
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "hello\0there"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md index 44928133996..35aef63c36a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md index 90af22a39ad..5e2d46d274b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/Oneof.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | +| List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | @@ -49,7 +49,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minimum = 2
)); | +| Number |     minimum = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md index 7af65f6a8fb..c054597d115 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofComplexTypes.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | +| List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | @@ -55,7 +55,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
    required = Set.of(
        "foo"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| +| Set |     required = Set.of(
        "foo"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +115,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "bar"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| +| Set |     required = Set.of(
        "bar"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md index 47ad6ece5d5..2de82e0f36a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md @@ -47,7 +47,8 @@ String validatedPayload = OneofWithBaseSchema.OneofWithBaseSchema1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        String.class
    )
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | @@ -63,7 +64,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    maxLength = 4
)); | +| Integer |     maxLength = 4
| ### Method Summary | Modifier and Type | Method and Description | @@ -87,7 +88,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    minLength = 2
)); | +| Integer |     minLength = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md index bb4ded3e6c4..059a51a3e2b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | +| List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md index 2cceb0296e5..2f84b935880 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md @@ -29,7 +29,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
)); | +| Set> |     Set.of(FrozenMap.class)
| +| List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | @@ -45,7 +46,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    required = Set.of(
        "baz",
        "foo"
    )
)); | +| Set |     required = Set.of(
        "baz",
        "foo"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -96,7 +97,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    required = Set.of(
        "bar",
        "foo"
    )
)); | +| Set |     required = Set.of(
        "bar",
        "foo"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md index c8768ccf59d..474d49bee6c 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    pattern =
        "a+"
    )))
)); | +| Pattern |     pattern =
        "a+"
    )))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md index 7740be5e958..1335d68a702 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PatternValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    pattern =
        "^a*$"
    )))
)); | +| Pattern |     pattern =
        "^a*$"
    )))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md index e97cafa83fd..3f3747836de 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md @@ -31,7 +31,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo\nbar", [Foonbar.class](#foonbar))),
        new PropertyEntry("foo\"bar", [Foobar.class](#foobar))),
        new PropertyEntry("foo\\bar", [Foobar1.class](#foobar1))),
        new PropertyEntry("foo\rbar", [Foorbar.class](#foorbar))),
        new PropertyEntry("foo\tbar", [Footbar.class](#footbar))),
        new PropertyEntry("foo\fbar", [Foofbar.class](#foofbar)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo\nbar", [Foonbar.class](#foonbar))),
        new PropertyEntry("foo\"bar", [Foobar.class](#foobar))),
        new PropertyEntry("foo\\bar", [Foobar1.class](#foobar1))),
        new PropertyEntry("foo\rbar", [Foorbar.class](#foorbar))),
        new PropertyEntry("foo\tbar", [Footbar.class](#footbar))),
        new PropertyEntry("foo\fbar", [Foofbar.class](#foofbar)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md index 0810b83a961..b9c77d04ba6 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("$ref", [Ref.class](#ref)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("$ref", [Ref.class](#ref)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md index 4103bbce7ad..3cde2d5aecb 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md @@ -49,7 +49,8 @@ RefInAdditionalproperties.RefInAdditionalpropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    additionalProperties = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
)); | +| Set> |     Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md index 10de6f58c81..4e05025c196 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAllof.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    allOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )
)); | +| List> |     allOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md index 9e982728676..1f33150a15b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAnyof.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    anyOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )
)); | +| List> |     anyOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md index 7d0ce23d241..d8f9b4fee2a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md @@ -49,7 +49,8 @@ RefInItems.RefInItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenList.class)
    items = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
)); | +| Set> |     Set.of(FrozenList.class)
| +| Class |     items = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md index 58d9d6d763e..0425e9dae70 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInNot.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    not = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
)); | +| Class |     not = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md index 861efd8a7ab..1eee1f1e050 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInOneof.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    oneOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    ))
)); | +| List> |     oneOf = List.of(
        [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md index e859aba96cc..52c955f04e9 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInProperty.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("a", [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("a", [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md index c1224a737b0..e36f45add70 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md index 7a42c5ab79e..c6af00a6cfe 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredValidation.md @@ -27,7 +27,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
    required = Set.of(
        "foo"
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| +| Set |     required = Set.of(
        "foo"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md index 6cef992c745..e3f6e97f8f5 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md @@ -26,7 +26,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md index 51c701d6139..cac3bac680a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md @@ -25,7 +25,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    required = Set.of(
        "foo\tbar",
        "foo\nbar",
        "foo\fbar",
        "foo\rbar",
        "foo\"bar",
        "foo\\bar"
    )
)); | +| Set |     required = Set.of(
        "foo\tbar",
        "foo\nbar",
        "foo\fbar",
        "foo\rbar",
        "foo\"bar",
        "foo\\bar"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md index 047f4a1384f..4e45d9b5876 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/SimpleEnumValidation.md @@ -45,7 +45,8 @@ int validatedPayload = SimpleEnumValidation.SimpleEnumValidation1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    enumValues = SetMaker.makeSet(
        1,        2,        3)
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        1,        2,        3)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md index 5f8bfa99f99..bd364c73fb6 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md @@ -54,7 +54,8 @@ TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.TheDefaultKeywordDoesNo ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    Set.of(FrozenMap.class)
    properties = Map.ofEntries(
        new PropertyEntry("alpha", [Alpha.class](#alpha)))
    )
)); | +| Set> |     Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("alpha", [Alpha.class](#alpha)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -117,7 +118,8 @@ int validatedPayload = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing. ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
    maximum = 3
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Number |     maximum = 3
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md index 6b170ea5d4b..aff1f84881d 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    uniqueItems = false
)); | +| Boolean |     uniqueItems = false
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md index 156e4d55127..c555ad98480 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UniqueitemsValidation.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    uniqueItems = true
)); | +| Boolean |     uniqueItems = true
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md index 9d07a6f7f9b..db8d4e79a16 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "uri";
)); | +| String |     type = "uri";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md index 6d3f2888f0e..dfe45c57e09 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriReferenceFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "uri-reference";
)); | +| String |     type = "uri-reference";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md index 1ccdf229fc1..4b5e214d1e6 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/UriTemplateFormat.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    type = "uri-template";
)); | +| String |     type = "uri-template";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/docschema_fields_field.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/docschema_fields_field.hbs index 53a76224a1d..2ddddc932de 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/docschema_fields_field.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/docschema_fields_field.hbs @@ -1,80 +1,72 @@ -{{#each keywords}} - {{#if @first}} -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
- {{~/if}} - {{#eq this "type"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_types }} - {{~/eq}} - {{#eq this "format"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_format }} - {{~/eq}} - {{#eq this "items"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_items }} - {{~/eq}} - {{#eq this "properties"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_properties }} - {{~/eq}} - {{#eq this "required"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_required }} - {{~/eq}} - {{#eq this "exclusiveMaximum"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum }} - {{~/eq}} - {{#eq this "exclusiveMinimum"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum }} - {{~/eq}} - {{#eq this "maxItems"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_maxItems }} - {{~/eq}} - {{#eq this "minItems"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_minItems }} - {{~/eq}} - {{#eq this "maxLength"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_maxLength }} - {{~/eq}} - {{#eq this "minLength"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_minLength }} - {{~/eq}} - {{#eq this "maxProperties"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_maxProperties }} - {{~/eq}} - {{#eq this "minProperties"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_minProperties }} - {{~/eq}} - {{#eq this "maximum"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_maximum }} - {{~/eq}} - {{#eq this "minimum"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_minimum }} - {{~/eq}} - {{#eq this "multipleOf"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_multipleOf }} - {{~/eq}} - {{#eq this "additionalProperties"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties }} - {{~/eq}} - {{#eq this "allOf"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} - {{~/eq}} - {{#eq this "anyOf"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} - {{~/eq}} - {{#eq this "oneOf"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} - {{~/eq}} - {{#eq this "not"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_not }} - {{~/eq}} - {{#eq this "uniqueItems"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems }} - {{~/eq}} - {{#eq this "enum"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} - {{~/eq}} - {{#eq this "pattern"}} -{{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} - {{~/eq}} - {{#if @last ~}} -)); | - {{/if}} -{{/each}} \ No newline at end of file +{{#if types}} +| Set> | {{> src/main/java/packagename/components/schemas/SchemaClass/_types }} | +{{/if}} +{{#if format}} +| String | {{> src/main/java/packagename/components/schemas/SchemaClass/_format }} | +{{/if}} +{{#if items}} +| Class | {{> src/main/java/packagename/components/schemas/SchemaClass/_items }} | +{{/if}} +{{#if properties}} +| Map> | {{> src/main/java/packagename/components/schemas/SchemaClass/_properties }} | +{{/if}} +{{#if requiredProperties}} +| Set | {{> src/main/java/packagename/components/schemas/SchemaClass/_required }} | +{{/if}} +{{#neq exclusiveMaximum null}} +| Number | {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMaximum }} | +{{/neq}} +{{#neq exclusiveMinimum null}} +| Number | {{> src/main/java/packagename/components/schemas/SchemaClass/_exclusiveMinimum }} | +{{/neq}} +{{#neq maximum null}} +| Number | {{> src/main/java/packagename/components/schemas/SchemaClass/_maximum }} | +{{/neq}} +{{#neq minimum null}} +| Number | {{> src/main/java/packagename/components/schemas/SchemaClass/_minimum }} | +{{/neq}} +{{#neq multipleOf null}} +| BigDecimal | {{> src/main/java/packagename/components/schemas/SchemaClass/_multipleOf }} | +{{/neq}} +{{#neq maxItems null}} +| Integer | {{> src/main/java/packagename/components/schemas/SchemaClass/_maxItems }} | +{{/neq}} +{{#neq minItems null}} +| Integer | {{> src/main/java/packagename/components/schemas/SchemaClass/_minItems }} | +{{/neq}} +{{#neq maxLength null }} +| Integer | {{> src/main/java/packagename/components/schemas/SchemaClass/_maxLength }} | +{{/neq}} +{{#neq minLength null }} +| Integer | {{> src/main/java/packagename/components/schemas/SchemaClass/_minLength }} | +{{/neq}} +{{#neq maxProperties null}} +| Integer | {{> src/main/java/packagename/components/schemas/SchemaClass/_maxProperties }} | +{{/neq}} +{{#neq minProperties null}} +| Integer | {{> src/main/java/packagename/components/schemas/SchemaClass/_minProperties }} | +{{/neq}} +{{#if additionalProperties}} +| Class | {{> src/main/java/packagename/components/schemas/SchemaClass/_additionalProperties }} | +{{/if}} +{{#if allOf}} +| List> | {{> src/main/java/packagename/components/schemas/SchemaClass/_allOf }} | +{{/if}} +{{#if anyOf}} +| List> | {{> src/main/java/packagename/components/schemas/SchemaClass/_anyOf }} | +{{/if}} +{{#if oneOf}} +| List> | {{> src/main/java/packagename/components/schemas/SchemaClass/_oneOf }} | +{{/if}} +{{#if not}} +| Class | {{> src/main/java/packagename/components/schemas/SchemaClass/_not }} | +{{/if}} +{{#neq uniqueItems null}} +| Boolean | {{> src/main/java/packagename/components/schemas/SchemaClass/_uniqueItems }} | +{{/neq}} +{{#if enumInfo}} +| Set | {{> src/main/java/packagename/components/schemas/SchemaClass/_enum }} | +{{/if}} +{{#if patternInfo}} +| Pattern | {{> src/main/java/packagename/components/schemas/SchemaClass/_pattern }} | +{{/if}} \ No newline at end of file From 4d8f3ceabbf0ab49b96ded2893b7fa06fd7d101a Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 09:58:19 -0800 Subject: [PATCH 07/12] Adds missing type word to schema docs --- ...dditionalpropertiesAllowsASchemaWhichShouldValidate.md | 2 +- .../schemas/AdditionalpropertiesCanExistByItself.md | 2 +- .../docs/components/schemas/ArrayTypeMatchesArrays.md | 2 +- .../docs/components/schemas/EnumWithFalseDoesNotMatch0.md | 2 +- .../docs/components/schemas/EnumWithTrueDoesNotMatch1.md | 2 +- .../java/docs/components/schemas/EnumsInProperties.md | 2 +- .../java/docs/components/schemas/NestedItems.md | 8 ++++---- .../java/docs/components/schemas/NotMoreComplexSchema.md | 2 +- .../java/docs/components/schemas/OneofWithRequired.md | 2 +- .../docs/components/schemas/RefInAdditionalproperties.md | 2 +- .../java/docs/components/schemas/RefInItems.md | 2 +- ...faultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md | 2 +- .../packagename/components/schemas/SchemaClass/_types.hbs | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md index cbe90588bb0..b1156f7be6a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md @@ -52,7 +52,7 @@ AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsA ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenMap.class)
| +| Set> |     type = Set.of(FrozenMap.class)
| | Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| | Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md index 78fe3095fc9..cd0dded8e61 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md @@ -50,7 +50,7 @@ AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap val ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenMap.class)
| +| Set> |     type = Set.of(FrozenMap.class)
| | Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md index d8c61f85e8f..0abedb1956b 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md @@ -50,7 +50,7 @@ ArrayTypeMatchesArrays.ArrayTypeMatchesArraysList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenList.class)
| +| Set> |     type = Set.of(FrozenList.class)
| | Class |     items = [Items.class](#items)
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md index a7196f69bb7..7d606feb581 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md @@ -45,7 +45,7 @@ boolean validatedPayload = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch0 ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(Boolean.class)
| +| Set> |     type = Set.of(Boolean.class)
| | Set |     enumValues = SetMaker.makeSet(
        false)
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md index 112f885c50f..39748c4439c 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md @@ -45,7 +45,7 @@ boolean validatedPayload = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11. ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(Boolean.class)
| +| Set> |     type = Set.of(Boolean.class)
| | Set |     enumValues = SetMaker.makeSet(
        true)
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md index 166ac749cd4..0721b9a4ede 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/EnumsInProperties.md @@ -59,7 +59,7 @@ EnumsInProperties.EnumsInPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenMap.class)
| +| Set> |     type = Set.of(FrozenMap.class)
| | Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo))),
        new PropertyEntry("bar", [Bar.class](#bar)))
    )
| | Set |     required = Set.of(
        "bar"
    )
| diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md index b24de72b917..2e84bf470ce 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NestedItems.md @@ -66,7 +66,7 @@ NestedItems.NestedItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenList.class)
| +| Set> |     type = Set.of(FrozenList.class)
| | Class |     items = [Items.class](#items)
| ### Method Summary @@ -134,7 +134,7 @@ NestedItems.ItemsList2 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenList.class)
| +| Set> |     type = Set.of(FrozenList.class)
| | Class |     items = [Items1.class](#items1)
| ### Method Summary @@ -200,7 +200,7 @@ NestedItems.ItemsList1 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenList.class)
| +| Set> |     type = Set.of(FrozenList.class)
| | Class |     items = [Items2.class](#items2)
| ### Method Summary @@ -264,7 +264,7 @@ NestedItems.ItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenList.class)
| +| Set> |     type = Set.of(FrozenList.class)
| | Class |     items = [Items3.class](#items3)
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md index 7f8b6453838..55af2d0f205 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md @@ -79,7 +79,7 @@ NotMoreComplexSchema.NotMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenMap.class)
| +| Set> |     type = Set.of(FrozenMap.class)
| | Map> |     properties = Map.ofEntries(
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md index 2f84b935880..73c4e8af639 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/OneofWithRequired.md @@ -29,7 +29,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenMap.class)
| +| Set> |     type = Set.of(FrozenMap.class)
| | List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1)
    ))
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md index 3cde2d5aecb..c5f7b7c05f6 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInAdditionalproperties.md @@ -49,7 +49,7 @@ RefInAdditionalproperties.RefInAdditionalpropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenMap.class)
| +| Set> |     type = Set.of(FrozenMap.class)
| | Class |     additionalProperties = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md index d8f9b4fee2a..700d12b690a 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/RefInItems.md @@ -49,7 +49,7 @@ RefInItems.RefInItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenList.class)
| +| Set> |     type = Set.of(FrozenList.class)
| | Class |     items = [PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.class](../../components/schemas/PropertyNamedRefThatIsNotAReference.md#propertynamedrefthatisnotareference1)
| ### Method Summary diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md index bd364c73fb6..5c439bbc3b3 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md @@ -54,7 +54,7 @@ TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.TheDefaultKeywordDoesNo ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Set> |     Set.of(FrozenMap.class)
| +| Set> |     type = Set.of(FrozenMap.class)
| | Map> |     properties = Map.ofEntries(
        new PropertyEntry("alpha", [Alpha.class](#alpha)))
    )
| ### Method Summary diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs index 30a89703eac..cdb80fcfda6 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs @@ -1,7 +1,7 @@ {{#if types}} {{#and (eq types.size 1) (or (contains types "null") (contains types "object") (contains types "array") (contains types "boolean"))}} {{#if forDocs}} -    Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}})
+    type = Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}})
{{~else}} .type(Set.of({{#contains types "null"}}Void.class{{/contains}}{{#contains types "object"}}FrozenMap.class{{/contains}}{{#contains types "array"}}FrozenList.class{{/contains}}{{#contains types "boolean"}}Boolean.class{{/contains}})) {{/if}} From a9f519851ecde3414fcbf2acc3b47bd40768ebe3 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 10:13:49 -0800 Subject: [PATCH 08/12] Samples regen --- .../petstore/java/.openapi-generator/FILES | 1 + .../content/applicationjson/Schema.md | 3 +- .../content/applicationjson/Schema.md | 3 +- .../content/applicationxml/Schema.md | 3 +- .../content/applicationjson/Schema.md | 3 +- .../components/schemas/AbstractStepMessage.md | 5 +- .../schemas/AdditionalPropertiesClass.md | 21 +- .../schemas/AdditionalPropertiesSchema.md | 16 +- .../AdditionalPropertiesWithArrayOfEnums.md | 6 +- .../java/docs/components/schemas/Address.md | 3 +- .../java/docs/components/schemas/Animal.md | 6 +- .../docs/components/schemas/AnimalFarm.md | 3 +- .../components/schemas/AnyTypeAndFormat.md | 21 +- .../components/schemas/AnyTypeNotString.md | 2 +- .../components/schemas/ApiResponseSchema.md | 3 +- .../java/docs/components/schemas/Apple.md | 10 +- .../java/docs/components/schemas/AppleReq.md | 5 +- .../components/schemas/ArrayHoldingAnyType.md | 3 +- .../schemas/ArrayOfArrayOfNumberOnly.md | 9 +- .../docs/components/schemas/ArrayOfEnums.md | 3 +- .../components/schemas/ArrayOfNumberOnly.md | 6 +- .../java/docs/components/schemas/ArrayTest.md | 18 +- .../schemas/ArrayWithValidationsInItems.md | 8 +- .../java/docs/components/schemas/Banana.md | 4 +- .../java/docs/components/schemas/BananaReq.md | 5 +- .../java/docs/components/schemas/Bar.md | 2 +- .../java/docs/components/schemas/BasquePig.md | 7 +- .../docs/components/schemas/BooleanEnum.md | 3 +- .../docs/components/schemas/Capitalization.md | 3 +- .../java/docs/components/schemas/Cat.md | 5 +- .../java/docs/components/schemas/Category.md | 6 +- .../java/docs/components/schemas/ChildCat.md | 5 +- .../docs/components/schemas/ClassModel.md | 2 +- .../java/docs/components/schemas/Client.md | 3 +- .../schemas/ComplexQuadrilateral.md | 8 +- ...omposedAnyOfDifferentTypesNoValidations.md | 5 +- .../docs/components/schemas/ComposedArray.md | 3 +- .../docs/components/schemas/ComposedBool.md | 3 +- .../docs/components/schemas/ComposedNone.md | 3 +- .../docs/components/schemas/ComposedNumber.md | 3 +- .../docs/components/schemas/ComposedObject.md | 3 +- .../schemas/ComposedOneOfDifferentTypes.md | 15 +- .../docs/components/schemas/ComposedString.md | 3 +- .../java/docs/components/schemas/Currency.md | 3 +- .../java/docs/components/schemas/DanishPig.md | 7 +- .../docs/components/schemas/DateTimeTest.md | 3 +- .../schemas/DateTimeWithValidations.md | 4 +- .../components/schemas/DateWithValidations.md | 4 +- .../java/docs/components/schemas/Dog.md | 5 +- .../java/docs/components/schemas/Drawing.md | 7 +- .../docs/components/schemas/EnumArrays.md | 12 +- .../java/docs/components/schemas/EnumClass.md | 3 +- .../java/docs/components/schemas/EnumTest.md | 18 +- .../components/schemas/EquilateralTriangle.md | 8 +- .../java/docs/components/schemas/File.md | 3 +- .../components/schemas/FileSchemaTestClass.md | 6 +- .../java/docs/components/schemas/Foo.md | 3 +- .../docs/components/schemas/FormatTest.md | 47 ++++- .../docs/components/schemas/FromSchema.md | 3 +- .../java/docs/components/schemas/Fruit.md | 3 +- .../java/docs/components/schemas/FruitReq.md | 2 +- .../java/docs/components/schemas/GmFruit.md | 3 +- .../components/schemas/GrandparentAnimal.md | 4 +- .../components/schemas/HasOnlyReadOnly.md | 3 +- .../components/schemas/HealthCheckResult.md | 5 +- .../docs/components/schemas/IntegerEnum.md | 3 +- .../docs/components/schemas/IntegerEnumBig.md | 3 +- .../components/schemas/IntegerEnumOneValue.md | 3 +- .../schemas/IntegerEnumWithDefaultValue.md | 3 +- .../docs/components/schemas/IntegerMax10.md | 4 +- .../docs/components/schemas/IntegerMin15.md | 4 +- .../components/schemas/IsoscelesTriangle.md | 8 +- .../java/docs/components/schemas/Items.md | 3 +- .../components/schemas/JSONPatchRequest.md | 5 +- .../schemas/JSONPatchRequestAddReplaceTest.md | 8 +- .../schemas/JSONPatchRequestMoveCopy.md | 8 +- .../schemas/JSONPatchRequestRemove.md | 8 +- .../java/docs/components/schemas/Mammal.md | 2 +- .../java/docs/components/schemas/MapTest.md | 18 +- ...dPropertiesAndAdditionalPropertiesClass.md | 6 +- .../java/docs/components/schemas/Money.md | 5 +- .../docs/components/schemas/MyObjectDto.md | 4 +- .../java/docs/components/schemas/Name.md | 3 +- .../schemas/NoAdditionalProperties.md | 5 +- .../docs/components/schemas/NullableClass.md | 46 ++-- .../docs/components/schemas/NullableShape.md | 2 +- .../docs/components/schemas/NullableString.md | 2 +- .../docs/components/schemas/NumberOnly.md | 3 +- .../schemas/NumberWithExclusiveMinMax.md | 4 +- .../schemas/NumberWithValidations.md | 4 +- .../schemas/ObjWithRequiredProps.md | 5 +- .../schemas/ObjWithRequiredPropsBase.md | 4 +- .../ObjectModelWithArgAndArgsProperties.md | 4 +- .../schemas/ObjectModelWithRefProps.md | 3 +- ...ithAllOfWithReqTestPropFromUnsetAddProp.md | 6 +- .../schemas/ObjectWithCollidingProperties.md | 3 +- .../schemas/ObjectWithDecimalProperties.md | 3 +- .../ObjectWithDifficultlyNamedProps.md | 4 +- .../ObjectWithInlineCompositionProperty.md | 8 +- .../ObjectWithInvalidNamedRefedProperties.md | 4 +- .../ObjectWithNonIntersectingValues.md | 4 +- .../schemas/ObjectWithOnlyOptionalProps.md | 4 +- .../schemas/ObjectWithOptionalTestProp.md | 3 +- .../schemas/ObjectWithValidations.md | 3 +- .../java/docs/components/schemas/Order.md | 6 +- .../schemas/PaginatedResultMyObjectDto.md | 8 +- .../java/docs/components/schemas/ParentPet.md | 3 +- .../java/docs/components/schemas/Pet.md | 13 +- .../java/docs/components/schemas/Pig.md | 2 +- .../java/docs/components/schemas/Player.md | 3 +- .../java/docs/components/schemas/PublicKey.md | 3 +- .../docs/components/schemas/Quadrilateral.md | 2 +- .../schemas/QuadrilateralInterface.md | 6 +- .../docs/components/schemas/ReadOnlyFirst.md | 3 +- .../schemas/ReqPropsFromExplicitAddProps.md | 4 +- .../schemas/ReqPropsFromTrueAddProps.md | 4 +- .../schemas/ReqPropsFromUnsetAddProps.md | 3 +- .../docs/components/schemas/ReturnSchema.md | 2 +- .../components/schemas/ScaleneTriangle.md | 8 +- .../components/schemas/Schema200Response.md | 2 +- .../schemas/SelfReferencingArrayModel.md | 3 +- .../schemas/SelfReferencingObjectModel.md | 4 +- .../java/docs/components/schemas/Shape.md | 2 +- .../docs/components/schemas/ShapeOrNull.md | 2 +- .../components/schemas/SimpleQuadrilateral.md | 8 +- .../docs/components/schemas/SomeObject.md | 2 +- .../components/schemas/SpecialModelname.md | 3 +- .../components/schemas/StringBooleanMap.md | 3 +- .../docs/components/schemas/StringEnum.md | 3 +- .../schemas/StringEnumWithDefaultValue.md | 3 +- .../schemas/StringWithValidation.md | 3 +- .../java/docs/components/schemas/Tag.md | 3 +- .../java/docs/components/schemas/Triangle.md | 2 +- .../components/schemas/TriangleInterface.md | 6 +- .../docs/components/schemas/UUIDString.md | 4 +- .../java/docs/components/schemas/User.md | 7 +- .../java/docs/components/schemas/Whale.md | 7 +- .../java/docs/components/schemas/Zebra.md | 11 +- .../delete/parameters/parameter1/Schema1.md | 3 +- .../parameters/parameter0/PathParamSchema0.md | 3 +- .../delete/parameters/parameter1/Schema1.md | 3 +- .../delete/parameters/parameter4/Schema4.md | 3 +- .../fake/get/parameters/parameter0/Schema0.md | 6 +- .../fake/get/parameters/parameter1/Schema1.md | 3 +- .../fake/get/parameters/parameter2/Schema2.md | 6 +- .../fake/get/parameters/parameter3/Schema3.md | 3 +- .../fake/get/parameters/parameter4/Schema4.md | 4 +- .../fake/get/parameters/parameter5/Schema5.md | 4 +- .../applicationxwwwformurlencoded/Schema.md | 12 +- .../applicationxwwwformurlencoded/Schema.md | 40 +++- .../content/applicationjson/Schema.md | 3 +- .../post/parameters/parameter0/Schema0.md | 5 +- .../post/parameters/parameter1/Schema1.md | 8 +- .../content/applicationjson/Schema.md | 5 +- .../content/multipartformdata/Schema.md | 8 +- .../content/applicationjson/Schema.md | 5 +- .../content/multipartformdata/Schema.md | 8 +- .../applicationxwwwformurlencoded/Schema.md | 4 +- .../content/applicationjson/Schema.md | 3 +- .../content/multipartformdata/Schema.md | 3 +- .../get/parameters/parameter0/Schema0.md | 3 +- .../content/multipartformdata/Schema.md | 4 +- .../put/parameters/parameter0/Schema0.md | 3 +- .../put/parameters/parameter1/Schema1.md | 3 +- .../put/parameters/parameter2/Schema2.md | 3 +- .../put/parameters/parameter3/Schema3.md | 3 +- .../put/parameters/parameter4/Schema4.md | 3 +- .../content/multipartformdata/Schema.md | 4 +- .../content/multipartformdata/Schema.md | 6 +- .../content/applicationjson/Schema.md | 3 +- .../get/parameters/parameter0/Schema0.md | 6 +- .../get/parameters/parameter0/Schema0.md | 3 +- .../applicationxwwwformurlencoded/Schema.md | 3 +- .../content/multipartformdata/Schema.md | 3 +- .../get/parameters/parameter0/Schema0.md | 5 +- .../content/applicationjson/Schema.java | 13 +- .../responses/headerswithnobody/Headers.java | 17 +- .../content/applicationjson/Schema.java | 13 +- .../content/applicationxml/Schema.java | 13 +- .../Headers.java | 17 +- .../content/applicationjson/Schema.java | 12 +- .../successwithjsonapiresponse/Headers.java | 22 +- .../schemas/AbstractStepMessage.java | 25 +-- .../schemas/AdditionalPropertiesClass.java | 69 +++--- .../schemas/AdditionalPropertiesSchema.java | 58 +++--- .../AdditionalPropertiesWithArrayOfEnums.java | 22 +- .../client/components/schemas/Address.java | 12 +- .../client/components/schemas/Animal.java | 28 ++- .../client/components/schemas/AnimalFarm.java | 13 +- .../components/schemas/AnyTypeAndFormat.java | 79 +++---- .../components/schemas/AnyTypeNotString.java | 10 +- .../components/schemas/ApiResponseSchema.java | 15 +- .../client/components/schemas/Apple.java | 47 ++--- .../client/components/schemas/AppleReq.java | 22 +- .../schemas/ArrayHoldingAnyType.java | 13 +- .../schemas/ArrayOfArrayOfNumberOnly.java | 34 +-- .../components/schemas/ArrayOfEnums.java | 13 +- .../components/schemas/ArrayOfNumberOnly.java | 25 ++- .../client/components/schemas/ArrayTest.java | 61 +++--- .../schemas/ArrayWithValidationsInItems.java | 31 ++- .../client/components/schemas/Banana.java | 20 +- .../client/components/schemas/BananaReq.java | 22 +- .../client/components/schemas/Bar.java | 11 +- .../client/components/schemas/BasquePig.java | 33 ++- .../components/schemas/BooleanEnum.java | 15 +- .../components/schemas/Capitalization.java | 15 +- .../client/components/schemas/Cat.java | 25 ++- .../client/components/schemas/Category.java | 28 ++- .../client/components/schemas/ChildCat.java | 25 ++- .../client/components/schemas/ClassModel.java | 12 +- .../client/components/schemas/Client.java | 15 +- .../schemas/ComplexQuadrilateral.java | 38 ++-- ...posedAnyOfDifferentTypesNoValidations.java | 23 +- .../components/schemas/ComposedArray.java | 13 +- .../components/schemas/ComposedBool.java | 15 +- .../components/schemas/ComposedNone.java | 15 +- .../components/schemas/ComposedNumber.java | 17 +- .../components/schemas/ComposedObject.java | 15 +- .../schemas/ComposedOneOfDifferentTypes.java | 58 +++--- .../components/schemas/ComposedString.java | 16 +- .../client/components/schemas/Currency.java | 16 +- .../client/components/schemas/DanishPig.java | 33 ++- .../components/schemas/DateTimeTest.java | 14 +- .../schemas/DateTimeWithValidations.java | 19 +- .../schemas/DateWithValidations.java | 19 +- .../client/components/schemas/Dog.java | 25 ++- .../client/components/schemas/Drawing.java | 27 ++- .../client/components/schemas/EnumArrays.java | 50 +++-- .../client/components/schemas/EnumClass.java | 16 +- .../client/components/schemas/EnumTest.java | 76 ++++--- .../schemas/EquilateralTriangle.java | 38 ++-- .../client/components/schemas/File.java | 15 +- .../schemas/FileSchemaTestClass.java | 25 ++- .../client/components/schemas/Foo.java | 15 +- .../client/components/schemas/FormatTest.java | 165 +++++++-------- .../client/components/schemas/FromSchema.java | 15 +- .../client/components/schemas/Fruit.java | 17 +- .../client/components/schemas/FruitReq.java | 12 +- .../client/components/schemas/GmFruit.java | 17 +- .../components/schemas/GrandparentAnimal.java | 20 +- .../components/schemas/HasOnlyReadOnly.java | 15 +- .../components/schemas/HealthCheckResult.java | 24 +-- .../components/schemas/IntegerEnum.java | 17 +- .../components/schemas/IntegerEnumBig.java | 17 +- .../schemas/IntegerEnumOneValue.java | 17 +- .../schemas/IntegerEnumWithDefaultValue.java | 17 +- .../components/schemas/IntegerMax10.java | 18 +- .../components/schemas/IntegerMin15.java | 18 +- .../components/schemas/IsoscelesTriangle.java | 38 ++-- .../client/components/schemas/Items.java | 13 +- .../components/schemas/JSONPatchRequest.java | 23 +- .../JSONPatchRequestAddReplaceTest.java | 35 ++-- .../schemas/JSONPatchRequestMoveCopy.java | 35 ++-- .../schemas/JSONPatchRequestRemove.java | 35 ++-- .../client/components/schemas/Mammal.java | 12 +- .../client/components/schemas/MapTest.java | 64 +++--- ...ropertiesAndAdditionalPropertiesClass.java | 24 +-- .../client/components/schemas/Money.java | 22 +- .../components/schemas/MyObjectDto.java | 17 +- .../client/components/schemas/Name.java | 17 +- .../schemas/NoAdditionalProperties.java | 22 +- .../components/schemas/NullableClass.java | 184 ++++++++-------- .../components/schemas/NullableShape.java | 12 +- .../components/schemas/NullableString.java | 12 +- .../client/components/schemas/NumberOnly.java | 15 +- .../schemas/NumberWithExclusiveMinMax.java | 18 +- .../schemas/NumberWithValidations.java | 18 +- .../schemas/ObjWithRequiredProps.java | 25 +-- .../schemas/ObjWithRequiredPropsBase.java | 20 +- .../ObjectModelWithArgAndArgsProperties.java | 20 +- .../schemas/ObjectModelWithRefProps.java | 15 +- ...hAllOfWithReqTestPropFromUnsetAddProp.java | 30 ++- .../ObjectWithCollidingProperties.java | 15 +- .../schemas/ObjectWithDecimalProperties.java | 15 +- .../ObjectWithDifficultlyNamedProps.java | 20 +- .../ObjectWithInlineCompositionProperty.java | 36 ++-- ...ObjectWithInvalidNamedRefedProperties.java | 20 +- .../ObjectWithNonIntersectingValues.java | 17 +- .../schemas/ObjectWithOnlyOptionalProps.java | 17 +- .../schemas/ObjectWithOptionalTestProp.java | 15 +- .../schemas/ObjectWithValidations.java | 13 +- .../client/components/schemas/Order.java | 28 ++- .../schemas/PaginatedResultMyObjectDto.java | 32 ++- .../client/components/schemas/ParentPet.java | 15 +- .../client/components/schemas/Pet.java | 52 +++-- .../client/components/schemas/Pig.java | 12 +- .../client/components/schemas/Player.java | 15 +- .../client/components/schemas/PublicKey.java | 15 +- .../components/schemas/Quadrilateral.java | 12 +- .../schemas/QuadrilateralInterface.java | 31 ++- .../components/schemas/ReadOnlyFirst.java | 15 +- .../schemas/ReqPropsFromExplicitAddProps.java | 17 +- .../schemas/ReqPropsFromTrueAddProps.java | 17 +- .../schemas/ReqPropsFromUnsetAddProps.java | 15 +- .../components/schemas/ReturnSchema.java | 12 +- .../components/schemas/ScaleneTriangle.java | 38 ++-- .../components/schemas/Schema200Response.java | 12 +- .../schemas/SelfReferencingArrayModel.java | 13 +- .../schemas/SelfReferencingObjectModel.java | 17 +- .../client/components/schemas/Shape.java | 12 +- .../components/schemas/ShapeOrNull.java | 12 +- .../schemas/SimpleQuadrilateral.java | 38 ++-- .../client/components/schemas/SomeObject.java | 12 +- .../components/schemas/SpecialModelname.java | 15 +- .../components/schemas/StringBooleanMap.java | 12 +- .../client/components/schemas/StringEnum.java | 17 +- .../schemas/StringEnumWithDefaultValue.java | 16 +- .../schemas/StringWithValidation.java | 14 +- .../client/components/schemas/Tag.java | 15 +- .../client/components/schemas/Triangle.java | 12 +- .../components/schemas/TriangleInterface.java | 31 ++- .../client/components/schemas/UUIDString.java | 17 +- .../client/components/schemas/User.java | 32 +-- .../client/components/schemas/Whale.java | 33 ++- .../client/components/schemas/Zebra.java | 47 ++--- .../delete/HeaderParameters.java | 17 +- .../delete/PathParameters.java | 22 +- .../delete/parameters/parameter1/Schema1.java | 16 +- .../commonparamsubdir/get/PathParameters.java | 22 +- .../get/QueryParameters.java | 17 +- .../parameter0/PathParamSchema0.java | 16 +- .../post/HeaderParameters.java | 17 +- .../post/PathParameters.java | 22 +- .../paths/fake/delete/HeaderParameters.java | 22 +- .../paths/fake/delete/QueryParameters.java | 22 +- .../delete/parameters/parameter1/Schema1.java | 16 +- .../delete/parameters/parameter4/Schema4.java | 16 +- .../paths/fake/get/HeaderParameters.java | 17 +- .../paths/fake/get/QueryParameters.java | 17 +- .../get/parameters/parameter0/Schema0.java | 26 ++- .../get/parameters/parameter1/Schema1.java | 16 +- .../get/parameters/parameter2/Schema2.java | 26 ++- .../get/parameters/parameter3/Schema3.java | 16 +- .../get/parameters/parameter4/Schema4.java | 20 +- .../get/parameters/parameter5/Schema5.java | 20 +- .../applicationxwwwformurlencoded/Schema.java | 50 +++-- .../applicationxwwwformurlencoded/Schema.java | 143 +++++++------ .../put/QueryParameters.java | 22 +- .../put/QueryParameters.java | 22 +- .../delete/PathParameters.java | 22 +- .../content/applicationjson/Schema.java | 12 +- .../post/QueryParameters.java | 17 +- .../post/parameters/parameter0/Schema0.java | 24 +-- .../post/parameters/parameter1/Schema1.java | 36 ++-- .../content/applicationjson/Schema.java | 24 +-- .../content/multipartformdata/Schema.java | 36 ++-- .../content/applicationjson/Schema.java | 24 +-- .../content/multipartformdata/Schema.java | 36 ++-- .../applicationxwwwformurlencoded/Schema.java | 20 +- .../content/applicationjson/Schema.java | 15 +- .../content/multipartformdata/Schema.java | 15 +- .../fakeobjinquery/get/QueryParameters.java | 17 +- .../get/parameters/parameter0/Schema0.java | 15 +- .../post/CookieParameters.java | 17 +- .../post/HeaderParameters.java | 17 +- .../post/PathParameters.java | 22 +- .../post/QueryParameters.java | 17 +- .../post/PathParameters.java | 22 +- .../content/multipartformdata/Schema.java | 20 +- .../get/QueryParameters.java | 22 +- .../get/QueryParameters.java | 17 +- .../put/QueryParameters.java | 22 +- .../put/parameters/parameter0/Schema0.java | 13 +- .../put/parameters/parameter1/Schema1.java | 13 +- .../put/parameters/parameter2/Schema2.java | 13 +- .../put/parameters/parameter3/Schema3.java | 13 +- .../put/parameters/parameter4/Schema4.java | 13 +- .../content/multipartformdata/Schema.java | 20 +- .../content/multipartformdata/Schema.java | 25 ++- .../content/applicationjson/Schema.java | 15 +- .../petfindbystatus/get/QueryParameters.java | 22 +- .../get/parameters/parameter0/Schema0.java | 26 ++- .../petfindbytags/get/QueryParameters.java | 22 +- .../get/parameters/parameter0/Schema0.java | 13 +- .../petpetid/delete/HeaderParameters.java | 17 +- .../paths/petpetid/delete/PathParameters.java | 22 +- .../paths/petpetid/get/PathParameters.java | 22 +- .../paths/petpetid/post/PathParameters.java | 22 +- .../applicationxwwwformurlencoded/Schema.java | 15 +- .../post/PathParameters.java | 22 +- .../content/multipartformdata/Schema.java | 15 +- .../delete/PathParameters.java | 22 +- .../storeorderorderid/get/PathParameters.java | 22 +- .../get/parameters/parameter0/Schema0.java | 21 +- .../paths/userlogin/get/QueryParameters.java | 22 +- .../get/responses/response200/Headers.java | 22 +- .../userusername/delete/PathParameters.java | 22 +- .../userusername/get/PathParameters.java | 22 +- .../userusername/put/PathParameters.java | 22 +- .../client/schemas/validation/JsonSchema.java | 197 +++++++++++++++++- .../schemas/validation/JsonSchemaInfo.java | 130 ++++++++++++ .../openapimodels/CodegenSchema.java | 80 ------- 392 files changed, 3406 insertions(+), 3092 deletions(-) create mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java diff --git a/samples/client/petstore/java/.openapi-generator/FILES b/samples/client/petstore/java/.openapi-generator/FILES index 718ebdd690e..8af22dcbc3c 100644 --- a/samples/client/petstore/java/.openapi-generator/FILES +++ b/samples/client/petstore/java/.openapi-generator/FILES @@ -680,6 +680,7 @@ src/main/java/org/openapijsonschematools/client/schemas/validation/FrozenMap.jav src/main/java/org/openapijsonschematools/client/schemas/validation/ItemsValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaFactory.java +src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordEntry.java src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/LengthValidator.java diff --git a/samples/client/petstore/java/docs/components/requestbodies/userarray/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/components/requestbodies/userarray/content/applicationjson/Schema.md index 937fe68bcf2..70acf4e93f4 100644 --- a/samples/client/petstore/java/docs/components/requestbodies/userarray/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/components/requestbodies/userarray/content/applicationjson/Schema.md @@ -87,7 +87,8 @@ Schema.SchemaList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([User.User1.class](../../../../components/schemas/User.md#user1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [User.User1.class](../../../../components/schemas/User.md#user1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.md index 8b15a1051fb..307f9ba454b 100644 --- a/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.md @@ -93,7 +93,8 @@ Schema.SchemaList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([RefPet.RefPet1.class](../../../../../components/schemas/RefPet.md#refpet1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [RefPet.RefPet1.class](../../../../../components/schemas/RefPet.md#refpet1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.md b/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.md index 1854c412beb..168dcdd21e1 100644 --- a/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.md +++ b/samples/client/petstore/java/docs/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.md @@ -93,7 +93,8 @@ Schema.SchemaList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Pet.Pet1.class](../../../../../components/schemas/Pet.md#pet1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Pet.Pet1.class](../../../../../components/schemas/Pet.md#pet1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/responses/successinlinecontentandheader/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/components/responses/successinlinecontentandheader/content/applicationjson/Schema.md index 51dc36c02be..da4ab7f926b 100644 --- a/samples/client/petstore/java/docs/components/responses/successinlinecontentandheader/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/components/responses/successinlinecontentandheader/content/applicationjson/Schema.md @@ -50,7 +50,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AbstractStepMessage.md b/samples/client/petstore/java/docs/components/schemas/AbstractStepMessage.md index cfb2a4ff3c0..d75173611d4 100644 --- a/samples/client/petstore/java/docs/components/schemas/AbstractStepMessage.md +++ b/samples/client/petstore/java/docs/components/schemas/AbstractStepMessage.md @@ -57,7 +57,10 @@ AbstractStepMessage.AbstractStepMessageMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("discriminator", [Discriminator.class](#discriminator)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "description",
        "discriminator",
        "sequenceNumber"
    ))),
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [AbstractStepMessage1.class](#abstractstepmessage1)
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("discriminator", [Discriminator.class](#discriminator)))
    )
| +| Set |     required = Set.of(
        "description",
        "discriminator",
        "sequenceNumber"
    )
| +| List> |     anyOf = List.of(
        [AbstractStepMessage1.class](#abstractstepmessage1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesClass.md b/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesClass.md index 6e2855bce2b..a18a5efec6a 100644 --- a/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesClass.md @@ -100,7 +100,8 @@ AdditionalPropertiesClass.AdditionalPropertiesClassMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("map_property", [MapProperty.class](#mapproperty))),
        new PropertyEntry("map_of_map_property", [MapOfMapProperty.class](#mapofmapproperty))),
        new PropertyEntry("anytype_1", [Anytype1.class](#anytype1))),
        new PropertyEntry("map_with_undeclared_properties_anytype_1", [MapWithUndeclaredPropertiesAnytype1.class](#mapwithundeclaredpropertiesanytype1))),
        new PropertyEntry("map_with_undeclared_properties_anytype_2", [MapWithUndeclaredPropertiesAnytype2.class](#mapwithundeclaredpropertiesanytype2))),
        new PropertyEntry("map_with_undeclared_properties_anytype_3", [MapWithUndeclaredPropertiesAnytype3.class](#mapwithundeclaredpropertiesanytype3))),
        new PropertyEntry("empty_map", [EmptyMap.class](#emptymap))),
        new PropertyEntry("map_with_undeclared_properties_string", [MapWithUndeclaredPropertiesString.class](#mapwithundeclaredpropertiesstring)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("map_property", [MapProperty.class](#mapproperty))),
        new PropertyEntry("map_of_map_property", [MapOfMapProperty.class](#mapofmapproperty))),
        new PropertyEntry("anytype_1", [Anytype1.class](#anytype1))),
        new PropertyEntry("map_with_undeclared_properties_anytype_1", [MapWithUndeclaredPropertiesAnytype1.class](#mapwithundeclaredpropertiesanytype1))),
        new PropertyEntry("map_with_undeclared_properties_anytype_2", [MapWithUndeclaredPropertiesAnytype2.class](#mapwithundeclaredpropertiesanytype2))),
        new PropertyEntry("map_with_undeclared_properties_anytype_3", [MapWithUndeclaredPropertiesAnytype3.class](#mapwithundeclaredpropertiesanytype3))),
        new PropertyEntry("empty_map", [EmptyMap.class](#emptymap))),
        new PropertyEntry("map_with_undeclared_properties_string", [MapWithUndeclaredPropertiesString.class](#mapwithundeclaredpropertiesstring)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -179,7 +180,8 @@ AdditionalPropertiesClass.MapWithUndeclaredPropertiesStringMap validatedPayload ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties5.class](#additionalproperties5)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties5.class](#additionalproperties5)
| ### Method Summary | Modifier and Type | Method and Description | @@ -255,7 +257,8 @@ AdditionalPropertiesClass.EmptyMapMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties4.class](#additionalproperties4)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties4.class](#additionalproperties4)
| ### Method Summary | Modifier and Type | Method and Description | @@ -326,7 +329,8 @@ AdditionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3Map validatedPayloa ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties3.class](#additionalproperties3)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties3.class](#additionalproperties3)
| ### Method Summary | Modifier and Type | Method and Description | @@ -429,7 +433,8 @@ AdditionalPropertiesClass.MapOfMapPropertyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties1.class](#additionalproperties1)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties1.class](#additionalproperties1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -492,7 +497,8 @@ AdditionalPropertiesClass.AdditionalPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties2.class](#additionalproperties2)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties2.class](#additionalproperties2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -565,7 +571,8 @@ AdditionalPropertiesClass.MapPropertyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesSchema.md b/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesSchema.md index 834c7e24333..4b2f5957fcc 100644 --- a/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesSchema.md +++ b/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesSchema.md @@ -35,7 +35,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1),
        [Schema2.class](#schema2)
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1),
        [Schema2.class](#schema2)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -75,7 +76,8 @@ AdditionalPropertiesSchema.Schema2Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties2.class](#additionalproperties2)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties2.class](#additionalproperties2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -114,7 +116,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("maxLength", new MaxLengthValidator(5))
)); | +| Integer |     maxLength = 5
| ### Method Summary | Modifier and Type | Method and Description | @@ -162,7 +164,8 @@ AdditionalPropertiesSchema.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties1.class](#additionalproperties1)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties1.class](#additionalproperties1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -201,7 +204,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("minLength", new MinLengthValidator(3))
)); | +| Integer |     minLength = 3
| ### Method Summary | Modifier and Type | Method and Description | @@ -249,7 +252,8 @@ AdditionalPropertiesSchema.Schema0Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesWithArrayOfEnums.md b/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesWithArrayOfEnums.md index 8a51bcf1335..fec7382cc99 100644 --- a/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesWithArrayOfEnums.md +++ b/samples/client/petstore/java/docs/components/schemas/AdditionalPropertiesWithArrayOfEnums.md @@ -52,7 +52,8 @@ AdditionalPropertiesWithArrayOfEnums.AdditionalPropertiesWithArrayOfEnumsMap val ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -116,7 +117,8 @@ AdditionalPropertiesWithArrayOfEnums.AdditionalPropertiesList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([EnumClass.EnumClass1.class](../../components/schemas/EnumClass.md#enumclass1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [EnumClass.EnumClass1.class](../../components/schemas/EnumClass.md#enumclass1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Address.md b/samples/client/petstore/java/docs/components/schemas/Address.md index b30d4c3320a..2eaeccd3132 100644 --- a/samples/client/petstore/java/docs/components/schemas/Address.md +++ b/samples/client/petstore/java/docs/components/schemas/Address.md @@ -50,7 +50,8 @@ Address.AddressMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Animal.md b/samples/client/petstore/java/docs/components/schemas/Animal.md index c09cfa44860..014afd8f46a 100644 --- a/samples/client/petstore/java/docs/components/schemas/Animal.md +++ b/samples/client/petstore/java/docs/components/schemas/Animal.md @@ -59,7 +59,9 @@ Animal.AnimalMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("className", [ClassName.class](#classname))),
        new PropertyEntry("color", [Color.class](#color)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "className"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("className", [ClassName.class](#classname))),
        new PropertyEntry("color", [Color.class](#color)))
    )
| +| Set |     required = Set.of(
        "className"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -124,7 +126,7 @@ String validatedPayload = Animal.Color.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AnimalFarm.md b/samples/client/petstore/java/docs/components/schemas/AnimalFarm.md index e099dc74686..1640f50ad7b 100644 --- a/samples/client/petstore/java/docs/components/schemas/AnimalFarm.md +++ b/samples/client/petstore/java/docs/components/schemas/AnimalFarm.md @@ -59,7 +59,8 @@ AnimalFarm.AnimalFarmList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Animal.Animal1.class](../../components/schemas/Animal.md#animal1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Animal.Animal1.class](../../components/schemas/Animal.md#animal1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md b/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md index 9562ce175d6..b0997c171e8 100644 --- a/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md +++ b/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md @@ -58,7 +58,8 @@ AnyTypeAndFormat.AnyTypeAndFormatMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
        new PropertyEntry("date", [Date.class](#date))),
        new PropertyEntry("date-time", [Datetime.class](#datetime))),
        new PropertyEntry("number", [NumberSchema.class](#numberschema))),
        new PropertyEntry("binary", [Binary.class](#binary))),
        new PropertyEntry("int32", [Int32.class](#int32))),
        new PropertyEntry("int64", [Int64.class](#int64))),
        new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
        new PropertyEntry("float", [FloatSchema.class](#floatschema)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
        new PropertyEntry("date", [Date.class](#date))),
        new PropertyEntry("date-time", [Datetime.class](#datetime))),
        new PropertyEntry("number", [NumberSchema.class](#numberschema))),
        new PropertyEntry("binary", [Binary.class](#binary))),
        new PropertyEntry("int32", [Int32.class](#int32))),
        new PropertyEntry("int64", [Int64.class](#int64))),
        new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
        new PropertyEntry("float", [FloatSchema.class](#floatschema)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -111,7 +112,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("float"))
)); | +| String |     type = "float";
| ### Method Summary | Modifier and Type | Method and Description | @@ -135,7 +136,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("double"))
)); | +| String |     type = "double";
| ### Method Summary | Modifier and Type | Method and Description | @@ -159,7 +160,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("int64"))
)); | +| String |     type = "int64";
| ### Method Summary | Modifier and Type | Method and Description | @@ -183,7 +184,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("int32"))
)); | +| String |     type = "int32";
| ### Method Summary | Modifier and Type | Method and Description | @@ -207,7 +208,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("binary"))
)); | +| String |     type = "binary";
| ### Method Summary | Modifier and Type | Method and Description | @@ -231,7 +232,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("number"))
)); | +| String |     type = "number";
| ### Method Summary | Modifier and Type | Method and Description | @@ -255,7 +256,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("date-time"))
)); | +| String |     type = "date-time";
| ### Method Summary | Modifier and Type | Method and Description | @@ -279,7 +280,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("date"))
)); | +| String |     type = "date";
| ### Method Summary | Modifier and Type | Method and Description | @@ -303,7 +304,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("format", new FormatValidator("uuid"))
)); | +| String |     type = "uuid";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AnyTypeNotString.md b/samples/client/petstore/java/docs/components/schemas/AnyTypeNotString.md index 90441578747..314870dcb5c 100644 --- a/samples/client/petstore/java/docs/components/schemas/AnyTypeNotString.md +++ b/samples/client/petstore/java/docs/components/schemas/AnyTypeNotString.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("not", new NotValidator([Not.class](#not)))
)); | +| Class |     not = [Not.class](#not)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ApiResponseSchema.md b/samples/client/petstore/java/docs/components/schemas/ApiResponseSchema.md index 29e5f91c208..46931cc0fd0 100644 --- a/samples/client/petstore/java/docs/components/schemas/ApiResponseSchema.md +++ b/samples/client/petstore/java/docs/components/schemas/ApiResponseSchema.md @@ -64,7 +64,8 @@ ApiResponseSchema.ApiResponseMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("code", [Code.class](#code))),
        new PropertyEntry("type", [Type.class](#type))),
        new PropertyEntry("message", [Message.class](#message)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("code", [Code.class](#code))),
        new PropertyEntry("type", [Type.class](#type))),
        new PropertyEntry("message", [Message.class](#message)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Apple.md b/samples/client/petstore/java/docs/components/schemas/Apple.md index 0b6adc1e440..c71127b0c94 100644 --- a/samples/client/petstore/java/docs/components/schemas/Apple.md +++ b/samples/client/petstore/java/docs/components/schemas/Apple.md @@ -65,7 +65,9 @@ Apple.AppleMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    ))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("cultivar", [Cultivar.class](#cultivar))),
        new PropertyEntry("origin", [Origin.class](#origin)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "cultivar"
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("cultivar", [Cultivar.class](#cultivar))),
        new PropertyEntry("origin", [Origin.class](#origin)))
    )
| +| Set |     required = Set.of(
        "cultivar"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -131,7 +133,8 @@ String validatedPayload = Apple.Origin.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("pattern", new PatternValidator(
        "^[A-Z\\s]*$",
        Pattern.CASE_INSENSITIVE
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Pattern |     pattern =
        "^[A-Z\\s]*$",
        Pattern.CASE_INSENSITIVE
    )))
| ### Method Summary | Modifier and Type | Method and Description | @@ -169,7 +172,8 @@ String validatedPayload = Apple.Cultivar.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("pattern", new PatternValidator(
        "^[a-zA-Z\\s]*$"
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Pattern |     pattern =
        "^[a-zA-Z\\s]*$"
    )))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/AppleReq.md b/samples/client/petstore/java/docs/components/schemas/AppleReq.md index 8272656572b..2d393732d61 100644 --- a/samples/client/petstore/java/docs/components/schemas/AppleReq.md +++ b/samples/client/petstore/java/docs/components/schemas/AppleReq.md @@ -60,7 +60,10 @@ AppleReq.AppleReqMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("cultivar", [Cultivar.class](#cultivar))),
        new PropertyEntry("mealy", [Mealy.class](#mealy)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "cultivar"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("cultivar", [Cultivar.class](#cultivar))),
        new PropertyEntry("mealy", [Mealy.class](#mealy)))
    )
| +| Set |     required = Set.of(
        "cultivar"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ArrayHoldingAnyType.md b/samples/client/petstore/java/docs/components/schemas/ArrayHoldingAnyType.md index 31e239a365d..e0d38ed11ed 100644 --- a/samples/client/petstore/java/docs/components/schemas/ArrayHoldingAnyType.md +++ b/samples/client/petstore/java/docs/components/schemas/ArrayHoldingAnyType.md @@ -50,7 +50,8 @@ ArrayHoldingAnyType.ArrayHoldingAnyTypeList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/docs/components/schemas/ArrayOfArrayOfNumberOnly.md index ee324541c72..19f3fcd5da3 100644 --- a/samples/client/petstore/java/docs/components/schemas/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/java/docs/components/schemas/ArrayOfArrayOfNumberOnly.md @@ -64,7 +64,8 @@ ArrayOfArrayOfNumberOnly.ArrayOfArrayOfNumberOnlyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("ArrayArrayNumber", [ArrayArrayNumber.class](#arrayarraynumber)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("ArrayArrayNumber", [ArrayArrayNumber.class](#arrayarraynumber)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -132,7 +133,8 @@ ArrayOfArrayOfNumberOnly.ArrayArrayNumberList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | @@ -195,7 +197,8 @@ ArrayOfArrayOfNumberOnly.ItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items1.class](#items1)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items1.class](#items1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ArrayOfEnums.md b/samples/client/petstore/java/docs/components/schemas/ArrayOfEnums.md index b076462f5bf..accf0ed0526 100644 --- a/samples/client/petstore/java/docs/components/schemas/ArrayOfEnums.md +++ b/samples/client/petstore/java/docs/components/schemas/ArrayOfEnums.md @@ -50,7 +50,8 @@ ArrayOfEnums.ArrayOfEnumsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([StringEnum.StringEnum1.class](../../components/schemas/StringEnum.md#stringenum1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [StringEnum.StringEnum1.class](../../components/schemas/StringEnum.md#stringenum1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ArrayOfNumberOnly.md b/samples/client/petstore/java/docs/components/schemas/ArrayOfNumberOnly.md index 9e5cd0bd91e..ae5fa454157 100644 --- a/samples/client/petstore/java/docs/components/schemas/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/docs/components/schemas/ArrayOfNumberOnly.md @@ -59,7 +59,8 @@ ArrayOfNumberOnly.ArrayOfNumberOnlyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("ArrayNumber", [ArrayNumber.class](#arraynumber)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("ArrayNumber", [ArrayNumber.class](#arraynumber)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -125,7 +126,8 @@ ArrayOfNumberOnly.ArrayNumberList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ArrayTest.md b/samples/client/petstore/java/docs/components/schemas/ArrayTest.md index a17d9395ca8..5eeff6fae2d 100644 --- a/samples/client/petstore/java/docs/components/schemas/ArrayTest.md +++ b/samples/client/petstore/java/docs/components/schemas/ArrayTest.md @@ -97,7 +97,8 @@ ArrayTest.ArrayTestMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("array_of_string", [ArrayOfString.class](#arrayofstring))),
        new PropertyEntry("array_array_of_integer", [ArrayArrayOfInteger.class](#arrayarrayofinteger))),
        new PropertyEntry("array_array_of_model", [ArrayArrayOfModel.class](#arrayarrayofmodel)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("array_of_string", [ArrayOfString.class](#arrayofstring))),
        new PropertyEntry("array_array_of_integer", [ArrayArrayOfInteger.class](#arrayarrayofinteger))),
        new PropertyEntry("array_array_of_model", [ArrayArrayOfModel.class](#arrayarrayofmodel)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -178,7 +179,8 @@ ArrayTest.ArrayArrayOfModelList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items3.class](#items3)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items3.class](#items3)
| ### Method Summary | Modifier and Type | Method and Description | @@ -250,7 +252,8 @@ ArrayTest.ItemsList1 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([ReadOnlyFirst.ReadOnlyFirst1.class](../../components/schemas/ReadOnlyFirst.md#readonlyfirst1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [ReadOnlyFirst.ReadOnlyFirst1.class](../../components/schemas/ReadOnlyFirst.md#readonlyfirst1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -315,7 +318,8 @@ ArrayTest.ArrayArrayOfIntegerList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items1.class](#items1)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items1.class](#items1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -378,7 +382,8 @@ ArrayTest.ItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items2.class](#items2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -451,7 +456,8 @@ ArrayTest.ArrayOfStringList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ArrayWithValidationsInItems.md b/samples/client/petstore/java/docs/components/schemas/ArrayWithValidationsInItems.md index 02669a95681..38cac07602f 100644 --- a/samples/client/petstore/java/docs/components/schemas/ArrayWithValidationsInItems.md +++ b/samples/client/petstore/java/docs/components/schemas/ArrayWithValidationsInItems.md @@ -51,7 +51,9 @@ ArrayWithValidationsInItems.ArrayWithValidationsInItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items))),
    new KeywordEntry("maxItems", new MaxItemsValidator(2))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| +| Integer |     maxItems = 2
| ### Method Summary | Modifier and Type | Method and Description | @@ -111,7 +113,9 @@ long validatedPayload = ArrayWithValidationsInItems.Items.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("maximum", new MaximumValidator(7))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int64";
| +| Number |     maximum = 7
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Banana.md b/samples/client/petstore/java/docs/components/schemas/Banana.md index 608bda25f19..c1926670f0c 100644 --- a/samples/client/petstore/java/docs/components/schemas/Banana.md +++ b/samples/client/petstore/java/docs/components/schemas/Banana.md @@ -54,7 +54,9 @@ Banana.BananaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("lengthCm", [LengthCm.class](#lengthcm)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "lengthCm"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("lengthCm", [LengthCm.class](#lengthcm)))
    )
| +| Set |     required = Set.of(
        "lengthCm"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/BananaReq.md b/samples/client/petstore/java/docs/components/schemas/BananaReq.md index fee060ac10e..f779dc0ae58 100644 --- a/samples/client/petstore/java/docs/components/schemas/BananaReq.md +++ b/samples/client/petstore/java/docs/components/schemas/BananaReq.md @@ -60,7 +60,10 @@ BananaReq.BananaReqMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("lengthCm", [LengthCm.class](#lengthcm))),
        new PropertyEntry("sweet", [Sweet.class](#sweet)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "lengthCm"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("lengthCm", [LengthCm.class](#lengthcm))),
        new PropertyEntry("sweet", [Sweet.class](#sweet)))
    )
| +| Set |     required = Set.of(
        "lengthCm"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Bar.md b/samples/client/petstore/java/docs/components/schemas/Bar.md index c8dc7915b8e..b169436750c 100644 --- a/samples/client/petstore/java/docs/components/schemas/Bar.md +++ b/samples/client/petstore/java/docs/components/schemas/Bar.md @@ -45,7 +45,7 @@ String validatedPayload = Bar.Bar1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/BasquePig.md b/samples/client/petstore/java/docs/components/schemas/BasquePig.md index 494c436dd7a..eaee77c87b8 100644 --- a/samples/client/petstore/java/docs/components/schemas/BasquePig.md +++ b/samples/client/petstore/java/docs/components/schemas/BasquePig.md @@ -54,7 +54,9 @@ BasquePig.BasquePigMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("className", [ClassName.class](#classname)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "className"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("className", [ClassName.class](#classname)))
    )
| +| Set |     required = Set.of(
        "className"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -117,7 +119,8 @@ String validatedPayload = BasquePig.ClassName.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "BasquePig"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "BasquePig"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/BooleanEnum.md b/samples/client/petstore/java/docs/components/schemas/BooleanEnum.md index 17aca963824..a5362a544a9 100644 --- a/samples/client/petstore/java/docs/components/schemas/BooleanEnum.md +++ b/samples/client/petstore/java/docs/components/schemas/BooleanEnum.md @@ -45,7 +45,8 @@ boolean validatedPayload = BooleanEnum.BooleanEnum1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        true)))
)); | +| Set> |     type = Set.of(Boolean.class)
| +| Set |     enumValues = SetMaker.makeSet(
        true)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Capitalization.md b/samples/client/petstore/java/docs/components/schemas/Capitalization.md index 02ce0e93a50..f10fc2dd2bf 100644 --- a/samples/client/petstore/java/docs/components/schemas/Capitalization.md +++ b/samples/client/petstore/java/docs/components/schemas/Capitalization.md @@ -79,7 +79,8 @@ Capitalization.CapitalizationMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("smallCamel", [SmallCamel.class](#smallcamel))),
        new PropertyEntry("CapitalCamel", [CapitalCamel.class](#capitalcamel))),
        new PropertyEntry("small_Snake", [SmallSnake.class](#smallsnake))),
        new PropertyEntry("Capital_Snake", [CapitalSnake.class](#capitalsnake))),
        new PropertyEntry("SCA_ETH_Flow_Points", [SCAETHFlowPoints.class](#scaethflowpoints))),
        new PropertyEntry("ATT_NAME", [ATTNAME.class](#attname)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("smallCamel", [SmallCamel.class](#smallcamel))),
        new PropertyEntry("CapitalCamel", [CapitalCamel.class](#capitalcamel))),
        new PropertyEntry("small_Snake", [SmallSnake.class](#smallsnake))),
        new PropertyEntry("Capital_Snake", [CapitalSnake.class](#capitalsnake))),
        new PropertyEntry("SCA_ETH_Flow_Points", [SCAETHFlowPoints.class](#scaethflowpoints))),
        new PropertyEntry("ATT_NAME", [ATTNAME.class](#attname)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Cat.md b/samples/client/petstore/java/docs/components/schemas/Cat.md index 63a70712e23..bb1891a60d7 100644 --- a/samples/client/petstore/java/docs/components/schemas/Cat.md +++ b/samples/client/petstore/java/docs/components/schemas/Cat.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Animal.Animal1.class](../../components/schemas/Animal.md#animal1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [Animal.Animal1.class](../../components/schemas/Animal.md#animal1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ Cat.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("declawed", [Declawed.class](#declawed)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("declawed", [Declawed.class](#declawed)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Category.md b/samples/client/petstore/java/docs/components/schemas/Category.md index 79b40ef583b..77cbe227575 100644 --- a/samples/client/petstore/java/docs/components/schemas/Category.md +++ b/samples/client/petstore/java/docs/components/schemas/Category.md @@ -59,7 +59,9 @@ Category.CategoryMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("name", [Name.class](#name)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "name"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("name", [Name.class](#name)))
    )
| +| Set |     required = Set.of(
        "name"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -124,7 +126,7 @@ String validatedPayload = Category.Name.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ChildCat.md b/samples/client/petstore/java/docs/components/schemas/ChildCat.md index 7e772eb9025..6e0fe22d1c6 100644 --- a/samples/client/petstore/java/docs/components/schemas/ChildCat.md +++ b/samples/client/petstore/java/docs/components/schemas/ChildCat.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [ParentPet.ParentPet1.class](../../components/schemas/ParentPet.md#parentpet1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [ParentPet.ParentPet1.class](../../components/schemas/ParentPet.md#parentpet1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ ChildCat.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ClassModel.md b/samples/client/petstore/java/docs/components/schemas/ClassModel.md index c84acd8c0aa..f00d0a8746b 100644 --- a/samples/client/petstore/java/docs/components/schemas/ClassModel.md +++ b/samples/client/petstore/java/docs/components/schemas/ClassModel.md @@ -29,7 +29,7 @@ Model for testing model with "_class" property ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("_class", [ClassSchema.class](#classschema)))
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("_class", [ClassSchema.class](#classschema)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Client.md b/samples/client/petstore/java/docs/components/schemas/Client.md index 5f44dd7a93d..b7a9c12bfca 100644 --- a/samples/client/petstore/java/docs/components/schemas/Client.md +++ b/samples/client/petstore/java/docs/components/schemas/Client.md @@ -54,7 +54,8 @@ Client.ClientMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("client", [Client2.class](#client2)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("client", [Client2.class](#client2)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComplexQuadrilateral.md b/samples/client/petstore/java/docs/components/schemas/ComplexQuadrilateral.md index fa664d74e39..0c8d29f7c2d 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComplexQuadrilateral.md +++ b/samples/client/petstore/java/docs/components/schemas/ComplexQuadrilateral.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [QuadrilateralInterface.QuadrilateralInterface1.class](../../components/schemas/QuadrilateralInterface.md#quadrilateralinterface1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [QuadrilateralInterface.QuadrilateralInterface1.class](../../components/schemas/QuadrilateralInterface.md#quadrilateralinterface1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ ComplexQuadrilateral.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("quadrilateralType", [QuadrilateralType.class](#quadrilateraltype)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("quadrilateralType", [QuadrilateralType.class](#quadrilateraltype)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -142,7 +143,8 @@ String validatedPayload = ComplexQuadrilateral.QuadrilateralType.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "ComplexQuadrilateral"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "ComplexQuadrilateral"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedAnyOfDifferentTypesNoValidations.md b/samples/client/petstore/java/docs/components/schemas/ComposedAnyOfDifferentTypesNoValidations.md index 65901f0faec..d0a25db6942 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedAnyOfDifferentTypesNoValidations.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedAnyOfDifferentTypesNoValidations.md @@ -42,7 +42,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1),
        [Schema2.class](#schema2),
        [Schema3.class](#schema3),
        [Schema4.class](#schema4),
        [Schema5.class](#schema5),
        [Schema6.class](#schema6),
        [Schema7.class](#schema7),
        [Schema8.class](#schema8),
        [Schema9.class](#schema9),
        [Schema10.class](#schema10),
        [Schema11.class](#schema11),
        [Schema12.class](#schema12),
        [Schema13.class](#schema13),
        [Schema14.class](#schema14),
        [Schema15.class](#schema15)
    )))
)); | +| List> |     anyOf = List.of(
        [Schema0.class](#schema0),
        [Schema1.class](#schema1),
        [Schema2.class](#schema2),
        [Schema3.class](#schema3),
        [Schema4.class](#schema4),
        [Schema5.class](#schema5),
        [Schema6.class](#schema6),
        [Schema7.class](#schema7),
        [Schema8.class](#schema8),
        [Schema9.class](#schema9),
        [Schema10.class](#schema10),
        [Schema11.class](#schema11),
        [Schema12.class](#schema12),
        [Schema13.class](#schema13),
        [Schema14.class](#schema14),
        [Schema15.class](#schema15)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -150,7 +150,8 @@ ComposedAnyOfDifferentTypesNoValidations.Schema9List validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedArray.md b/samples/client/petstore/java/docs/components/schemas/ComposedArray.md index b44ca77afd1..14b739cf5eb 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedArray.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedArray.md @@ -50,7 +50,8 @@ ComposedArray.ComposedArrayList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedBool.md b/samples/client/petstore/java/docs/components/schemas/ComposedBool.md index 6603b865f53..535a88033e3 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedBool.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedBool.md @@ -46,7 +46,8 @@ boolean validatedPayload = ComposedBool.ComposedBool1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| Set> |     type = Set.of(Boolean.class)
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedNone.md b/samples/client/petstore/java/docs/components/schemas/ComposedNone.md index 6af734bf170..f225241690d 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedNone.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedNone.md @@ -46,7 +46,8 @@ Void validatedPayload = ComposedNone.ComposedNone1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(Void.class))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| Set> |     type = Set.of(Void.class)
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedNumber.md b/samples/client/petstore/java/docs/components/schemas/ComposedNumber.md index 376b0578e1c..d508cb61ec6 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedNumber.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedNumber.md @@ -46,7 +46,8 @@ int validatedPayload = ComposedNumber.ComposedNumber1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedObject.md b/samples/client/petstore/java/docs/components/schemas/ComposedObject.md index 73ec34f1ac1..83e48916843 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedObject.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedObject.md @@ -24,7 +24,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedOneOfDifferentTypes.md b/samples/client/petstore/java/docs/components/schemas/ComposedOneOfDifferentTypes.md index dc35102eb29..be63d4049cc 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedOneOfDifferentTypes.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedOneOfDifferentTypes.md @@ -34,7 +34,7 @@ this is a model that allows payloads of type object or number ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1),
        [Animal.Animal1.class](../../components/schemas/Animal.md#animal1),
        [Schema2.class](#schema2),
        [Schema3.class](#schema3),
        [Schema4.class](#schema4),
        [Schema5.class](#schema5),
        [Schema6.class](#schema6)
    )))
)); | +| List> |     oneOf = List.of(
        [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1),
        [Animal.Animal1.class](../../components/schemas/Animal.md#animal1),
        [Schema2.class](#schema2),
        [Schema3.class](#schema3),
        [Schema4.class](#schema4),
        [Schema5.class](#schema5),
        [Schema6.class](#schema6)
    ))
| ### Method Summary | Modifier and Type | Method and Description | @@ -80,7 +80,9 @@ String validatedPayload = ComposedOneOfDifferentTypes.Schema6.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("date-time")),
    new KeywordEntry("pattern", new PatternValidator(
        "^2020.*"
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "date-time";
| +| Pattern |     pattern =
        "^2020.*"
    )))
| ### Method Summary | Modifier and Type | Method and Description | @@ -120,7 +122,10 @@ ComposedOneOfDifferentTypes.Schema5List validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items))),
    new KeywordEntry("maxItems", new MaxItemsValidator(4)),
    new KeywordEntry("minItems", new MinItemsValidator(4))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| +| Integer |     maxItems = 4
| +| Integer |     minItems = 4
| ### Method Summary | Modifier and Type | Method and Description | @@ -168,7 +173,9 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("maxProperties", new MaxPropertiesValidator(4)),
    new KeywordEntry("minProperties", new MinPropertiesValidator(4))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Integer |     maxProperties = 4
| +| Integer |     minProperties = 4
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ComposedString.md b/samples/client/petstore/java/docs/components/schemas/ComposedString.md index 2cc4d64cac8..ec96bb6ead6 100644 --- a/samples/client/petstore/java/docs/components/schemas/ComposedString.md +++ b/samples/client/petstore/java/docs/components/schemas/ComposedString.md @@ -46,7 +46,8 @@ String validatedPayload = ComposedString.ComposedString1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Currency.md b/samples/client/petstore/java/docs/components/schemas/Currency.md index 162a184fd7b..330402cfce5 100644 --- a/samples/client/petstore/java/docs/components/schemas/Currency.md +++ b/samples/client/petstore/java/docs/components/schemas/Currency.md @@ -45,7 +45,8 @@ String validatedPayload = Currency.Currency1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "eur",
        "usd"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "eur",
        "usd"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/DanishPig.md b/samples/client/petstore/java/docs/components/schemas/DanishPig.md index c723f72988f..0942c773e22 100644 --- a/samples/client/petstore/java/docs/components/schemas/DanishPig.md +++ b/samples/client/petstore/java/docs/components/schemas/DanishPig.md @@ -54,7 +54,9 @@ DanishPig.DanishPigMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("className", [ClassName.class](#classname)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "className"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("className", [ClassName.class](#classname)))
    )
| +| Set |     required = Set.of(
        "className"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -117,7 +119,8 @@ String validatedPayload = DanishPig.ClassName.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "DanishPig"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "DanishPig"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/DateTimeTest.md b/samples/client/petstore/java/docs/components/schemas/DateTimeTest.md index f8c6032db50..0e614084702 100644 --- a/samples/client/petstore/java/docs/components/schemas/DateTimeTest.md +++ b/samples/client/petstore/java/docs/components/schemas/DateTimeTest.md @@ -45,7 +45,8 @@ String validatedPayload = DateTimeTest.DateTimeTest1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("date-time"))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "date-time";
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/DateTimeWithValidations.md b/samples/client/petstore/java/docs/components/schemas/DateTimeWithValidations.md index a5a15dcf252..0acd55657aa 100644 --- a/samples/client/petstore/java/docs/components/schemas/DateTimeWithValidations.md +++ b/samples/client/petstore/java/docs/components/schemas/DateTimeWithValidations.md @@ -45,7 +45,9 @@ String validatedPayload = DateTimeWithValidations.DateTimeWithValidations1.valid ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("date-time")),
    new KeywordEntry("pattern", new PatternValidator(
        "^2020.*"
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "date-time";
| +| Pattern |     pattern =
        "^2020.*"
    )))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/DateWithValidations.md b/samples/client/petstore/java/docs/components/schemas/DateWithValidations.md index 8fb0548e58b..a5138bc7ff4 100644 --- a/samples/client/petstore/java/docs/components/schemas/DateWithValidations.md +++ b/samples/client/petstore/java/docs/components/schemas/DateWithValidations.md @@ -45,7 +45,9 @@ String validatedPayload = DateWithValidations.DateWithValidations1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("date")),
    new KeywordEntry("pattern", new PatternValidator(
        "^2020.*"
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "date";
| +| Pattern |     pattern =
        "^2020.*"
    )))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Dog.md b/samples/client/petstore/java/docs/components/schemas/Dog.md index 79a94670d2a..b2cf90801b5 100644 --- a/samples/client/petstore/java/docs/components/schemas/Dog.md +++ b/samples/client/petstore/java/docs/components/schemas/Dog.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Animal.Animal1.class](../../components/schemas/Animal.md#animal1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [Animal.Animal1.class](../../components/schemas/Animal.md#animal1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ Dog.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("breed", [Breed.class](#breed)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("breed", [Breed.class](#breed)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Drawing.md b/samples/client/petstore/java/docs/components/schemas/Drawing.md index 0a63dc139ea..9d3f2a1d898 100644 --- a/samples/client/petstore/java/docs/components/schemas/Drawing.md +++ b/samples/client/petstore/java/docs/components/schemas/Drawing.md @@ -57,7 +57,9 @@ Drawing.DrawingMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("mainShape", [Shape.Shape1.class](../../components/schemas/Shape.md#shape1)),
        new PropertyEntry("shapeOrNull", [ShapeOrNull.ShapeOrNull1.class](../../components/schemas/ShapeOrNull.md#shapeornull1)),
        new PropertyEntry("nullableShape", [NullableShape.NullableShape1.class](../../components/schemas/NullableShape.md#nullableshape1)),
        new PropertyEntry("shapes", [Shapes.class](#shapes)))
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([Fruit.Fruit1.class](../../components/schemas/Fruit.md#fruit1))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("mainShape", [Shape.Shape1.class](../../components/schemas/Shape.md#shape1)),
        new PropertyEntry("shapeOrNull", [ShapeOrNull.ShapeOrNull1.class](../../components/schemas/ShapeOrNull.md#shapeornull1)),
        new PropertyEntry("nullableShape", [NullableShape.NullableShape1.class](../../components/schemas/NullableShape.md#nullableshape1)),
        new PropertyEntry("shapes", [Shapes.class](#shapes)))
    )
| +| Class |     additionalProperties = [Fruit.Fruit1.class](../../components/schemas/Fruit.md#fruit1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -128,7 +130,8 @@ Drawing.ShapesList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Shape.Shape1.class](../../components/schemas/Shape.md#shape1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Shape.Shape1.class](../../components/schemas/Shape.md#shape1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/EnumArrays.md b/samples/client/petstore/java/docs/components/schemas/EnumArrays.md index bc0bb4d16fe..8e82fdb9284 100644 --- a/samples/client/petstore/java/docs/components/schemas/EnumArrays.md +++ b/samples/client/petstore/java/docs/components/schemas/EnumArrays.md @@ -64,7 +64,8 @@ EnumArrays.EnumArraysMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("just_symbol", [JustSymbol.class](#justsymbol))),
        new PropertyEntry("array_enum", [ArrayEnum.class](#arrayenum)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("just_symbol", [JustSymbol.class](#justsymbol))),
        new PropertyEntry("array_enum", [ArrayEnum.class](#arrayenum)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -132,7 +133,8 @@ EnumArrays.ArrayEnumList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | @@ -192,7 +194,8 @@ String validatedPayload = EnumArrays.Items.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "fish",
        "crab"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "fish",
        "crab"
)
| ### Method Summary | Modifier and Type | Method and Description | @@ -230,7 +233,8 @@ String validatedPayload = EnumArrays.JustSymbol.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        ">=",
        "$"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        ">=",
        "$"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/EnumClass.md b/samples/client/petstore/java/docs/components/schemas/EnumClass.md index 5b37dc29743..fbfb6d3f935 100644 --- a/samples/client/petstore/java/docs/components/schemas/EnumClass.md +++ b/samples/client/petstore/java/docs/components/schemas/EnumClass.md @@ -45,7 +45,8 @@ String validatedPayload = EnumClass.EnumClass1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)",
        "COUNT_1M",
        "COUNT_50M"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)",
        "COUNT_1M",
        "COUNT_50M"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/EnumTest.md b/samples/client/petstore/java/docs/components/schemas/EnumTest.md index c545fbcf814..994471f11d5 100644 --- a/samples/client/petstore/java/docs/components/schemas/EnumTest.md +++ b/samples/client/petstore/java/docs/components/schemas/EnumTest.md @@ -69,7 +69,9 @@ EnumTest.EnumTestMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("enum_string", [EnumString.class](#enumstring))),
        new PropertyEntry("enum_string_required", [EnumStringRequired.class](#enumstringrequired))),
        new PropertyEntry("enum_integer", [EnumInteger.class](#enuminteger))),
        new PropertyEntry("enum_number", [EnumNumber.class](#enumnumber))),
        new PropertyEntry("stringEnum", [StringEnum.StringEnum1.class](../../components/schemas/StringEnum.md#stringenum1)),
        new PropertyEntry("IntegerEnum", [IntegerEnum.IntegerEnum1.class](../../components/schemas/IntegerEnum.md#integerenum1)),
        new PropertyEntry("StringEnumWithDefaultValue", [StringEnumWithDefaultValue.StringEnumWithDefaultValue1.class](../../components/schemas/StringEnumWithDefaultValue.md#stringenumwithdefaultvalue1)),
        new PropertyEntry("IntegerEnumWithDefaultValue", [IntegerEnumWithDefaultValue.IntegerEnumWithDefaultValue1.class](../../components/schemas/IntegerEnumWithDefaultValue.md#integerenumwithdefaultvalue1)),
        new PropertyEntry("IntegerEnumOneValue", [IntegerEnumOneValue.IntegerEnumOneValue1.class](../../components/schemas/IntegerEnumOneValue.md#integerenumonevalue1))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "enum_string_required"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("enum_string", [EnumString.class](#enumstring))),
        new PropertyEntry("enum_string_required", [EnumStringRequired.class](#enumstringrequired))),
        new PropertyEntry("enum_integer", [EnumInteger.class](#enuminteger))),
        new PropertyEntry("enum_number", [EnumNumber.class](#enumnumber))),
        new PropertyEntry("stringEnum", [StringEnum.StringEnum1.class](../../components/schemas/StringEnum.md#stringenum1)),
        new PropertyEntry("IntegerEnum", [IntegerEnum.IntegerEnum1.class](../../components/schemas/IntegerEnum.md#integerenum1)),
        new PropertyEntry("StringEnumWithDefaultValue", [StringEnumWithDefaultValue.StringEnumWithDefaultValue1.class](../../components/schemas/StringEnumWithDefaultValue.md#stringenumwithdefaultvalue1)),
        new PropertyEntry("IntegerEnumWithDefaultValue", [IntegerEnumWithDefaultValue.IntegerEnumWithDefaultValue1.class](../../components/schemas/IntegerEnumWithDefaultValue.md#integerenumwithdefaultvalue1)),
        new PropertyEntry("IntegerEnumOneValue", [IntegerEnumOneValue.IntegerEnumOneValue1.class](../../components/schemas/IntegerEnumOneValue.md#integerenumonevalue1))
    )
| +| Set |     required = Set.of(
        "enum_string_required"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -148,7 +150,9 @@ double validatedPayload = EnumTest.EnumNumber.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("double")),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1.1,        -1.2)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "double";
| +| Set |     enumValues = SetMaker.makeSet(
        1.1,        -1.2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -186,7 +190,9 @@ int validatedPayload = EnumTest.EnumInteger.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("int32")),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1,        -1)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int32";
| +| Set |     enumValues = SetMaker.makeSet(
        1,        -1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -224,7 +230,8 @@ String validatedPayload = EnumTest.EnumStringRequired.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "UPPER",
        "lower",
        ""
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "UPPER",
        "lower",
        ""
)
| ### Method Summary | Modifier and Type | Method and Description | @@ -262,7 +269,8 @@ String validatedPayload = EnumTest.EnumString.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "UPPER",
        "lower",
        ""
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "UPPER",
        "lower",
        ""
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/EquilateralTriangle.md b/samples/client/petstore/java/docs/components/schemas/EquilateralTriangle.md index b78c2caf7f8..5ce520d975d 100644 --- a/samples/client/petstore/java/docs/components/schemas/EquilateralTriangle.md +++ b/samples/client/petstore/java/docs/components/schemas/EquilateralTriangle.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [TriangleInterface.TriangleInterface1.class](../../components/schemas/TriangleInterface.md#triangleinterface1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [TriangleInterface.TriangleInterface1.class](../../components/schemas/TriangleInterface.md#triangleinterface1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ EquilateralTriangle.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -142,7 +143,8 @@ String validatedPayload = EquilateralTriangle.TriangleType.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "EquilateralTriangle"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "EquilateralTriangle"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/File.md b/samples/client/petstore/java/docs/components/schemas/File.md index 0c23c27f087..b3e014b4a6f 100644 --- a/samples/client/petstore/java/docs/components/schemas/File.md +++ b/samples/client/petstore/java/docs/components/schemas/File.md @@ -57,7 +57,8 @@ File.FileMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("sourceURI", [SourceURI.class](#sourceuri)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("sourceURI", [SourceURI.class](#sourceuri)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/FileSchemaTestClass.md b/samples/client/petstore/java/docs/components/schemas/FileSchemaTestClass.md index 537b93aa283..c8ee0c0b1d0 100644 --- a/samples/client/petstore/java/docs/components/schemas/FileSchemaTestClass.md +++ b/samples/client/petstore/java/docs/components/schemas/FileSchemaTestClass.md @@ -57,7 +57,8 @@ FileSchemaTestClass.FileSchemaTestClassMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("file", [File.File1.class](../../components/schemas/File.md#file1)),
        new PropertyEntry("files", [Files.class](#files)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("file", [File.File1.class](../../components/schemas/File.md#file1)),
        new PropertyEntry("files", [Files.class](#files)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -124,7 +125,8 @@ FileSchemaTestClass.FilesList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([File.File1.class](../../components/schemas/File.md#file1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [File.File1.class](../../components/schemas/File.md#file1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Foo.md b/samples/client/petstore/java/docs/components/schemas/Foo.md index 55e15e0cbed..5877ab3a654 100644 --- a/samples/client/petstore/java/docs/components/schemas/Foo.md +++ b/samples/client/petstore/java/docs/components/schemas/Foo.md @@ -49,7 +49,8 @@ Foo.FooMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.Bar1.class](../../components/schemas/Bar.md#bar1))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.Bar1.class](../../components/schemas/Bar.md#bar1))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/FormatTest.md b/samples/client/petstore/java/docs/components/schemas/FormatTest.md index f8919acded1..a1f5a407a1d 100644 --- a/samples/client/petstore/java/docs/components/schemas/FormatTest.md +++ b/samples/client/petstore/java/docs/components/schemas/FormatTest.md @@ -159,7 +159,9 @@ FormatTest.FormatTestMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("integer", [IntegerSchema.class](#integerschema))),
        new PropertyEntry("int32", [Int32.class](#int32))),
        new PropertyEntry("int32withValidations", [Int32withValidations.class](#int32withvalidations))),
        new PropertyEntry("int64", [Int64.class](#int64))),
        new PropertyEntry("number", [NumberSchema.class](#numberschema))),
        new PropertyEntry("float", [FloatSchema.class](#floatschema))),
        new PropertyEntry("float32", [Float32.class](#float32))),
        new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
        new PropertyEntry("float64", [Float64.class](#float64))),
        new PropertyEntry("arrayWithUniqueItems", [ArrayWithUniqueItems.class](#arraywithuniqueitems))),
        new PropertyEntry("string", [StringSchema.class](#stringschema))),
        new PropertyEntry("byte", [ByteSchema.class](#byteschema))),
        new PropertyEntry("binary", [Binary.class](#binary))),
        new PropertyEntry("date", [Date.class](#date))),
        new PropertyEntry("dateTime", [DateTime.class](#datetime))),
        new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
        new PropertyEntry("uuidNoExample", [UuidNoExample.class](#uuidnoexample))),
        new PropertyEntry("password", [Password.class](#password))),
        new PropertyEntry("pattern_with_digits", [PatternWithDigits.class](#patternwithdigits))),
        new PropertyEntry("pattern_with_digits_and_delimiter", [PatternWithDigitsAndDelimiter.class](#patternwithdigitsanddelimiter))),
        new PropertyEntry("noneProp", [NoneProp.class](#noneprop)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "byte",
        "date",
        "number",
        "password"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("integer", [IntegerSchema.class](#integerschema))),
        new PropertyEntry("int32", [Int32.class](#int32))),
        new PropertyEntry("int32withValidations", [Int32withValidations.class](#int32withvalidations))),
        new PropertyEntry("int64", [Int64.class](#int64))),
        new PropertyEntry("number", [NumberSchema.class](#numberschema))),
        new PropertyEntry("float", [FloatSchema.class](#floatschema))),
        new PropertyEntry("float32", [Float32.class](#float32))),
        new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
        new PropertyEntry("float64", [Float64.class](#float64))),
        new PropertyEntry("arrayWithUniqueItems", [ArrayWithUniqueItems.class](#arraywithuniqueitems))),
        new PropertyEntry("string", [StringSchema.class](#stringschema))),
        new PropertyEntry("byte", [ByteSchema.class](#byteschema))),
        new PropertyEntry("binary", [Binary.class](#binary))),
        new PropertyEntry("date", [Date.class](#date))),
        new PropertyEntry("dateTime", [DateTime.class](#datetime))),
        new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
        new PropertyEntry("uuidNoExample", [UuidNoExample.class](#uuidnoexample))),
        new PropertyEntry("password", [Password.class](#password))),
        new PropertyEntry("pattern_with_digits", [PatternWithDigits.class](#patternwithdigits))),
        new PropertyEntry("pattern_with_digits_and_delimiter", [PatternWithDigitsAndDelimiter.class](#patternwithdigitsanddelimiter))),
        new PropertyEntry("noneProp", [NoneProp.class](#noneprop)))
    )
| +| Set |     required = Set.of(
        "byte",
        "date",
        "number",
        "password"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -269,7 +271,8 @@ String validatedPayload = FormatTest.PatternWithDigitsAndDelimiter.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("pattern", new PatternValidator(
        "^image_\\d{1,3}$",
        Pattern.CASE_INSENSITIVE
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Pattern |     pattern =
        "^image_\\d{1,3}$",
        Pattern.CASE_INSENSITIVE
    )))
| ### Method Summary | Modifier and Type | Method and Description | @@ -310,7 +313,8 @@ String validatedPayload = FormatTest.PatternWithDigits.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("pattern", new PatternValidator(
        "^\\d{10}$"
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Pattern |     pattern =
        "^\\d{10}$"
    )))
| ### Method Summary | Modifier and Type | Method and Description | @@ -348,7 +352,10 @@ String validatedPayload = FormatTest.Password.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("password")),
    new KeywordEntry("maxLength", new MaxLengthValidator(64)),
    new KeywordEntry("minLength", new MinLengthValidator(10))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "password";
| +| Integer |     maxLength = 64
| +| Integer |     minLength = 10
| ### Method Summary | Modifier and Type | Method and Description | @@ -438,7 +445,8 @@ String validatedPayload = FormatTest.StringSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("pattern", new PatternValidator(
        "[a-z]",
        Pattern.CASE_INSENSITIVE
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Pattern |     pattern =
        "[a-z]",
        Pattern.CASE_INSENSITIVE
    )))
| ### Method Summary | Modifier and Type | Method and Description | @@ -479,7 +487,9 @@ FormatTest.ArrayWithUniqueItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items))),
    new KeywordEntry("uniqueItems", new UniqueItemsValidator(true))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| +| Boolean |     uniqueItems = true
| ### Method Summary | Modifier and Type | Method and Description | @@ -559,7 +569,10 @@ double validatedPayload = FormatTest.DoubleSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("double")),
    new KeywordEntry("maximum", new MaximumValidator(123.4)),
    new KeywordEntry("minimum", new MinimumValidator(67.8))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "double";
| +| Number |     maximum = 123.4
| +| Number |     minimum = 67.8
| ### Method Summary | Modifier and Type | Method and Description | @@ -610,7 +623,10 @@ float validatedPayload = FormatTest.FloatSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("float")),
    new KeywordEntry("maximum", new MaximumValidator(987.6)),
    new KeywordEntry("minimum", new MinimumValidator(54.3))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "float";
| +| Number |     maximum = 987.6
| +| Number |     minimum = 54.3
| ### Method Summary | Modifier and Type | Method and Description | @@ -648,7 +664,10 @@ int validatedPayload = FormatTest.NumberSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("maximum", new MaximumValidator(543.2)),
    new KeywordEntry("minimum", new MinimumValidator(32.1)),
    new KeywordEntry("multipleOf", new MultipleOfValidator(32.5))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Number |     maximum = 543.2
| +| Number |     minimum = 32.1
| +| BigDecimal |     multipleOf = 32.5
| ### Method Summary | Modifier and Type | Method and Description | @@ -696,7 +715,10 @@ int validatedPayload = FormatTest.Int32withValidations.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("int32")),
    new KeywordEntry("maximum", new MaximumValidator(200)),
    new KeywordEntry("minimum", new MinimumValidator(20))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int32";
| +| Number |     maximum = 200
| +| Number |     minimum = 20
| ### Method Summary | Modifier and Type | Method and Description | @@ -744,7 +766,10 @@ long validatedPayload = FormatTest.IntegerSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("maximum", new MaximumValidator(100)),
    new KeywordEntry("minimum", new MinimumValidator(10)),
    new KeywordEntry("multipleOf", new MultipleOfValidator(2))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Number |     maximum = 100
| +| Number |     minimum = 10
| +| BigDecimal |     multipleOf = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/FromSchema.md b/samples/client/petstore/java/docs/components/schemas/FromSchema.md index 5e55482d75f..214e6bc57cd 100644 --- a/samples/client/petstore/java/docs/components/schemas/FromSchema.md +++ b/samples/client/petstore/java/docs/components/schemas/FromSchema.md @@ -59,7 +59,8 @@ FromSchema.FromSchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("data", [Data.class](#data))),
        new PropertyEntry("id", [Id.class](#id)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("data", [Data.class](#data))),
        new PropertyEntry("id", [Id.class](#id)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Fruit.md b/samples/client/petstore/java/docs/components/schemas/Fruit.md index 071d22689c5..d66b48e85f2 100644 --- a/samples/client/petstore/java/docs/components/schemas/Fruit.md +++ b/samples/client/petstore/java/docs/components/schemas/Fruit.md @@ -26,7 +26,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("color", [Color.class](#color)))
    ))),
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Apple.Apple1.class](../../components/schemas/Apple.md#apple1),
        [Banana.Banana1.class](../../components/schemas/Banana.md#banana1)
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("color", [Color.class](#color)))
    )
| +| List> |     oneOf = List.of(
        [Apple.Apple1.class](../../components/schemas/Apple.md#apple1),
        [Banana.Banana1.class](../../components/schemas/Banana.md#banana1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/FruitReq.md b/samples/client/petstore/java/docs/components/schemas/FruitReq.md index 43e236cc661..8be595567b7 100644 --- a/samples/client/petstore/java/docs/components/schemas/FruitReq.md +++ b/samples/client/petstore/java/docs/components/schemas/FruitReq.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [AppleReq.AppleReq1.class](../../components/schemas/AppleReq.md#applereq1),
        [BananaReq.BananaReq1.class](../../components/schemas/BananaReq.md#bananareq1)
    )))
)); | +| List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [AppleReq.AppleReq1.class](../../components/schemas/AppleReq.md#applereq1),
        [BananaReq.BananaReq1.class](../../components/schemas/BananaReq.md#bananareq1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/GmFruit.md b/samples/client/petstore/java/docs/components/schemas/GmFruit.md index 59ce04e4e9e..a5794102754 100644 --- a/samples/client/petstore/java/docs/components/schemas/GmFruit.md +++ b/samples/client/petstore/java/docs/components/schemas/GmFruit.md @@ -26,7 +26,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("color", [Color.class](#color)))
    ))),
    new KeywordEntry("anyOf", new AnyOfValidator(List.of(
        [Apple.Apple1.class](../../components/schemas/Apple.md#apple1),
        [Banana.Banana1.class](../../components/schemas/Banana.md#banana1)
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("color", [Color.class](#color)))
    )
| +| List> |     anyOf = List.of(
        [Apple.Apple1.class](../../components/schemas/Apple.md#apple1),
        [Banana.Banana1.class](../../components/schemas/Banana.md#banana1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/GrandparentAnimal.md b/samples/client/petstore/java/docs/components/schemas/GrandparentAnimal.md index db60ce6f13a..8a8810bad0f 100644 --- a/samples/client/petstore/java/docs/components/schemas/GrandparentAnimal.md +++ b/samples/client/petstore/java/docs/components/schemas/GrandparentAnimal.md @@ -54,7 +54,9 @@ GrandparentAnimal.GrandparentAnimalMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("pet_type", [PetType.class](#pettype)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "pet_type"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("pet_type", [PetType.class](#pettype)))
    )
| +| Set |     required = Set.of(
        "pet_type"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/HasOnlyReadOnly.md b/samples/client/petstore/java/docs/components/schemas/HasOnlyReadOnly.md index 3ffc881f16f..4b40d0d0961 100644 --- a/samples/client/petstore/java/docs/components/schemas/HasOnlyReadOnly.md +++ b/samples/client/petstore/java/docs/components/schemas/HasOnlyReadOnly.md @@ -59,7 +59,8 @@ HasOnlyReadOnly.HasOnlyReadOnlyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar))),
        new PropertyEntry("foo", [Foo.class](#foo)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar))),
        new PropertyEntry("foo", [Foo.class](#foo)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/HealthCheckResult.md b/samples/client/petstore/java/docs/components/schemas/HealthCheckResult.md index 4b685de524d..1e64bfdfd7c 100644 --- a/samples/client/petstore/java/docs/components/schemas/HealthCheckResult.md +++ b/samples/client/petstore/java/docs/components/schemas/HealthCheckResult.md @@ -57,7 +57,8 @@ HealthCheckResult.HealthCheckResultMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("NullableMessage", [NullableMessage.class](#nullablemessage)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("NullableMessage", [NullableMessage.class](#nullablemessage)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -126,7 +127,7 @@ String validatedPayload = HealthCheckResult.NullableMessage.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        String.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        String.class
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/IntegerEnum.md b/samples/client/petstore/java/docs/components/schemas/IntegerEnum.md index 1fc50a786ce..8fd64e7900d 100644 --- a/samples/client/petstore/java/docs/components/schemas/IntegerEnum.md +++ b/samples/client/petstore/java/docs/components/schemas/IntegerEnum.md @@ -45,7 +45,8 @@ long validatedPayload = IntegerEnum.IntegerEnum1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        0,        1,        2)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        0,        1,        2)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/IntegerEnumBig.md b/samples/client/petstore/java/docs/components/schemas/IntegerEnumBig.md index 876ff1215b4..058ba1ba272 100644 --- a/samples/client/petstore/java/docs/components/schemas/IntegerEnumBig.md +++ b/samples/client/petstore/java/docs/components/schemas/IntegerEnumBig.md @@ -45,7 +45,8 @@ long validatedPayload = IntegerEnumBig.IntegerEnumBig1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        10,        11,        12)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        10,        11,        12)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/IntegerEnumOneValue.md b/samples/client/petstore/java/docs/components/schemas/IntegerEnumOneValue.md index bcbfdb99135..257665a087e 100644 --- a/samples/client/petstore/java/docs/components/schemas/IntegerEnumOneValue.md +++ b/samples/client/petstore/java/docs/components/schemas/IntegerEnumOneValue.md @@ -45,7 +45,8 @@ long validatedPayload = IntegerEnumOneValue.IntegerEnumOneValue1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        0)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        0)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/IntegerEnumWithDefaultValue.md b/samples/client/petstore/java/docs/components/schemas/IntegerEnumWithDefaultValue.md index 3cd7a24f438..7393c48bde9 100644 --- a/samples/client/petstore/java/docs/components/schemas/IntegerEnumWithDefaultValue.md +++ b/samples/client/petstore/java/docs/components/schemas/IntegerEnumWithDefaultValue.md @@ -45,7 +45,8 @@ long validatedPayload = IntegerEnumWithDefaultValue.IntegerEnumWithDefaultValue1 ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        0,        1,        2)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        0,        1,        2)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/IntegerMax10.md b/samples/client/petstore/java/docs/components/schemas/IntegerMax10.md index 21a1ecd2259..99b7ba9ac67 100644 --- a/samples/client/petstore/java/docs/components/schemas/IntegerMax10.md +++ b/samples/client/petstore/java/docs/components/schemas/IntegerMax10.md @@ -45,7 +45,9 @@ long validatedPayload = IntegerMax10.IntegerMax101.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("maximum", new MaximumValidator(10))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int64";
| +| Number |     maximum = 10
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/IntegerMin15.md b/samples/client/petstore/java/docs/components/schemas/IntegerMin15.md index bf5f5bbc55e..9d6faae128e 100644 --- a/samples/client/petstore/java/docs/components/schemas/IntegerMin15.md +++ b/samples/client/petstore/java/docs/components/schemas/IntegerMin15.md @@ -45,7 +45,9 @@ long validatedPayload = IntegerMin15.IntegerMin151.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int64";
| +| Number |     minimum = 15
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/IsoscelesTriangle.md b/samples/client/petstore/java/docs/components/schemas/IsoscelesTriangle.md index 1453fc11231..3a1c5fbc702 100644 --- a/samples/client/petstore/java/docs/components/schemas/IsoscelesTriangle.md +++ b/samples/client/petstore/java/docs/components/schemas/IsoscelesTriangle.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [TriangleInterface.TriangleInterface1.class](../../components/schemas/TriangleInterface.md#triangleinterface1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [TriangleInterface.TriangleInterface1.class](../../components/schemas/TriangleInterface.md#triangleinterface1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ IsoscelesTriangle.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -142,7 +143,8 @@ String validatedPayload = IsoscelesTriangle.TriangleType.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "IsoscelesTriangle"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "IsoscelesTriangle"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Items.md b/samples/client/petstore/java/docs/components/schemas/Items.md index c33a32cb887..fefa1a15db8 100644 --- a/samples/client/petstore/java/docs/components/schemas/Items.md +++ b/samples/client/petstore/java/docs/components/schemas/Items.md @@ -53,7 +53,8 @@ Items.ItemsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items2.class](#items2)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequest.md b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequest.md index 2689bd522cb..8a0198be55e 100644 --- a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequest.md +++ b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequest.md @@ -50,7 +50,8 @@ JSONPatchRequest.JSONPatchRequestList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | @@ -88,7 +89,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [JSONPatchRequestAddReplaceTest.JSONPatchRequestAddReplaceTest1.class](../../components/schemas/JSONPatchRequestAddReplaceTest.md#jsonpatchrequestaddreplacetest1),
        [JSONPatchRequestRemove.JSONPatchRequestRemove1.class](../../components/schemas/JSONPatchRequestRemove.md#jsonpatchrequestremove1),
        [JSONPatchRequestMoveCopy.JSONPatchRequestMoveCopy1.class](../../components/schemas/JSONPatchRequestMoveCopy.md#jsonpatchrequestmovecopy1)
    )))
)); | +| List> |     oneOf = List.of(
        [JSONPatchRequestAddReplaceTest.JSONPatchRequestAddReplaceTest1.class](../../components/schemas/JSONPatchRequestAddReplaceTest.md#jsonpatchrequestaddreplacetest1),
        [JSONPatchRequestRemove.JSONPatchRequestRemove1.class](../../components/schemas/JSONPatchRequestRemove.md#jsonpatchrequestremove1),
        [JSONPatchRequestMoveCopy.JSONPatchRequestMoveCopy1.class](../../components/schemas/JSONPatchRequestMoveCopy.md#jsonpatchrequestmovecopy1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestAddReplaceTest.md b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestAddReplaceTest.md index da59889106e..c2186816132 100644 --- a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestAddReplaceTest.md +++ b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestAddReplaceTest.md @@ -61,7 +61,10 @@ JSONPatchRequestAddReplaceTest.JSONPatchRequestAddReplaceTestMap validatedPayloa ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("path", [Path.class](#path))),
        new PropertyEntry("value", [Value.class](#value))),
        new PropertyEntry("op", [Op.class](#op)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "op",
        "path",
        "value"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("path", [Path.class](#path))),
        new PropertyEntry("value", [Value.class](#value))),
        new PropertyEntry("op", [Op.class](#op)))
    )
| +| Set |     required = Set.of(
        "op",
        "path",
        "value"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -129,7 +132,8 @@ String validatedPayload = JSONPatchRequestAddReplaceTest.Op.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "add",
        "replace",
        "test"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "add",
        "replace",
        "test"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestMoveCopy.md b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestMoveCopy.md index f6924ab4d40..6738b4f4a09 100644 --- a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestMoveCopy.md +++ b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestMoveCopy.md @@ -65,7 +65,10 @@ JSONPatchRequestMoveCopy.JSONPatchRequestMoveCopyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("from", [From.class](#from))),
        new PropertyEntry("path", [Path.class](#path))),
        new PropertyEntry("op", [Op.class](#op)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "from",
        "op",
        "path"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("from", [From.class](#from))),
        new PropertyEntry("path", [Path.class](#path))),
        new PropertyEntry("op", [Op.class](#op)))
    )
| +| Set |     required = Set.of(
        "from",
        "op",
        "path"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -133,7 +136,8 @@ String validatedPayload = JSONPatchRequestMoveCopy.Op.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "move",
        "copy"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "move",
        "copy"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestRemove.md b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestRemove.md index 61822fa6c7d..f1ae621c925 100644 --- a/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestRemove.md +++ b/samples/client/petstore/java/docs/components/schemas/JSONPatchRequestRemove.md @@ -60,7 +60,10 @@ JSONPatchRequestRemove.JSONPatchRequestRemoveMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("path", [Path.class](#path))),
        new PropertyEntry("op", [Op.class](#op)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "op",
        "path"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("path", [Path.class](#path))),
        new PropertyEntry("op", [Op.class](#op)))
    )
| +| Set |     required = Set.of(
        "op",
        "path"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -126,7 +129,8 @@ String validatedPayload = JSONPatchRequestRemove.Op.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "remove"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "remove"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Mammal.md b/samples/client/petstore/java/docs/components/schemas/Mammal.md index aea1a7d5452..1bf7bb3a3df 100644 --- a/samples/client/petstore/java/docs/components/schemas/Mammal.md +++ b/samples/client/petstore/java/docs/components/schemas/Mammal.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Whale.Whale1.class](../../components/schemas/Whale.md#whale1),
        [Zebra.Zebra1.class](../../components/schemas/Zebra.md#zebra1),
        [Pig.Pig1.class](../../components/schemas/Pig.md#pig1)
    )))
)); | +| List> |     oneOf = List.of(
        [Whale.Whale1.class](../../components/schemas/Whale.md#whale1),
        [Zebra.Zebra1.class](../../components/schemas/Zebra.md#zebra1),
        [Pig.Pig1.class](../../components/schemas/Pig.md#pig1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/MapTest.md b/samples/client/petstore/java/docs/components/schemas/MapTest.md index 26278ad4b25..705883f43eb 100644 --- a/samples/client/petstore/java/docs/components/schemas/MapTest.md +++ b/samples/client/petstore/java/docs/components/schemas/MapTest.md @@ -79,7 +79,8 @@ MapTest.MapTestMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("map_map_of_string", [MapMapOfString.class](#mapmapofstring))),
        new PropertyEntry("map_of_enum_string", [MapOfEnumString.class](#mapofenumstring))),
        new PropertyEntry("direct_map", [DirectMap.class](#directmap))),
        new PropertyEntry("indirect_map", [StringBooleanMap.StringBooleanMap1.class](../../components/schemas/StringBooleanMap.md#stringbooleanmap1))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("map_map_of_string", [MapMapOfString.class](#mapmapofstring))),
        new PropertyEntry("map_of_enum_string", [MapOfEnumString.class](#mapofenumstring))),
        new PropertyEntry("direct_map", [DirectMap.class](#directmap))),
        new PropertyEntry("indirect_map", [StringBooleanMap.StringBooleanMap1.class](../../components/schemas/StringBooleanMap.md#stringbooleanmap1))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -150,7 +151,8 @@ MapTest.DirectMapMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties3.class](#additionalproperties3)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties3.class](#additionalproperties3)
| ### Method Summary | Modifier and Type | Method and Description | @@ -223,7 +225,8 @@ MapTest.MapOfEnumStringMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties2.class](#additionalproperties2)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties2.class](#additionalproperties2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -284,7 +287,8 @@ String validatedPayload = MapTest.AdditionalProperties2.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "UPPER",
        "lower"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "UPPER",
        "lower"
)
| ### Method Summary | Modifier and Type | Method and Description | @@ -324,7 +328,8 @@ MapTest.MapMapOfStringMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -387,7 +392,8 @@ MapTest.AdditionalPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties1.class](#additionalproperties1)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties1.class](#additionalproperties1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md index 2d4091d75e6..1c67ed5acee 100644 --- a/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md @@ -67,7 +67,8 @@ MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalProperti ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
        new PropertyEntry("dateTime", [DateTime.class](#datetime))),
        new PropertyEntry("map", [MapSchema.class](#mapschema)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
        new PropertyEntry("dateTime", [DateTime.class](#datetime))),
        new PropertyEntry("map", [MapSchema.class](#mapschema)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -135,7 +136,8 @@ MixedPropertiesAndAdditionalPropertiesClass.MapMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([Animal.Animal1.class](../../components/schemas/Animal.md#animal1))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [Animal.Animal1.class](../../components/schemas/Animal.md#animal1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Money.md b/samples/client/petstore/java/docs/components/schemas/Money.md index 985abebcd33..0e246286ab3 100644 --- a/samples/client/petstore/java/docs/components/schemas/Money.md +++ b/samples/client/petstore/java/docs/components/schemas/Money.md @@ -59,7 +59,10 @@ Money.MoneyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("amount", [Amount.class](#amount))),
        new PropertyEntry("currency", [Currency.Currency1.class](../../components/schemas/Currency.md#currency1))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "amount",
        "currency"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("amount", [Amount.class](#amount))),
        new PropertyEntry("currency", [Currency.Currency1.class](../../components/schemas/Currency.md#currency1))
    )
| +| Set |     required = Set.of(
        "amount",
        "currency"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/MyObjectDto.md b/samples/client/petstore/java/docs/components/schemas/MyObjectDto.md index 4307f1be28d..249a1b11ae1 100644 --- a/samples/client/petstore/java/docs/components/schemas/MyObjectDto.md +++ b/samples/client/petstore/java/docs/components/schemas/MyObjectDto.md @@ -55,7 +55,9 @@ MyObjectDto.MyObjectDtoMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id)))
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id)))
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Name.md b/samples/client/petstore/java/docs/components/schemas/Name.md index 74d66de461c..2849dba316d 100644 --- a/samples/client/petstore/java/docs/components/schemas/Name.md +++ b/samples/client/petstore/java/docs/components/schemas/Name.md @@ -31,7 +31,8 @@ Model for testing model name same as property name ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("name", [Name2.class](#name2))),
        new PropertyEntry("snake_case", [SnakeCase.class](#snakecase))),
        new PropertyEntry("property", [Property.class](#property)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "name"
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("name", [Name2.class](#name2))),
        new PropertyEntry("snake_case", [SnakeCase.class](#snakecase))),
        new PropertyEntry("property", [Property.class](#property)))
    )
| +| Set |     required = Set.of(
        "name"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/NoAdditionalProperties.md b/samples/client/petstore/java/docs/components/schemas/NoAdditionalProperties.md index e9785e5c74d..164a3bffae3 100644 --- a/samples/client/petstore/java/docs/components/schemas/NoAdditionalProperties.md +++ b/samples/client/petstore/java/docs/components/schemas/NoAdditionalProperties.md @@ -60,7 +60,10 @@ NoAdditionalProperties.NoAdditionalPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("petId", [PetId.class](#petid)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "id"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("petId", [PetId.class](#petid)))
    )
| +| Set |     required = Set.of(
        "id"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/NullableClass.md b/samples/client/petstore/java/docs/components/schemas/NullableClass.md index 7295841e1c7..044e579d522 100644 --- a/samples/client/petstore/java/docs/components/schemas/NullableClass.md +++ b/samples/client/petstore/java/docs/components/schemas/NullableClass.md @@ -131,7 +131,9 @@ NullableClass.NullableClassMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("integer_prop", [IntegerProp.class](#integerprop))),
        new PropertyEntry("number_prop", [NumberProp.class](#numberprop))),
        new PropertyEntry("boolean_prop", [BooleanProp.class](#booleanprop))),
        new PropertyEntry("string_prop", [StringProp.class](#stringprop))),
        new PropertyEntry("date_prop", [DateProp.class](#dateprop))),
        new PropertyEntry("datetime_prop", [DatetimeProp.class](#datetimeprop))),
        new PropertyEntry("array_nullable_prop", [ArrayNullableProp.class](#arraynullableprop))),
        new PropertyEntry("array_and_items_nullable_prop", [ArrayAndItemsNullableProp.class](#arrayanditemsnullableprop))),
        new PropertyEntry("array_items_nullable", [ArrayItemsNullable.class](#arrayitemsnullable))),
        new PropertyEntry("object_nullable_prop", [ObjectNullableProp.class](#objectnullableprop))),
        new PropertyEntry("object_and_items_nullable_prop", [ObjectAndItemsNullableProp.class](#objectanditemsnullableprop))),
        new PropertyEntry("object_items_nullable", [ObjectItemsNullable.class](#objectitemsnullable)))
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties3.class](#additionalproperties3)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("integer_prop", [IntegerProp.class](#integerprop))),
        new PropertyEntry("number_prop", [NumberProp.class](#numberprop))),
        new PropertyEntry("boolean_prop", [BooleanProp.class](#booleanprop))),
        new PropertyEntry("string_prop", [StringProp.class](#stringprop))),
        new PropertyEntry("date_prop", [DateProp.class](#dateprop))),
        new PropertyEntry("datetime_prop", [DatetimeProp.class](#datetimeprop))),
        new PropertyEntry("array_nullable_prop", [ArrayNullableProp.class](#arraynullableprop))),
        new PropertyEntry("array_and_items_nullable_prop", [ArrayAndItemsNullableProp.class](#arrayanditemsnullableprop))),
        new PropertyEntry("array_items_nullable", [ArrayItemsNullable.class](#arrayitemsnullable))),
        new PropertyEntry("object_nullable_prop", [ObjectNullableProp.class](#objectnullableprop))),
        new PropertyEntry("object_and_items_nullable_prop", [ObjectAndItemsNullableProp.class](#objectanditemsnullableprop))),
        new PropertyEntry("object_items_nullable", [ObjectItemsNullable.class](#objectitemsnullable)))
    )
| +| Class |     additionalProperties = [AdditionalProperties3.class](#additionalproperties3)
| ### Method Summary | Modifier and Type | Method and Description | @@ -218,7 +220,8 @@ NullableClass.ObjectItemsNullableMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties2.class](#additionalproperties2)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties2.class](#additionalproperties2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -279,7 +282,7 @@ Void validatedPayload = NullableClass.AdditionalProperties2.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -326,7 +329,8 @@ NullableClass.ObjectAndItemsNullablePropMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties1.class](#additionalproperties1)))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| +| Class |     additionalProperties = [AdditionalProperties1.class](#additionalproperties1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -388,7 +392,7 @@ Void validatedPayload = NullableClass.AdditionalProperties1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -435,7 +439,8 @@ NullableClass.ObjectNullablePropMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -510,7 +515,8 @@ NullableClass.ArrayItemsNullableList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items2.class](#items2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -570,7 +576,7 @@ Void validatedPayload = NullableClass.Items2.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -618,7 +624,8 @@ NullableClass.ArrayAndItemsNullablePropList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenList.class
    ))),
    new KeywordEntry("items", new ItemsValidator([Items1.class](#items1)))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenList.class
    )
| +| Class |     items = [Items1.class](#items1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -679,7 +686,7 @@ Void validatedPayload = NullableClass.Items1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -726,7 +733,8 @@ NullableClass.ArrayNullablePropList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenList.class
    ))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenList.class
    )
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | @@ -803,7 +811,8 @@ String validatedPayload = NullableClass.DatetimeProp.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("date-time"))
)); | +| Set> |     type = Set.of(
        Void.class,
        String.class
    )
| +| String |     type = "date-time";
| ### Method Summary | Modifier and Type | Method and Description | @@ -848,7 +857,8 @@ String validatedPayload = NullableClass.DateProp.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("date"))
)); | +| Set> |     type = Set.of(
        Void.class,
        String.class
    )
| +| String |     type = "date";
| ### Method Summary | Modifier and Type | Method and Description | @@ -893,7 +903,7 @@ String validatedPayload = NullableClass.StringProp.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        String.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        String.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -938,7 +948,7 @@ boolean validatedPayload = NullableClass.BooleanProp.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        Boolean.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        Boolean.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -983,7 +993,7 @@ int validatedPayload = NullableClass.NumberProp.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -1028,7 +1038,7 @@ long validatedPayload = NullableClass.IntegerProp.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -1067,7 +1077,7 @@ Void validatedPayload = NullableClass.AdditionalProperties3.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/NullableShape.md b/samples/client/petstore/java/docs/components/schemas/NullableShape.md index ec275b8e0db..0ecc782ff56 100644 --- a/samples/client/petstore/java/docs/components/schemas/NullableShape.md +++ b/samples/client/petstore/java/docs/components/schemas/NullableShape.md @@ -27,7 +27,7 @@ The value may be a shape or the 'null' value. For a composed schema to ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Triangle.Triangle1.class](../../components/schemas/Triangle.md#triangle1),
        [Quadrilateral.Quadrilateral1.class](../../components/schemas/Quadrilateral.md#quadrilateral1),
        [Schema2.class](#schema2)
    )))
)); | +| List> |     oneOf = List.of(
        [Triangle.Triangle1.class](../../components/schemas/Triangle.md#triangle1),
        [Quadrilateral.Quadrilateral1.class](../../components/schemas/Quadrilateral.md#quadrilateral1),
        [Schema2.class](#schema2)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/NullableString.md b/samples/client/petstore/java/docs/components/schemas/NullableString.md index 2170419b4d6..34706497550 100644 --- a/samples/client/petstore/java/docs/components/schemas/NullableString.md +++ b/samples/client/petstore/java/docs/components/schemas/NullableString.md @@ -51,7 +51,7 @@ String validatedPayload = NullableString.NullableString1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        String.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        String.class
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/NumberOnly.md b/samples/client/petstore/java/docs/components/schemas/NumberOnly.md index 9b021962d56..c9a704f5790 100644 --- a/samples/client/petstore/java/docs/components/schemas/NumberOnly.md +++ b/samples/client/petstore/java/docs/components/schemas/NumberOnly.md @@ -54,7 +54,8 @@ NumberOnly.NumberOnlyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("JustNumber", [JustNumber.class](#justnumber)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("JustNumber", [JustNumber.class](#justnumber)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/NumberWithExclusiveMinMax.md b/samples/client/petstore/java/docs/components/schemas/NumberWithExclusiveMinMax.md index 5622f817405..fe3066b16ee 100644 --- a/samples/client/petstore/java/docs/components/schemas/NumberWithExclusiveMinMax.md +++ b/samples/client/petstore/java/docs/components/schemas/NumberWithExclusiveMinMax.md @@ -45,7 +45,9 @@ int validatedPayload = NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1.vali ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("exclusiveMaximum", new ExclusiveMaximumValidator(12)),
    new KeywordEntry("exclusiveMinimum", new ExclusiveMinimumValidator(10))
)); | +| Set> |     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 | diff --git a/samples/client/petstore/java/docs/components/schemas/NumberWithValidations.md b/samples/client/petstore/java/docs/components/schemas/NumberWithValidations.md index e78820719b8..887bbbac0d3 100644 --- a/samples/client/petstore/java/docs/components/schemas/NumberWithValidations.md +++ b/samples/client/petstore/java/docs/components/schemas/NumberWithValidations.md @@ -45,7 +45,9 @@ int validatedPayload = NumberWithValidations.NumberWithValidations1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("maximum", new MaximumValidator(20)),
    new KeywordEntry("minimum", new MinimumValidator(10))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Number |     maximum = 20
| +| Number |     minimum = 10
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredProps.md b/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredProps.md index e0b8dae903b..1b70ece00ad 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredProps.md @@ -54,7 +54,10 @@ ObjWithRequiredProps.ObjWithRequiredPropsMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "a"
    ))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [ObjWithRequiredPropsBase.ObjWithRequiredPropsBase1.class](../../components/schemas/ObjWithRequiredPropsBase.md#objwithrequiredpropsbase1)
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    )
| +| Set |     required = Set.of(
        "a"
    )
| +| List> |     allOf = List.of(
        [ObjWithRequiredPropsBase.ObjWithRequiredPropsBase1.class](../../components/schemas/ObjWithRequiredPropsBase.md#objwithrequiredpropsbase1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredPropsBase.md b/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredPropsBase.md index b30d347f99e..5f82de2794b 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredPropsBase.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjWithRequiredPropsBase.md @@ -54,7 +54,9 @@ ObjWithRequiredPropsBase.ObjWithRequiredPropsBaseMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("b", [B.class](#b)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "b"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("b", [B.class](#b)))
    )
| +| Set |     required = Set.of(
        "b"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithArgAndArgsProperties.md b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithArgAndArgsProperties.md index 2af05f338bf..26cf1f7a982 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithArgAndArgsProperties.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithArgAndArgsProperties.md @@ -59,7 +59,9 @@ ObjectModelWithArgAndArgsProperties.ObjectModelWithArgAndArgsPropertiesMap valid ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("arg", [Arg.class](#arg))),
        new PropertyEntry("args", [Args.class](#args)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "arg",
        "args"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("arg", [Arg.class](#arg))),
        new PropertyEntry("args", [Args.class](#args)))
    )
| +| Set |     required = Set.of(
        "arg",
        "args"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md index add91662616..e0510a3cefc 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md @@ -52,7 +52,8 @@ ObjectModelWithRefProps.ObjectModelWithRefPropsMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("myNumber", [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1)),
        new PropertyEntry("myString", [StringSchema.StringSchema1.class](../../components/schemas/StringSchema.md#stringschema1)),
        new PropertyEntry("myBoolean", [BooleanSchema.BooleanSchema1.class](../../components/schemas/BooleanSchema.md#booleanschema1))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("myNumber", [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1)),
        new PropertyEntry("myString", [StringSchema.StringSchema1.class](../../components/schemas/StringSchema.md#stringschema1)),
        new PropertyEntry("myBoolean", [BooleanSchema.BooleanSchema1.class](../../components/schemas/BooleanSchema.md#booleanschema1))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md index 90ea02151cc..3db99710a1b 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [ObjectWithOptionalTestProp.ObjectWithOptionalTestProp1.class](../../components/schemas/ObjectWithOptionalTestProp.md#objectwithoptionaltestprop1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [ObjectWithOptionalTestProp.ObjectWithOptionalTestProp1.class](../../components/schemas/ObjectWithOptionalTestProp.md#objectwithoptionaltestprop1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,9 @@ ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "test"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name)))
    )
| +| Set |     required = Set.of(
        "test"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithCollidingProperties.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithCollidingProperties.md index f91aef536bb..133ea768aea 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithCollidingProperties.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithCollidingProperties.md @@ -54,7 +54,8 @@ ObjectWithCollidingProperties.ObjectWithCollidingPropertiesMap validatedPayload ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop))),
        new PropertyEntry("someprop", [Someprop.class](#someprop)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop))),
        new PropertyEntry("someprop", [Someprop.class](#someprop)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithDecimalProperties.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithDecimalProperties.md index b609774a45b..5214beac312 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithDecimalProperties.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithDecimalProperties.md @@ -71,7 +71,8 @@ ObjectWithDecimalProperties.ObjectWithDecimalPropertiesMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("length", [DecimalPayload.DecimalPayload1.class](../../components/schemas/DecimalPayload.md#decimalpayload1)),
        new PropertyEntry("width", [Width.class](#width))),
        new PropertyEntry("cost", [Money.Money1.class](../../components/schemas/Money.md#money1))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("length", [DecimalPayload.DecimalPayload1.class](../../components/schemas/DecimalPayload.md#decimalpayload1)),
        new PropertyEntry("width", [Width.class](#width))),
        new PropertyEntry("cost", [Money.Money1.class](../../components/schemas/Money.md#money1))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithDifficultlyNamedProps.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithDifficultlyNamedProps.md index af34a2eb83b..44a4c42cbd5 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithDifficultlyNamedProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithDifficultlyNamedProps.md @@ -67,7 +67,9 @@ ObjectWithDifficultlyNamedProps.ObjectWithDifficultlyNamedPropsMap validatedPayl ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("$special[property.name]", [Specialpropertyname.class](#specialpropertyname))),
        new PropertyEntry("123-list", [Schema123list.class](#schema123list))),
        new PropertyEntry("123Number", [Schema123Number.class](#schema123number)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "123-list"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("$special[property.name]", [Specialpropertyname.class](#specialpropertyname))),
        new PropertyEntry("123-list", [Schema123list.class](#schema123list))),
        new PropertyEntry("123Number", [Schema123Number.class](#schema123number)))
    )
| +| Set |     required = Set.of(
        "123-list"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithInlineCompositionProperty.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithInlineCompositionProperty.md index b9e67ac9d8d..1fef2dd7d14 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithInlineCompositionProperty.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithInlineCompositionProperty.md @@ -51,7 +51,8 @@ ObjectWithInlineCompositionProperty.ObjectWithInlineCompositionPropertyMap valid ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -92,7 +93,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -138,7 +139,8 @@ String validatedPayload = ObjectWithInlineCompositionProperty.Schema0.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithInvalidNamedRefedProperties.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithInvalidNamedRefedProperties.md index 796a7daa36b..75b31775a64 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithInvalidNamedRefedProperties.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithInvalidNamedRefedProperties.md @@ -68,7 +68,9 @@ ObjectWithInvalidNamedRefedProperties.ObjectWithInvalidNamedRefedPropertiesMap v ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("from", [FromSchema.FromSchema1.class](../../components/schemas/FromSchema.md#fromschema1)),
        new PropertyEntry("!reference", [ArrayWithValidationsInItems.ArrayWithValidationsInItems1.class](../../components/schemas/ArrayWithValidationsInItems.md#arraywithvalidationsinitems1))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "!reference",
        "from"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("from", [FromSchema.FromSchema1.class](../../components/schemas/FromSchema.md#fromschema1)),
        new PropertyEntry("!reference", [ArrayWithValidationsInItems.ArrayWithValidationsInItems1.class](../../components/schemas/ArrayWithValidationsInItems.md#arraywithvalidationsinitems1))
    )
| +| Set |     required = Set.of(
        "!reference",
        "from"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithNonIntersectingValues.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithNonIntersectingValues.md index f582d05a673..fabb95ee11a 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithNonIntersectingValues.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithNonIntersectingValues.md @@ -55,7 +55,9 @@ ObjectWithNonIntersectingValues.ObjectWithNonIntersectingValuesMap validatedPayl ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithOnlyOptionalProps.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithOnlyOptionalProps.md index 00f6ae6049b..4e0f52a0794 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithOnlyOptionalProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithOnlyOptionalProps.md @@ -60,7 +60,9 @@ ObjectWithOnlyOptionalProps.ObjectWithOnlyOptionalPropsMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("a", [A.class](#a))),
        new PropertyEntry("b", [B.class](#b)))
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("a", [A.class](#a))),
        new PropertyEntry("b", [B.class](#b)))
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithOptionalTestProp.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithOptionalTestProp.md index 3991732ff5d..b7c1e6e198c 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithOptionalTestProp.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithOptionalTestProp.md @@ -54,7 +54,8 @@ ObjectWithOptionalTestProp.ObjectWithOptionalTestPropMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("test", [Test.class](#test)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("test", [Test.class](#test)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectWithValidations.md b/samples/client/petstore/java/docs/components/schemas/ObjectWithValidations.md index 78366422867..9fe5ddd7f68 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectWithValidations.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectWithValidations.md @@ -23,7 +23,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("minProperties", new MinPropertiesValidator(2))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Integer |     minProperties = 2
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Order.md b/samples/client/petstore/java/docs/components/schemas/Order.md index 1b4f931a48e..06b53d365eb 100644 --- a/samples/client/petstore/java/docs/components/schemas/Order.md +++ b/samples/client/petstore/java/docs/components/schemas/Order.md @@ -79,7 +79,8 @@ Order.OrderMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("petId", [PetId.class](#petid))),
        new PropertyEntry("quantity", [Quantity.class](#quantity))),
        new PropertyEntry("shipDate", [ShipDate.class](#shipdate))),
        new PropertyEntry("status", [Status.class](#status))),
        new PropertyEntry("complete", [Complete.class](#complete)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("petId", [PetId.class](#petid))),
        new PropertyEntry("quantity", [Quantity.class](#quantity))),
        new PropertyEntry("shipDate", [ShipDate.class](#shipdate))),
        new PropertyEntry("status", [Status.class](#status))),
        new PropertyEntry("complete", [Complete.class](#complete)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -165,7 +166,8 @@ String validatedPayload = Order.Status.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "placed",
        "approved",
        "delivered"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "placed",
        "approved",
        "delivered"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/PaginatedResultMyObjectDto.md b/samples/client/petstore/java/docs/components/schemas/PaginatedResultMyObjectDto.md index 3fc9dfe3f30..21fcb8e1e7b 100644 --- a/samples/client/petstore/java/docs/components/schemas/PaginatedResultMyObjectDto.md +++ b/samples/client/petstore/java/docs/components/schemas/PaginatedResultMyObjectDto.md @@ -63,7 +63,10 @@ PaginatedResultMyObjectDto.PaginatedResultMyObjectDtoMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("count", [Count.class](#count))),
        new PropertyEntry("results", [Results.class](#results)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "count",
        "results"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("count", [Count.class](#count))),
        new PropertyEntry("results", [Results.class](#results)))
    )
| +| Set |     required = Set.of(
        "count",
        "results"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -128,7 +131,8 @@ PaginatedResultMyObjectDto.ResultsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([MyObjectDto.MyObjectDto1.class](../../components/schemas/MyObjectDto.md#myobjectdto1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [MyObjectDto.MyObjectDto1.class](../../components/schemas/MyObjectDto.md#myobjectdto1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ParentPet.md b/samples/client/petstore/java/docs/components/schemas/ParentPet.md index ff1e29ea4c8..ced458bef50 100644 --- a/samples/client/petstore/java/docs/components/schemas/ParentPet.md +++ b/samples/client/petstore/java/docs/components/schemas/ParentPet.md @@ -23,7 +23,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [GrandparentAnimal.GrandparentAnimal1.class](../../components/schemas/GrandparentAnimal.md#grandparentanimal1)
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| List> |     allOf = List.of(
        [GrandparentAnimal.GrandparentAnimal1.class](../../components/schemas/GrandparentAnimal.md#grandparentanimal1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Pet.md b/samples/client/petstore/java/docs/components/schemas/Pet.md index 257f898927e..55a6623dd97 100644 --- a/samples/client/petstore/java/docs/components/schemas/Pet.md +++ b/samples/client/petstore/java/docs/components/schemas/Pet.md @@ -104,7 +104,9 @@ Pet.PetMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("category", [Category.Category1.class](../../components/schemas/Category.md#category1)),
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("photoUrls", [PhotoUrls.class](#photourls))),
        new PropertyEntry("tags", [Tags.class](#tags))),
        new PropertyEntry("status", [Status.class](#status)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "name",
        "photoUrls"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("category", [Category.Category1.class](../../components/schemas/Category.md#category1)),
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("photoUrls", [PhotoUrls.class](#photourls))),
        new PropertyEntry("tags", [Tags.class](#tags))),
        new PropertyEntry("status", [Status.class](#status)))
    )
| +| Set |     required = Set.of(
        "name",
        "photoUrls"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -189,7 +191,8 @@ Pet.TagsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Tag.Tag1.class](../../components/schemas/Tag.md#tag1))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Tag.Tag1.class](../../components/schemas/Tag.md#tag1)
| ### Method Summary | Modifier and Type | Method and Description | @@ -252,7 +255,8 @@ String validatedPayload = Pet.Status.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "available",
        "pending",
        "sold"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "available",
        "pending",
        "sold"
)
| ### Method Summary | Modifier and Type | Method and Description | @@ -293,7 +297,8 @@ Pet.PhotoUrlsList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Pig.md b/samples/client/petstore/java/docs/components/schemas/Pig.md index a71d9176e96..e08080d95af 100644 --- a/samples/client/petstore/java/docs/components/schemas/Pig.md +++ b/samples/client/petstore/java/docs/components/schemas/Pig.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [BasquePig.BasquePig1.class](../../components/schemas/BasquePig.md#basquepig1),
        [DanishPig.DanishPig1.class](../../components/schemas/DanishPig.md#danishpig1)
    )))
)); | +| List> |     oneOf = List.of(
        [BasquePig.BasquePig1.class](../../components/schemas/BasquePig.md#basquepig1),
        [DanishPig.DanishPig1.class](../../components/schemas/DanishPig.md#danishpig1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Player.md b/samples/client/petstore/java/docs/components/schemas/Player.md index 005dfc8bde5..2e3a744d606 100644 --- a/samples/client/petstore/java/docs/components/schemas/Player.md +++ b/samples/client/petstore/java/docs/components/schemas/Player.md @@ -57,7 +57,8 @@ Player.PlayerMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("enemyPlayer", [Player1.class](#player1)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("enemyPlayer", [Player1.class](#player1)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/PublicKey.md b/samples/client/petstore/java/docs/components/schemas/PublicKey.md index fb7585970b7..d4d9f280509 100644 --- a/samples/client/petstore/java/docs/components/schemas/PublicKey.md +++ b/samples/client/petstore/java/docs/components/schemas/PublicKey.md @@ -57,7 +57,8 @@ PublicKey.PublicKeyMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("key", [Key.class](#key)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("key", [Key.class](#key)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Quadrilateral.md b/samples/client/petstore/java/docs/components/schemas/Quadrilateral.md index ef4864f5f02..d095a900b8a 100644 --- a/samples/client/petstore/java/docs/components/schemas/Quadrilateral.md +++ b/samples/client/petstore/java/docs/components/schemas/Quadrilateral.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [SimpleQuadrilateral.SimpleQuadrilateral1.class](../../components/schemas/SimpleQuadrilateral.md#simplequadrilateral1),
        [ComplexQuadrilateral.ComplexQuadrilateral1.class](../../components/schemas/ComplexQuadrilateral.md#complexquadrilateral1)
    )))
)); | +| List> |     oneOf = List.of(
        [SimpleQuadrilateral.SimpleQuadrilateral1.class](../../components/schemas/SimpleQuadrilateral.md#simplequadrilateral1),
        [ComplexQuadrilateral.ComplexQuadrilateral1.class](../../components/schemas/ComplexQuadrilateral.md#complexquadrilateral1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/QuadrilateralInterface.md b/samples/client/petstore/java/docs/components/schemas/QuadrilateralInterface.md index c4f17b696d1..e60743ef024 100644 --- a/samples/client/petstore/java/docs/components/schemas/QuadrilateralInterface.md +++ b/samples/client/petstore/java/docs/components/schemas/QuadrilateralInterface.md @@ -27,7 +27,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("shapeType", [ShapeType.class](#shapetype))),
        new PropertyEntry("quadrilateralType", [QuadrilateralType.class](#quadrilateraltype)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "quadrilateralType",
        "shapeType"
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("shapeType", [ShapeType.class](#shapetype))),
        new PropertyEntry("quadrilateralType", [QuadrilateralType.class](#quadrilateraltype)))
    )
| +| Set |     required = Set.of(
        "quadrilateralType",
        "shapeType"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -110,7 +111,8 @@ String validatedPayload = QuadrilateralInterface.ShapeType.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "Quadrilateral"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "Quadrilateral"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ReadOnlyFirst.md b/samples/client/petstore/java/docs/components/schemas/ReadOnlyFirst.md index 5e0a15d8acd..357980a52aa 100644 --- a/samples/client/petstore/java/docs/components/schemas/ReadOnlyFirst.md +++ b/samples/client/petstore/java/docs/components/schemas/ReadOnlyFirst.md @@ -59,7 +59,8 @@ ReadOnlyFirst.ReadOnlyFirstMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar))),
        new PropertyEntry("baz", [Baz.class](#baz)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("bar", [Bar.class](#bar))),
        new PropertyEntry("baz", [Baz.class](#baz)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ReqPropsFromExplicitAddProps.md b/samples/client/petstore/java/docs/components/schemas/ReqPropsFromExplicitAddProps.md index ff02da312b5..c79e7882e8c 100644 --- a/samples/client/petstore/java/docs/components/schemas/ReqPropsFromExplicitAddProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ReqPropsFromExplicitAddProps.md @@ -54,7 +54,9 @@ ReqPropsFromExplicitAddProps.ReqPropsFromExplicitAddPropsMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "invalid-name",
        "validName"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Set |     required = Set.of(
        "invalid-name",
        "validName"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ReqPropsFromTrueAddProps.md b/samples/client/petstore/java/docs/components/schemas/ReqPropsFromTrueAddProps.md index b95a28d4d40..97c5c856661 100644 --- a/samples/client/petstore/java/docs/components/schemas/ReqPropsFromTrueAddProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ReqPropsFromTrueAddProps.md @@ -50,7 +50,9 @@ ReqPropsFromTrueAddProps.ReqPropsFromTrueAddPropsMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "invalid-name",
        "validName"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Set |     required = Set.of(
        "invalid-name",
        "validName"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ReqPropsFromUnsetAddProps.md b/samples/client/petstore/java/docs/components/schemas/ReqPropsFromUnsetAddProps.md index d5342e7eaf3..8c77e3a4c22 100644 --- a/samples/client/petstore/java/docs/components/schemas/ReqPropsFromUnsetAddProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ReqPropsFromUnsetAddProps.md @@ -49,7 +49,8 @@ ReqPropsFromUnsetAddProps.ReqPropsFromUnsetAddPropsMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "invalid-name",
        "validName"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Set |     required = Set.of(
        "invalid-name",
        "validName"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ReturnSchema.md b/samples/client/petstore/java/docs/components/schemas/ReturnSchema.md index c6784411400..cfc91176fcc 100644 --- a/samples/client/petstore/java/docs/components/schemas/ReturnSchema.md +++ b/samples/client/petstore/java/docs/components/schemas/ReturnSchema.md @@ -29,7 +29,7 @@ Model for testing reserved words ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("return", [ReturnSchema2.class](#returnschema2)))
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("return", [ReturnSchema2.class](#returnschema2)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ScaleneTriangle.md b/samples/client/petstore/java/docs/components/schemas/ScaleneTriangle.md index d3d84f9902e..1b6e1e3f94d 100644 --- a/samples/client/petstore/java/docs/components/schemas/ScaleneTriangle.md +++ b/samples/client/petstore/java/docs/components/schemas/ScaleneTriangle.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [TriangleInterface.TriangleInterface1.class](../../components/schemas/TriangleInterface.md#triangleinterface1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [TriangleInterface.TriangleInterface1.class](../../components/schemas/TriangleInterface.md#triangleinterface1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ ScaleneTriangle.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -142,7 +143,8 @@ String validatedPayload = ScaleneTriangle.TriangleType.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "ScaleneTriangle"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "ScaleneTriangle"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Schema200Response.md b/samples/client/petstore/java/docs/components/schemas/Schema200Response.md index 62e87d72b02..d26b5bb917a 100644 --- a/samples/client/petstore/java/docs/components/schemas/Schema200Response.md +++ b/samples/client/petstore/java/docs/components/schemas/Schema200Response.md @@ -30,7 +30,7 @@ model with an invalid class name for python, starts with a number ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("class", [ClassSchema.class](#classschema)))
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("class", [ClassSchema.class](#classschema)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/SelfReferencingArrayModel.md b/samples/client/petstore/java/docs/components/schemas/SelfReferencingArrayModel.md index 3f8d5fca21a..7246af36d9e 100644 --- a/samples/client/petstore/java/docs/components/schemas/SelfReferencingArrayModel.md +++ b/samples/client/petstore/java/docs/components/schemas/SelfReferencingArrayModel.md @@ -49,7 +49,8 @@ SelfReferencingArrayModel.SelfReferencingArrayModelList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([SelfReferencingArrayModel1.class](#selfreferencingarraymodel1)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [SelfReferencingArrayModel1.class](#selfreferencingarraymodel1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/SelfReferencingObjectModel.md b/samples/client/petstore/java/docs/components/schemas/SelfReferencingObjectModel.md index 8eedd96879c..762ebc32a31 100644 --- a/samples/client/petstore/java/docs/components/schemas/SelfReferencingObjectModel.md +++ b/samples/client/petstore/java/docs/components/schemas/SelfReferencingObjectModel.md @@ -49,7 +49,9 @@ SelfReferencingObjectModel.SelfReferencingObjectModelMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("selfRef", [SelfReferencingObjectModel1.class](#selfreferencingobjectmodel1)))
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([SelfReferencingObjectModel1.class](#selfreferencingobjectmodel1)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("selfRef", [SelfReferencingObjectModel1.class](#selfreferencingobjectmodel1)))
    )
| +| Class |     additionalProperties = [SelfReferencingObjectModel1.class](#selfreferencingobjectmodel1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Shape.md b/samples/client/petstore/java/docs/components/schemas/Shape.md index ebb8b6bde90..06900c2a256 100644 --- a/samples/client/petstore/java/docs/components/schemas/Shape.md +++ b/samples/client/petstore/java/docs/components/schemas/Shape.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Triangle.Triangle1.class](../../components/schemas/Triangle.md#triangle1),
        [Quadrilateral.Quadrilateral1.class](../../components/schemas/Quadrilateral.md#quadrilateral1)
    )))
)); | +| List> |     oneOf = List.of(
        [Triangle.Triangle1.class](../../components/schemas/Triangle.md#triangle1),
        [Quadrilateral.Quadrilateral1.class](../../components/schemas/Quadrilateral.md#quadrilateral1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/ShapeOrNull.md b/samples/client/petstore/java/docs/components/schemas/ShapeOrNull.md index 28ddec21601..c22ed463d31 100644 --- a/samples/client/petstore/java/docs/components/schemas/ShapeOrNull.md +++ b/samples/client/petstore/java/docs/components/schemas/ShapeOrNull.md @@ -27,7 +27,7 @@ The value may be a shape or the 'null' value. This is introduced in OA ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [Schema0.class](#schema0),
        [Triangle.Triangle1.class](../../components/schemas/Triangle.md#triangle1),
        [Quadrilateral.Quadrilateral1.class](../../components/schemas/Quadrilateral.md#quadrilateral1)
    )))
)); | +| List> |     oneOf = List.of(
        [Schema0.class](#schema0),
        [Triangle.Triangle1.class](../../components/schemas/Triangle.md#triangle1),
        [Quadrilateral.Quadrilateral1.class](../../components/schemas/Quadrilateral.md#quadrilateral1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/SimpleQuadrilateral.md b/samples/client/petstore/java/docs/components/schemas/SimpleQuadrilateral.md index 65a2d2257b4..043567a39c1 100644 --- a/samples/client/petstore/java/docs/components/schemas/SimpleQuadrilateral.md +++ b/samples/client/petstore/java/docs/components/schemas/SimpleQuadrilateral.md @@ -27,7 +27,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [QuadrilateralInterface.QuadrilateralInterface1.class](../../components/schemas/QuadrilateralInterface.md#quadrilateralinterface1),
        [Schema1.class](#schema1)
    )))
)); | +| List> |     allOf = List.of(
        [QuadrilateralInterface.QuadrilateralInterface1.class](../../components/schemas/QuadrilateralInterface.md#quadrilateralinterface1),
        [Schema1.class](#schema1)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -79,7 +79,8 @@ SimpleQuadrilateral.Schema1Map validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("quadrilateralType", [QuadrilateralType.class](#quadrilateraltype)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("quadrilateralType", [QuadrilateralType.class](#quadrilateraltype)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -142,7 +143,8 @@ String validatedPayload = SimpleQuadrilateral.QuadrilateralType.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "SimpleQuadrilateral"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "SimpleQuadrilateral"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/SomeObject.md b/samples/client/petstore/java/docs/components/schemas/SomeObject.md index 7edf2cc261e..1d5b193742d 100644 --- a/samples/client/petstore/java/docs/components/schemas/SomeObject.md +++ b/samples/client/petstore/java/docs/components/schemas/SomeObject.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [ObjectInterface.ObjectInterface1.class](../../components/schemas/ObjectInterface.md#objectinterface1)
    )))
)); | +| List> |     allOf = List.of(
        [ObjectInterface.ObjectInterface1.class](../../components/schemas/ObjectInterface.md#objectinterface1)
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/SpecialModelname.md b/samples/client/petstore/java/docs/components/schemas/SpecialModelname.md index 7178af38390..0a99ea6392f 100644 --- a/samples/client/petstore/java/docs/components/schemas/SpecialModelname.md +++ b/samples/client/petstore/java/docs/components/schemas/SpecialModelname.md @@ -57,7 +57,8 @@ SpecialModelname.SpecialModelnameMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/StringBooleanMap.md b/samples/client/petstore/java/docs/components/schemas/StringBooleanMap.md index 88df921bb9f..af524541913 100644 --- a/samples/client/petstore/java/docs/components/schemas/StringBooleanMap.md +++ b/samples/client/petstore/java/docs/components/schemas/StringBooleanMap.md @@ -50,7 +50,8 @@ StringBooleanMap.StringBooleanMapMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/StringEnum.md b/samples/client/petstore/java/docs/components/schemas/StringEnum.md index ff768b939b3..73ed6164e35 100644 --- a/samples/client/petstore/java/docs/components/schemas/StringEnum.md +++ b/samples/client/petstore/java/docs/components/schemas/StringEnum.md @@ -51,7 +51,8 @@ String validatedPayload = StringEnum.StringEnum1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "placed",
        "approved",
        "delivered",
        "single quoted",
        "multiple\nlines",
        "double quote \n with newline",
        null)))
)); | +| Set> |     type = Set.of(
        Void.class,
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "placed",
        "approved",
        "delivered",
        "single quoted",
        "multiple\nlines",
        "double quote \n with newline",
        null)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/StringEnumWithDefaultValue.md b/samples/client/petstore/java/docs/components/schemas/StringEnumWithDefaultValue.md index 81282f19a7a..4d99110eed7 100644 --- a/samples/client/petstore/java/docs/components/schemas/StringEnumWithDefaultValue.md +++ b/samples/client/petstore/java/docs/components/schemas/StringEnumWithDefaultValue.md @@ -45,7 +45,8 @@ String validatedPayload = StringEnumWithDefaultValue.StringEnumWithDefaultValue1 ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "placed",
        "approved",
        "delivered"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "placed",
        "approved",
        "delivered"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/StringWithValidation.md b/samples/client/petstore/java/docs/components/schemas/StringWithValidation.md index 8d14cc46232..f2fbec6e75c 100644 --- a/samples/client/petstore/java/docs/components/schemas/StringWithValidation.md +++ b/samples/client/petstore/java/docs/components/schemas/StringWithValidation.md @@ -45,7 +45,8 @@ String validatedPayload = StringWithValidation.StringWithValidation1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(7))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 7
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Tag.md b/samples/client/petstore/java/docs/components/schemas/Tag.md index 9d388e6c0d0..4ac15b4dd85 100644 --- a/samples/client/petstore/java/docs/components/schemas/Tag.md +++ b/samples/client/petstore/java/docs/components/schemas/Tag.md @@ -59,7 +59,8 @@ Tag.TagMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("name", [Name.class](#name)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("name", [Name.class](#name)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Triangle.md b/samples/client/petstore/java/docs/components/schemas/Triangle.md index 2e57d644536..8da37757b9c 100644 --- a/samples/client/petstore/java/docs/components/schemas/Triangle.md +++ b/samples/client/petstore/java/docs/components/schemas/Triangle.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("oneOf", new OneOfValidator(List.of(
        [EquilateralTriangle.EquilateralTriangle1.class](../../components/schemas/EquilateralTriangle.md#equilateraltriangle1),
        [IsoscelesTriangle.IsoscelesTriangle1.class](../../components/schemas/IsoscelesTriangle.md#isoscelestriangle1),
        [ScaleneTriangle.ScaleneTriangle1.class](../../components/schemas/ScaleneTriangle.md#scalenetriangle1)
    )))
)); | +| List> |     oneOf = List.of(
        [EquilateralTriangle.EquilateralTriangle1.class](../../components/schemas/EquilateralTriangle.md#equilateraltriangle1),
        [IsoscelesTriangle.IsoscelesTriangle1.class](../../components/schemas/IsoscelesTriangle.md#isoscelestriangle1),
        [ScaleneTriangle.ScaleneTriangle1.class](../../components/schemas/ScaleneTriangle.md#scalenetriangle1)
    ))
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/TriangleInterface.md b/samples/client/petstore/java/docs/components/schemas/TriangleInterface.md index 6878defc36a..85b80709321 100644 --- a/samples/client/petstore/java/docs/components/schemas/TriangleInterface.md +++ b/samples/client/petstore/java/docs/components/schemas/TriangleInterface.md @@ -27,7 +27,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("shapeType", [ShapeType.class](#shapetype))),
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "shapeType",
        "triangleType"
    )))
)); | +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("shapeType", [ShapeType.class](#shapetype))),
        new PropertyEntry("triangleType", [TriangleType.class](#triangletype)))
    )
| +| Set |     required = Set.of(
        "shapeType",
        "triangleType"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -110,7 +111,8 @@ String validatedPayload = TriangleInterface.ShapeType.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "Triangle"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "Triangle"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/UUIDString.md b/samples/client/petstore/java/docs/components/schemas/UUIDString.md index 21bd993c015..a711e900ed1 100644 --- a/samples/client/petstore/java/docs/components/schemas/UUIDString.md +++ b/samples/client/petstore/java/docs/components/schemas/UUIDString.md @@ -45,7 +45,9 @@ String validatedPayload = UUIDString.UUIDString1.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("uuid")),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "uuid";
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/User.md b/samples/client/petstore/java/docs/components/schemas/User.md index 8899816c5ee..e97e7bff0f2 100644 --- a/samples/client/petstore/java/docs/components/schemas/User.md +++ b/samples/client/petstore/java/docs/components/schemas/User.md @@ -99,7 +99,8 @@ User.UserMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("username", [Username.class](#username))),
        new PropertyEntry("firstName", [FirstName.class](#firstname))),
        new PropertyEntry("lastName", [LastName.class](#lastname))),
        new PropertyEntry("email", [Email.class](#email))),
        new PropertyEntry("password", [Password.class](#password))),
        new PropertyEntry("phone", [Phone.class](#phone))),
        new PropertyEntry("userStatus", [UserStatus.class](#userstatus))),
        new PropertyEntry("objectWithNoDeclaredProps", [ObjectWithNoDeclaredProps.class](#objectwithnodeclaredprops))),
        new PropertyEntry("objectWithNoDeclaredPropsNullable", [ObjectWithNoDeclaredPropsNullable.class](#objectwithnodeclaredpropsnullable))),
        new PropertyEntry("anyTypeProp", [AnyTypeProp.class](#anytypeprop))),
        new PropertyEntry("anyTypeExceptNullProp", [AnyTypeExceptNullProp.class](#anytypeexceptnullprop))),
        new PropertyEntry("anyTypePropNullable", [AnyTypePropNullable.class](#anytypepropnullable)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("id", [Id.class](#id))),
        new PropertyEntry("username", [Username.class](#username))),
        new PropertyEntry("firstName", [FirstName.class](#firstname))),
        new PropertyEntry("lastName", [LastName.class](#lastname))),
        new PropertyEntry("email", [Email.class](#email))),
        new PropertyEntry("password", [Password.class](#password))),
        new PropertyEntry("phone", [Phone.class](#phone))),
        new PropertyEntry("userStatus", [UserStatus.class](#userstatus))),
        new PropertyEntry("objectWithNoDeclaredProps", [ObjectWithNoDeclaredProps.class](#objectwithnodeclaredprops))),
        new PropertyEntry("objectWithNoDeclaredPropsNullable", [ObjectWithNoDeclaredPropsNullable.class](#objectwithnodeclaredpropsnullable))),
        new PropertyEntry("anyTypeProp", [AnyTypeProp.class](#anytypeprop))),
        new PropertyEntry("anyTypeExceptNullProp", [AnyTypeExceptNullProp.class](#anytypeexceptnullprop))),
        new PropertyEntry("anyTypePropNullable", [AnyTypePropNullable.class](#anytypepropnullable)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -180,7 +181,7 @@ any type except 'null' Here the 'type' attribute is not spec ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("not", new NotValidator([Not.class](#not)))
)); | +| Class |     not = [Not.class](#not)
| ### Method Summary | Modifier and Type | Method and Description | @@ -252,7 +253,7 @@ Void validatedPayload = User.ObjectWithNoDeclaredPropsNullable.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Void.class,
        FrozenMap.class
    )))
)); | +| Set> |     type = Set.of(
        Void.class,
        FrozenMap.class
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Whale.md b/samples/client/petstore/java/docs/components/schemas/Whale.md index 163bf62c95d..8302e482360 100644 --- a/samples/client/petstore/java/docs/components/schemas/Whale.md +++ b/samples/client/petstore/java/docs/components/schemas/Whale.md @@ -64,7 +64,9 @@ Whale.WhaleMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("hasBaleen", [HasBaleen.class](#hasbaleen))),
        new PropertyEntry("hasTeeth", [HasTeeth.class](#hasteeth))),
        new PropertyEntry("className", [ClassName.class](#classname)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "className"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("hasBaleen", [HasBaleen.class](#hasbaleen))),
        new PropertyEntry("hasTeeth", [HasTeeth.class](#hasteeth))),
        new PropertyEntry("className", [ClassName.class](#classname)))
    )
| +| Set |     required = Set.of(
        "className"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -131,7 +133,8 @@ String validatedPayload = Whale.ClassName.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "whale"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "whale"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Zebra.md b/samples/client/petstore/java/docs/components/schemas/Zebra.md index 67f88e6ca19..eee5b7c2a68 100644 --- a/samples/client/petstore/java/docs/components/schemas/Zebra.md +++ b/samples/client/petstore/java/docs/components/schemas/Zebra.md @@ -60,7 +60,10 @@ Zebra.ZebraMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("type", [Type.class](#type))),
        new PropertyEntry("className", [ClassName.class](#classname)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "className"
    ))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("type", [Type.class](#type))),
        new PropertyEntry("className", [ClassName.class](#classname)))
    )
| +| Set |     required = Set.of(
        "className"
    )
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | @@ -125,7 +128,8 @@ String validatedPayload = Zebra.ClassName.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "zebra"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "zebra"
)
| ### Method Summary | Modifier and Type | Method and Description | @@ -163,7 +167,8 @@ String validatedPayload = Zebra.Type.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "plains",
        "mountain",
        "grevys"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "plains",
        "mountain",
        "grevys"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.md b/samples/client/petstore/java/docs/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.md index f040b50c321..2e146e7714e 100644 --- a/samples/client/petstore/java/docs/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.md +++ b/samples/client/petstore/java/docs/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.md @@ -45,7 +45,8 @@ String validatedPayload = Schema1.Schema11.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "c",
        "d"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "c",
        "d"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.md b/samples/client/petstore/java/docs/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.md index d599b5c24a5..130c6f988d2 100644 --- a/samples/client/petstore/java/docs/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.md +++ b/samples/client/petstore/java/docs/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.md @@ -45,7 +45,8 @@ String validatedPayload = PathParamSchema0.PathParamSchema01.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "a",
        "b"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "a",
        "b"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter1/Schema1.md b/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter1/Schema1.md index f84110cb2da..391b096426e 100644 --- a/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter1/Schema1.md +++ b/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter1/Schema1.md @@ -45,7 +45,8 @@ String validatedPayload = Schema1.Schema11.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "true",
        "false"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "true",
        "false"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter4/Schema4.md b/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter4/Schema4.md index 8324259e966..a512894545e 100644 --- a/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter4/Schema4.md +++ b/samples/client/petstore/java/docs/paths/fake/delete/parameters/parameter4/Schema4.md @@ -45,7 +45,8 @@ String validatedPayload = Schema4.Schema41.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "true",
        "false"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "true",
        "false"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter0/Schema0.md b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter0/Schema0.md index 5ade3736daa..5313216702d 100644 --- a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter0/Schema0.md +++ b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter0/Schema0.md @@ -51,7 +51,8 @@ Schema0.SchemaList0 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items0.class](#items0)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items0.class](#items0)
| ### Method Summary | Modifier and Type | Method and Description | @@ -111,7 +112,8 @@ String validatedPayload = Schema0.Items0.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        ">",
        "$"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        ">",
        "$"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter1/Schema1.md b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter1/Schema1.md index 984101f3b2d..ad279d8c0a0 100644 --- a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter1/Schema1.md +++ b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter1/Schema1.md @@ -45,7 +45,8 @@ String validatedPayload = Schema1.Schema11.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter2/Schema2.md b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter2/Schema2.md index 2197bd404c8..548e6c9423a 100644 --- a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter2/Schema2.md +++ b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter2/Schema2.md @@ -51,7 +51,8 @@ Schema2.SchemaList2 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items2.class](#items2)
| ### Method Summary | Modifier and Type | Method and Description | @@ -111,7 +112,8 @@ String validatedPayload = Schema2.Items2.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        ">",
        "$"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        ">",
        "$"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter3/Schema3.md b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter3/Schema3.md index 911aecb4dd0..264c8fdacb5 100644 --- a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter3/Schema3.md +++ b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter3/Schema3.md @@ -45,7 +45,8 @@ String validatedPayload = Schema3.Schema31.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter4/Schema4.md b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter4/Schema4.md index 80876159963..b93d6fdaeb7 100644 --- a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter4/Schema4.md +++ b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter4/Schema4.md @@ -45,7 +45,9 @@ int validatedPayload = Schema4.Schema41.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("int32")),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1,        -2)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int32";
| +| Set |     enumValues = SetMaker.makeSet(
        1,        -2)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter5/Schema5.md b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter5/Schema5.md index 6e45d5adab0..5699e7eb484 100644 --- a/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter5/Schema5.md +++ b/samples/client/petstore/java/docs/paths/fake/get/parameters/parameter5/Schema5.md @@ -45,7 +45,9 @@ double validatedPayload = Schema5.Schema51.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("double")),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        1.1,        -1.2)))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "double";
| +| Set |     enumValues = SetMaker.makeSet(
        1.1,        -1.2)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.md b/samples/client/petstore/java/docs/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.md index 23aad6fa649..e6565e1d603 100644 --- a/samples/client/petstore/java/docs/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.md +++ b/samples/client/petstore/java/docs/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.md @@ -64,7 +64,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("enum_form_string_array", [EnumFormStringArray.class](#enumformstringarray))),
        new PropertyEntry("enum_form_string", [EnumFormString.class](#enumformstring)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("enum_form_string_array", [EnumFormStringArray.class](#enumformstringarray))),
        new PropertyEntry("enum_form_string", [EnumFormString.class](#enumformstring)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -132,7 +133,8 @@ String validatedPayload = Schema.EnumFormString.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "_abc",
        "-efg",
        "(xyz)"
)
| ### Method Summary | Modifier and Type | Method and Description | @@ -176,7 +178,8 @@ Schema.EnumFormStringArrayList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | @@ -236,7 +239,8 @@ String validatedPayload = Schema.Items.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        ">",
        "$"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        ">",
        "$"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.md b/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.md index 21d38e6f210..ec9296544d4 100644 --- a/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.md +++ b/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.md @@ -119,7 +119,9 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("integer", [IntegerSchema.class](#integerschema))),
        new PropertyEntry("int32", [Int32.class](#int32))),
        new PropertyEntry("int64", [Int64.class](#int64))),
        new PropertyEntry("number", [NumberSchema.class](#numberschema))),
        new PropertyEntry("float", [FloatSchema.class](#floatschema))),
        new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
        new PropertyEntry("string", [StringSchema.class](#stringschema))),
        new PropertyEntry("pattern_without_delimiter", [PatternWithoutDelimiter.class](#patternwithoutdelimiter))),
        new PropertyEntry("byte", [ByteSchema.class](#byteschema))),
        new PropertyEntry("binary", [Binary.class](#binary))),
        new PropertyEntry("date", [Date.class](#date))),
        new PropertyEntry("dateTime", [DateTime.class](#datetime))),
        new PropertyEntry("password", [Password.class](#password))),
        new PropertyEntry("callback", [Callback.class](#callback)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "byte",
        "double",
        "number",
        "pattern_without_delimiter"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("integer", [IntegerSchema.class](#integerschema))),
        new PropertyEntry("int32", [Int32.class](#int32))),
        new PropertyEntry("int64", [Int64.class](#int64))),
        new PropertyEntry("number", [NumberSchema.class](#numberschema))),
        new PropertyEntry("float", [FloatSchema.class](#floatschema))),
        new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
        new PropertyEntry("string", [StringSchema.class](#stringschema))),
        new PropertyEntry("pattern_without_delimiter", [PatternWithoutDelimiter.class](#patternwithoutdelimiter))),
        new PropertyEntry("byte", [ByteSchema.class](#byteschema))),
        new PropertyEntry("binary", [Binary.class](#binary))),
        new PropertyEntry("date", [Date.class](#date))),
        new PropertyEntry("dateTime", [DateTime.class](#datetime))),
        new PropertyEntry("password", [Password.class](#password))),
        new PropertyEntry("callback", [Callback.class](#callback)))
    )
| +| Set |     required = Set.of(
        "byte",
        "double",
        "number",
        "pattern_without_delimiter"
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -219,7 +221,10 @@ String validatedPayload = Schema.Password.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("password")),
    new KeywordEntry("maxLength", new MaxLengthValidator(64)),
    new KeywordEntry("minLength", new MinLengthValidator(10))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "password";
| +| Integer |     maxLength = 64
| +| Integer |     minLength = 10
| ### Method Summary | Modifier and Type | Method and Description | @@ -260,7 +265,8 @@ String validatedPayload = Schema.DateTime.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("format", new FormatValidator("date-time"))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| String |     type = "date-time";
| ### Method Summary | Modifier and Type | Method and Description | @@ -332,7 +338,8 @@ String validatedPayload = Schema.PatternWithoutDelimiter.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("pattern", new PatternValidator(
        "^[A-Z].*"
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Pattern |     pattern =
        "^[A-Z].*"
    )))
| ### Method Summary | Modifier and Type | Method and Description | @@ -373,7 +380,8 @@ String validatedPayload = Schema.StringSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("pattern", new PatternValidator(
        "[a-z]",
        Pattern.CASE_INSENSITIVE
    )))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Pattern |     pattern =
        "[a-z]",
        Pattern.CASE_INSENSITIVE
    )))
| ### Method Summary | Modifier and Type | Method and Description | @@ -414,7 +422,10 @@ double validatedPayload = Schema.DoubleSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("double")),
    new KeywordEntry("maximum", new MaximumValidator(123.4)),
    new KeywordEntry("minimum", new MinimumValidator(67.8))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "double";
| +| Number |     maximum = 123.4
| +| Number |     minimum = 67.8
| ### Method Summary | Modifier and Type | Method and Description | @@ -455,7 +466,9 @@ float validatedPayload = Schema.FloatSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("float")),
    new KeywordEntry("maximum", new MaximumValidator(987.6))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "float";
| +| Number |     maximum = 987.6
| ### Method Summary | Modifier and Type | Method and Description | @@ -496,7 +509,9 @@ int validatedPayload = Schema.NumberSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("maximum", new MaximumValidator(543.2)),
    new KeywordEntry("minimum", new MinimumValidator(32.1))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Number |     maximum = 543.2
| +| Number |     minimum = 32.1
| ### Method Summary | Modifier and Type | Method and Description | @@ -550,7 +565,10 @@ int validatedPayload = Schema.Int32.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("int32")),
    new KeywordEntry("maximum", new MaximumValidator(200)),
    new KeywordEntry("minimum", new MinimumValidator(20))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int32";
| +| Number |     maximum = 200
| +| Number |     minimum = 20
| ### Method Summary | Modifier and Type | Method and Description | @@ -591,7 +609,9 @@ long validatedPayload = Schema.IntegerSchema.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    ))),
    new KeywordEntry("maximum", new MaximumValidator(100)),
    new KeywordEntry("minimum", new MinimumValidator(10))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| Number |     maximum = 100
| +| Number |     minimum = 10
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.md index eaffc56f42d..4fe7c2d966b 100644 --- a/samples/client/petstore/java/docs/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.md @@ -50,7 +50,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator([AdditionalProperties.class](#additionalproperties)))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Class |     additionalProperties = [AdditionalProperties.class](#additionalproperties)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.md b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.md index d56ee13a2f0..468f3627eb4 100644 --- a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.md +++ b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema00.class](#schema00)
    )))
)); | +| List> |     allOf = List.of(
        [Schema00.class](#schema00)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -70,7 +70,8 @@ String validatedPayload = Schema0.Schema00.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.md b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.md index 963eb06300b..ef8a93de87d 100644 --- a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.md +++ b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.md @@ -51,7 +51,8 @@ Schema1.SchemaMap1 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp1.class](#someprop1)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp1.class](#someprop1)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -92,7 +93,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema01.class](#schema01)
    )))
)); | +| List> |     allOf = List.of(
        [Schema01.class](#schema01)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -138,7 +139,8 @@ String validatedPayload = Schema1.Schema01.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.md index 2f477fa1a07..0b2e06f6af4 100644 --- a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -70,7 +70,8 @@ String validatedPayload = Schema.Schema0.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.md b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.md index 66c2beaade6..52b50b80069 100644 --- a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.md @@ -51,7 +51,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -92,7 +93,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -138,7 +139,8 @@ String validatedPayload = Schema.Schema0.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.md index 9305f7c100e..a59ef581649 100644 --- a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.md @@ -24,7 +24,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -70,7 +70,8 @@ String validatedPayload = Schema.Schema0.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.md b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.md index 8f35546934d..71423bca140 100644 --- a/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.md @@ -51,7 +51,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("someProp", [SomeProp.class](#someprop)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -92,7 +93,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("allOf", new AllOfValidator(List.of(
        [Schema0.class](#schema0)
    )))
)); | +| List> |     allOf = List.of(
        [Schema0.class](#schema0)
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -138,7 +139,8 @@ String validatedPayload = Schema.Schema0.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("minLength", new MinLengthValidator(1))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Integer |     minLength = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.md b/samples/client/petstore/java/docs/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.md index 9d6774b307c..e6cbecd0f6f 100644 --- a/samples/client/petstore/java/docs/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.md @@ -59,7 +59,9 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("param", [Param.class](#param))),
        new PropertyEntry("param2", [Param2.class](#param2)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "param",
        "param2"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("param", [Param.class](#param))),
        new PropertyEntry("param2", [Param2.class](#param2)))
    )
| +| Set |     required = Set.of(
        "param",
        "param2"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.md index 07e78da3abf..a8d7020d92e 100644 --- a/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.md @@ -54,7 +54,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("a", [A.class](#a)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.md b/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.md index 8c681c6738a..844fd53de93 100644 --- a/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.md @@ -54,7 +54,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("b", [B.class](#b)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("b", [B.class](#b)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeobjinquery/get/parameters/parameter0/Schema0.md b/samples/client/petstore/java/docs/paths/fakeobjinquery/get/parameters/parameter0/Schema0.md index b0ad3d1ab88..327395961c2 100644 --- a/samples/client/petstore/java/docs/paths/fakeobjinquery/get/parameters/parameter0/Schema0.md +++ b/samples/client/petstore/java/docs/paths/fakeobjinquery/get/parameters/parameter0/Schema0.md @@ -54,7 +54,8 @@ Schema0.SchemaMap0 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("keyword", [Keyword0.class](#keyword0)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("keyword", [Keyword0.class](#keyword0)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.md b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.md index ba5e632d35e..c1342fa5f77 100644 --- a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.md @@ -59,7 +59,9 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("additionalMetadata", [AdditionalMetadata.class](#additionalmetadata))),
        new PropertyEntry("requiredFile", [RequiredFile.class](#requiredfile)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "requiredFile"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("additionalMetadata", [AdditionalMetadata.class](#additionalmetadata))),
        new PropertyEntry("requiredFile", [RequiredFile.class](#requiredfile)))
    )
| +| Set |     required = Set.of(
        "requiredFile"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.md b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.md index 99d4fe41d8a..32431531ccf 100644 --- a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.md +++ b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.md @@ -51,7 +51,8 @@ Schema0.SchemaList0 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items0.class](#items0)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items0.class](#items0)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.md b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.md index 401a3058a24..38acc00dcb4 100644 --- a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.md +++ b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.md @@ -51,7 +51,8 @@ Schema1.SchemaList1 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items1.class](#items1)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items1.class](#items1)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.md b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.md index 3a0f97717d1..56538acd533 100644 --- a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.md +++ b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.md @@ -51,7 +51,8 @@ Schema2.SchemaList2 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items2.class](#items2)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items2.class](#items2)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.md b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.md index 2cd14495104..d1e6aa277b1 100644 --- a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.md +++ b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.md @@ -51,7 +51,8 @@ Schema3.SchemaList3 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items3.class](#items3)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items3.class](#items3)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.md b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.md index c339bec3934..6cb9305d4e6 100644 --- a/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.md +++ b/samples/client/petstore/java/docs/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.md @@ -51,7 +51,8 @@ Schema4.SchemaList4 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items4.class](#items4)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items4.class](#items4)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.md b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.md index 673cf6fd4a8..51cd779b9a9 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.md @@ -59,7 +59,9 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("additionalMetadata", [AdditionalMetadata.class](#additionalmetadata))),
        new PropertyEntry("file", [File.class](#file)))
    ))),
    new KeywordEntry("required", new RequiredValidator(Set.of(
        "file"
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("additionalMetadata", [AdditionalMetadata.class](#additionalmetadata))),
        new PropertyEntry("file", [File.class](#file)))
    )
| +| Set |     required = Set.of(
        "file"
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.md b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.md index a06a05625d0..31db2ead20b 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.md @@ -59,7 +59,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("files", [Files.class](#files)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("files", [Files.class](#files)))
    )
| ### Method Summary | Modifier and Type | Method and Description | @@ -125,7 +126,8 @@ Schema.FilesList validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items.class](#items)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items.class](#items)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.md b/samples/client/petstore/java/docs/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.md index 76184b43417..65f0d65cf44 100644 --- a/samples/client/petstore/java/docs/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.md +++ b/samples/client/petstore/java/docs/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.md @@ -58,7 +58,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("string", [Foo.Foo1.class](../../../../../../../../components/schemas/Foo.md#foo1))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("string", [Foo.Foo1.class](../../../../../../../../components/schemas/Foo.md#foo1))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/petfindbystatus/get/parameters/parameter0/Schema0.md b/samples/client/petstore/java/docs/paths/petfindbystatus/get/parameters/parameter0/Schema0.md index 38860dd8bc1..0578d6bf49f 100644 --- a/samples/client/petstore/java/docs/paths/petfindbystatus/get/parameters/parameter0/Schema0.md +++ b/samples/client/petstore/java/docs/paths/petfindbystatus/get/parameters/parameter0/Schema0.md @@ -51,7 +51,8 @@ Schema0.SchemaList0 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items0.class](#items0)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items0.class](#items0)
| ### Method Summary | Modifier and Type | Method and Description | @@ -111,7 +112,8 @@ String validatedPayload = Schema0.Items0.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(
        String.class
    ))),
    new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet(
        "available",
        "pending",
        "sold"
)))
)); | +| Set> |     type = Set.of(
        String.class
    )
| +| Set |     enumValues = SetMaker.makeSet(
        "available",
        "pending",
        "sold"
)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/petfindbytags/get/parameters/parameter0/Schema0.md b/samples/client/petstore/java/docs/paths/petfindbytags/get/parameters/parameter0/Schema0.md index 45787137d81..6c225b10cbf 100644 --- a/samples/client/petstore/java/docs/paths/petfindbytags/get/parameters/parameter0/Schema0.md +++ b/samples/client/petstore/java/docs/paths/petfindbytags/get/parameters/parameter0/Schema0.md @@ -51,7 +51,8 @@ Schema0.SchemaList0 validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))),
    new KeywordEntry("items", new ItemsValidator([Items0.class](#items0)))
)); | +| Set> |     type = Set.of(FrozenList.class)
| +| Class |     items = [Items0.class](#items0)
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.md b/samples/client/petstore/java/docs/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.md index cf0710575df..9352bd82cce 100644 --- a/samples/client/petstore/java/docs/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.md +++ b/samples/client/petstore/java/docs/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.md @@ -59,7 +59,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("status", [Status.class](#status)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("name", [Name.class](#name))),
        new PropertyEntry("status", [Status.class](#status)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.md b/samples/client/petstore/java/docs/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.md index c4188108114..a97f7796551 100644 --- a/samples/client/petstore/java/docs/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.md +++ b/samples/client/petstore/java/docs/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.md @@ -59,7 +59,8 @@ Schema.SchemaMap validatedPayload = ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |keywordToValidator
new LinkedHashMap<>(Map.ofEntries(
    new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))),
    new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries(
        new PropertyEntry("additionalMetadata", [AdditionalMetadata.class](#additionalmetadata))),
        new PropertyEntry("file", [File.class](#file)))
    )))
)); | +| Set> |     type = Set.of(FrozenMap.class)
| +| Map> |     properties = Map.ofEntries(
        new PropertyEntry("additionalMetadata", [AdditionalMetadata.class](#additionalmetadata))),
        new PropertyEntry("file", [File.class](#file)))
    )
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/paths/storeorderorderid/get/parameters/parameter0/Schema0.md b/samples/client/petstore/java/docs/paths/storeorderorderid/get/parameters/parameter0/Schema0.md index dbe9a14687b..5883944e803 100644 --- a/samples/client/petstore/java/docs/paths/storeorderorderid/get/parameters/parameter0/Schema0.md +++ b/samples/client/petstore/java/docs/paths/storeorderorderid/get/parameters/parameter0/Schema0.md @@ -45,7 +45,10 @@ long validatedPayload = Schema0.Schema01.validate( ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| static LinkedHashMap |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("maximum", new MaximumValidator(5)),
    new KeywordEntry("minimum", new MinimumValidator(1))
)); | +| Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| +| String |     type = "int64";
| +| Number |     maximum = 5
| +| Number |     minimum = 1
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/requestbodies/userarray/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/requestbodies/userarray/content/applicationjson/Schema.java index 6d240d83ba9..b6907ecb71b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/requestbodies/userarray/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/requestbodies/userarray/content/applicationjson/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -42,11 +40,12 @@ public static class SchemaListInput { public static class Schema1 extends JsonSchema implements SchemaListValidator, FrozenMap, SchemaList> { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(User.User1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(User.User1.class) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/Headers.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/Headers.java index a5c044aa6b7..28069ead655 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/Headers.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/Headers.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Headers { @@ -58,14 +56,15 @@ public static class HeadersMapInput { public static class Headers1 extends JsonSchema implements SchemaMapValidator { private static Headers1 instance; + protected Headers1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("location", LocationSchema.LocationSchema1.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static Headers1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.java index 71ae5156184..5831af5d3b6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationjson/Schema.java @@ -15,12 +15,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -43,11 +41,12 @@ public static class SchemaListInput { public static class Schema1 extends JsonSchema implements SchemaListValidator, FrozenMap, SchemaList> { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(RefPet.RefPet1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(RefPet.RefPet1.class) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.java index 69485e6cd65..f6f60319e5d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successfulxmlandjsonarrayofpet/content/applicationxml/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -42,11 +40,12 @@ public static class SchemaListInput { public static class Schema1 extends JsonSchema implements SchemaListValidator, FrozenMap, SchemaList> { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Pet.Pet1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Pet.Pet1.class) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/Headers.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/Headers.java index 6c9e228ce1c..4490bc89cf7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/Headers.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/Headers.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Headers { @@ -58,14 +56,15 @@ public static class HeadersMapInput { public static class Headers1 extends JsonSchema implements SchemaMapValidator { private static Headers1 instance; + protected Headers1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someHeader", SomeHeaderSchema.SomeHeaderSchema1.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static Headers1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/content/applicationjson/Schema.java index 0583e8a6d81..c192533c1cf 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/content/applicationjson/Schema.java @@ -15,10 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -50,11 +49,12 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/Headers.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/Headers.java index 7ab55a14931..5f8346ed796 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/Headers.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/Headers.java @@ -20,13 +20,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Headers { @@ -75,24 +72,25 @@ public static class HeadersMapInput { public static class Headers1 extends JsonSchema implements SchemaMapValidator { private static Headers1 instance; + protected Headers1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("ref-schema-header", StringWithValidation.StringWithValidation1.class), new PropertyEntry("int32", Int32JsonContentTypeHeaderSchema.Int32JsonContentTypeHeaderSchema1.class), new PropertyEntry("ref-content-schema-header", StringWithValidation.StringWithValidation1.class), new PropertyEntry("stringHeader", StringHeaderSchema.StringHeaderSchema1.class), new PropertyEntry("numberHeader", NumberHeaderSchema.NumberHeaderSchema1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "int32", "ref-content-schema-header", "ref-schema-header", "stringHeader" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static Headers1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AbstractStepMessage.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AbstractStepMessage.java index 1b235fb6abc..214d01c620f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AbstractStepMessage.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AbstractStepMessage.java @@ -12,16 +12,12 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AbstractStepMessage { @@ -78,21 +74,22 @@ public static class AbstractStepMessage1 extends JsonSchema implements SchemaMap Abstract Step */ private static AbstractStepMessage1 instance; + protected AbstractStepMessage1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("discriminator", Discriminator.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "description", "discriminator", "sequenceNumber" - ))), - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + )) + .anyOf(List.of( AbstractStepMessage1.class - ))) - ))); + )) + ); } public static AbstractStepMessage1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesClass.java index 3d5d60f9005..e4ef8b9b459 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesClass.java @@ -18,12 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AdditionalPropertiesClass { @@ -55,11 +53,12 @@ public static class MapPropertyMapInput { public static class MapProperty extends JsonSchema implements SchemaMapValidator { private static MapProperty instance; + protected MapProperty() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static MapProperty getInstance() { @@ -147,11 +146,12 @@ public static class AdditionalPropertiesMapInput { public static class AdditionalProperties1 extends JsonSchema implements SchemaMapValidator { private static AdditionalProperties1 instance; + protected AdditionalProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties2.class) + ); } public static AdditionalProperties1 getInstance() { @@ -236,11 +236,12 @@ public static class MapOfMapPropertyMapInput { public static class MapOfMapProperty extends JsonSchema implements SchemaMapValidator, FrozenMap, MapOfMapPropertyMap> { private static MapOfMapProperty instance; + protected MapOfMapProperty() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties1.class) + ); } public static MapOfMapProperty getInstance() { @@ -337,11 +338,12 @@ public static class MapWithUndeclaredPropertiesAnytype3MapInput { public static class MapWithUndeclaredPropertiesAnytype3 extends JsonSchema implements SchemaMapValidator { private static MapWithUndeclaredPropertiesAnytype3 instance; + protected MapWithUndeclaredPropertiesAnytype3() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties3.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties3.class) + ); } public static MapWithUndeclaredPropertiesAnytype3 getInstance() { @@ -426,11 +428,12 @@ public static class EmptyMapMapInput { public static class EmptyMap extends JsonSchema implements SchemaMapValidator { private static EmptyMap instance; + protected EmptyMap() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties4.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties4.class) + ); } public static EmptyMap getInstance() { @@ -518,11 +521,12 @@ public static class MapWithUndeclaredPropertiesStringMapInput { public static class MapWithUndeclaredPropertiesString extends JsonSchema implements SchemaMapValidator { private static MapWithUndeclaredPropertiesString instance; + protected MapWithUndeclaredPropertiesString() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties5.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties5.class) + ); } public static MapWithUndeclaredPropertiesString getInstance() { @@ -671,10 +675,11 @@ public static class AdditionalPropertiesClass1 extends JsonSchema implements Sch Do not edit the class manually. */ private static AdditionalPropertiesClass1 instance; + protected AdditionalPropertiesClass1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("map_property", MapProperty.class), new PropertyEntry("map_of_map_property", MapOfMapProperty.class), new PropertyEntry("anytype_1", Anytype1.class), @@ -683,8 +688,8 @@ protected AdditionalPropertiesClass1() { new PropertyEntry("map_with_undeclared_properties_anytype_3", MapWithUndeclaredPropertiesAnytype3.class), new PropertyEntry("empty_map", EmptyMap.class), new PropertyEntry("map_with_undeclared_properties_string", MapWithUndeclaredPropertiesString.class) - ))) - ))); + )) + ); } public static AdditionalPropertiesClass1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java index fa35352d3f9..d8e67b94a6a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java @@ -16,13 +16,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AdditionalPropertiesSchema { @@ -62,11 +58,12 @@ public static class Schema0MapInput { public static class Schema0 extends JsonSchema implements SchemaMapValidator { private static Schema0 instance; + protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static Schema0 getInstance() { @@ -131,10 +128,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class AdditionalProperties1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static AdditionalProperties1 instance; + protected AdditionalProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("minLength", new MinLengthValidator(3)) - ))); + super(new JsonSchemaInfo() + .minLength(3) + ); } public static AdditionalProperties1 getInstance() { @@ -363,11 +361,12 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties1.class) + ); } public static Schema1 getInstance() { @@ -432,10 +431,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class AdditionalProperties2 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static AdditionalProperties2 instance; + protected AdditionalProperties2() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("maxLength", new MaxLengthValidator(5)) - ))); + super(new JsonSchemaInfo() + .maxLength(5) + ); } public static AdditionalProperties2 getInstance() { @@ -664,11 +664,12 @@ public static class Schema2MapInput { public static class Schema2 extends JsonSchema implements SchemaMapValidator { private static Schema2 instance; + protected Schema2() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties2.class) + ); } public static Schema2 getInstance() { @@ -739,15 +740,16 @@ public static class AdditionalPropertiesSchema1 extends JsonSchema implements Sc Do not edit the class manually. */ private static AdditionalPropertiesSchema1 instance; + protected AdditionalPropertiesSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .allOf(List.of( Schema0.class, Schema1.class, Schema2.class - ))) - ))); + )) + ); } public static AdditionalPropertiesSchema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesWithArrayOfEnums.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesWithArrayOfEnums.java index 19688d7bb81..192adc85686 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesWithArrayOfEnums.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesWithArrayOfEnums.java @@ -14,13 +14,11 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AdditionalPropertiesWithArrayOfEnums { @@ -43,11 +41,12 @@ public static class AdditionalPropertiesListInput { public static class AdditionalProperties extends JsonSchema implements SchemaListValidator { private static AdditionalProperties instance; + protected AdditionalProperties() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(EnumClass.EnumClass1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(EnumClass.EnumClass1.class) + ); } public static AdditionalProperties getInstance() { @@ -137,11 +136,12 @@ public static class AdditionalPropertiesWithArrayOfEnums1 extends JsonSchema imp Do not edit the class manually. */ private static AdditionalPropertiesWithArrayOfEnums1 instance; + protected AdditionalPropertiesWithArrayOfEnums1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static AdditionalPropertiesWithArrayOfEnums1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Address.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Address.java index d0f86972bbd..a4700673322 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Address.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Address.java @@ -15,10 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Address { @@ -56,11 +55,12 @@ public static class Address1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static Address1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java index 777e2fefa7e..44f23de0bb1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java @@ -14,14 +14,11 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Animal { @@ -35,11 +32,11 @@ public static class Color extends JsonSchema implements SchemaStringValidator { private static Color instance; protected Color() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))) - ))); + ) + ); } public static Color getInstance() { @@ -122,17 +119,18 @@ public static class Animal1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("className", ClassName.class), new PropertyEntry("color", Color.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "className" - ))) - ))); + )) + ); } public static Animal1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnimalFarm.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnimalFarm.java index edde0e1d2bb..32658a107a3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnimalFarm.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnimalFarm.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AnimalFarm { @@ -47,11 +45,12 @@ public static class AnimalFarm1 extends JsonSchema implements SchemaListValidato Do not edit the class manually. */ private static AnimalFarm1 instance; + protected AnimalFarm1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Animal.Animal1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Animal.Animal1.class) + ); } public static AnimalFarm1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java index b730c6715d5..6f4de2d18b6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java @@ -14,13 +14,11 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -28,7 +26,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AnyTypeAndFormat { @@ -37,10 +34,11 @@ public class AnyTypeAndFormat { public static class UuidSchema extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static UuidSchema instance; + protected UuidSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("uuid")) - ))); + super(new JsonSchemaInfo() + .format("uuid") + ); } public static UuidSchema getInstance() { @@ -249,10 +247,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Date extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Date instance; + protected Date() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("date")) - ))); + super(new JsonSchemaInfo() + .format("date") + ); } public static Date getInstance() { @@ -461,10 +460,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Datetime extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Datetime instance; + protected Datetime() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + super(new JsonSchemaInfo() + .format("date-time") + ); } public static Datetime getInstance() { @@ -673,10 +673,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class NumberSchema extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static NumberSchema instance; + protected NumberSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("number")) - ))); + super(new JsonSchemaInfo() + .format("number") + ); } public static NumberSchema getInstance() { @@ -885,10 +886,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Binary extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Binary instance; + protected Binary() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("binary")) - ))); + super(new JsonSchemaInfo() + .format("binary") + ); } public static Binary getInstance() { @@ -1097,10 +1099,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Int32 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Int32 instance; + protected Int32() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("int32")) - ))); + super(new JsonSchemaInfo() + .format("int32") + ); } public static Int32 getInstance() { @@ -1309,10 +1312,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Int64 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Int64 instance; + protected Int64() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("int64")) - ))); + super(new JsonSchemaInfo() + .format("int64") + ); } public static Int64 getInstance() { @@ -1521,10 +1525,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class DoubleSchema extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static DoubleSchema instance; + protected DoubleSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("double")) - ))); + super(new JsonSchemaInfo() + .format("double") + ); } public static DoubleSchema getInstance() { @@ -1733,10 +1738,11 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class FloatSchema extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static FloatSchema instance; + protected FloatSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("format", new FormatValidator("float")) - ))); + super(new JsonSchemaInfo() + .format("float") + ); } public static FloatSchema getInstance() { @@ -2006,10 +2012,11 @@ public static class AnyTypeAndFormat1 extends JsonSchema implements SchemaMapVal Do not edit the class manually. */ private static AnyTypeAndFormat1 instance; + protected AnyTypeAndFormat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("uuid", UuidSchema.class), new PropertyEntry("date", Date.class), new PropertyEntry("date-time", Datetime.class), @@ -2019,8 +2026,8 @@ protected AnyTypeAndFormat1() { new PropertyEntry("int64", Int64.class), new PropertyEntry("double", DoubleSchema.class), new PropertyEntry("float", FloatSchema.class) - ))) - ))); + )) + ); } public static AnyTypeAndFormat1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java index 18dfb7218d9..b78997090da 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java @@ -18,8 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.NotValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -44,10 +43,11 @@ public static class AnyTypeNotString1 extends JsonSchema implements SchemaNullVa Do not edit the class manually. */ private static AnyTypeNotString1 instance; + protected AnyTypeNotString1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("not", new NotValidator(Not.class)) - ))); + super(new JsonSchemaInfo() + .not(Not.class) + ); } public static AnyTypeNotString1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchema.java index 43b0bb5750a..2627878e6d1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchema.java @@ -15,12 +15,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ApiResponseSchema { @@ -87,15 +85,16 @@ public static class ApiResponseSchema1 extends JsonSchema implements SchemaMapVa Do not edit the class manually. */ private static ApiResponseSchema1 instance; + protected ApiResponseSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("code", Code.class), new PropertyEntry("type", Type.class), new PropertyEntry("message", Message.class) - ))) - ))); + )) + ); } public static ApiResponseSchema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java index f058676b319..444abeecd06 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java @@ -15,16 +15,12 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Apple { @@ -35,14 +31,14 @@ public static class Cultivar extends JsonSchema implements SchemaStringValidator private static Cultivar instance; protected Cultivar() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .pattern(Pattern.compile( "^[a-zA-Z\\s]*$" - ))) - ))); + )) + ); } public static Cultivar getInstance() { @@ -86,15 +82,15 @@ public static class Origin extends JsonSchema implements SchemaStringValidator { private static Origin instance; protected Origin() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .pattern(Pattern.compile( "^[A-Z\\s]*$", Pattern.CASE_INSENSITIVE - ))) - ))); + )) + ); } public static Origin getInstance() { @@ -177,20 +173,21 @@ public static class Apple1 extends JsonSchema implements SchemaNullValidator, Sc Do not edit the class manually. */ private static Apple1 instance; + protected Apple1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + ) + .properties(Map.ofEntries( new PropertyEntry("cultivar", Cultivar.class), new PropertyEntry("origin", Origin.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "cultivar" - ))) - ))); + )) + ); } public static Apple1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java index 13280d434cc..3883eb209d4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java @@ -18,13 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AppleReq { @@ -78,18 +75,19 @@ public static class AppleReq1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("cultivar", Cultivar.class), new PropertyEntry("mealy", Mealy.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "cultivar" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static AppleReq1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyType.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyType.java index 4e063d8d976..9592d8cdae7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyType.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyType.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ArrayHoldingAnyType { @@ -50,11 +48,12 @@ public static class ArrayHoldingAnyType1 extends JsonSchema implements SchemaLis Do not edit the class manually. */ private static ArrayHoldingAnyType1 instance; + protected ArrayHoldingAnyType1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static ArrayHoldingAnyType1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfArrayOfNumberOnly.java index 4442952b020..238b9f1c620 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfArrayOfNumberOnly.java @@ -14,15 +14,12 @@ import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ArrayOfArrayOfNumberOnly { @@ -48,11 +45,12 @@ public static class ItemsListInput { public static class Items extends JsonSchema implements SchemaListValidator { private static Items instance; + protected Items() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items1.class) + ); } public static Items getInstance() { @@ -130,11 +128,12 @@ public static class ArrayArrayNumberListInput { public static class ArrayArrayNumber extends JsonSchema implements SchemaListValidator, FrozenList, ArrayArrayNumberList> { private static ArrayArrayNumber instance; + protected ArrayArrayNumber() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static ArrayArrayNumber getInstance() { @@ -233,13 +232,14 @@ public static class ArrayOfArrayOfNumberOnly1 extends JsonSchema implements Sche Do not edit the class manually. */ private static ArrayOfArrayOfNumberOnly1 instance; + protected ArrayOfArrayOfNumberOnly1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("ArrayArrayNumber", ArrayArrayNumber.class) - ))) - ))); + )) + ); } public static ArrayOfArrayOfNumberOnly1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfEnums.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfEnums.java index 87223729dd4..8d3c5f30735 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfEnums.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfEnums.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ArrayOfEnums { @@ -46,11 +44,12 @@ public static class ArrayOfEnums1 extends JsonSchema implements SchemaListValida Do not edit the class manually. */ private static ArrayOfEnums1 instance; + protected ArrayOfEnums1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(StringEnum.StringEnum1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(StringEnum.StringEnum1.class) + ); } public static ArrayOfEnums1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfNumberOnly.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfNumberOnly.java index d3f5f8d49d0..e361198b92f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayOfNumberOnly.java @@ -14,15 +14,12 @@ import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ArrayOfNumberOnly { @@ -48,11 +45,12 @@ public static class ArrayNumberListInput { public static class ArrayNumber extends JsonSchema implements SchemaListValidator { private static ArrayNumber instance; + protected ArrayNumber() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static ArrayNumber getInstance() { @@ -151,13 +149,14 @@ public static class ArrayOfNumberOnly1 extends JsonSchema implements SchemaMapVa Do not edit the class manually. */ private static ArrayOfNumberOnly1 instance; + protected ArrayOfNumberOnly1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("ArrayNumber", ArrayNumber.class) - ))) - ))); + )) + ); } public static ArrayOfNumberOnly1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTest.java index b7572f5f881..6596f301310 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTest.java @@ -15,15 +15,12 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ArrayTest { @@ -49,11 +46,12 @@ public static class ArrayOfStringListInput { public static class ArrayOfString extends JsonSchema implements SchemaListValidator { private static ArrayOfString instance; + protected ArrayOfString() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static ArrayOfString getInstance() { @@ -134,11 +132,12 @@ public static class ItemsListInput { public static class Items1 extends JsonSchema implements SchemaListValidator { private static Items1 instance; + protected Items1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items2.class) + ); } public static Items1 getInstance() { @@ -216,11 +215,12 @@ public static class ArrayArrayOfIntegerListInput { public static class ArrayArrayOfInteger extends JsonSchema implements SchemaListValidator, FrozenList, ArrayArrayOfIntegerList> { private static ArrayArrayOfInteger instance; + protected ArrayArrayOfInteger() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items1.class) + ); } public static ArrayArrayOfInteger getInstance() { @@ -298,11 +298,12 @@ public static class ItemsListInput1 { public static class Items3 extends JsonSchema implements SchemaListValidator, FrozenMap, ItemsList1> { private static Items3 instance; + protected Items3() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(ReadOnlyFirst.ReadOnlyFirst1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(ReadOnlyFirst.ReadOnlyFirst1.class) + ); } public static Items3 getInstance() { @@ -380,11 +381,12 @@ public static class ArrayArrayOfModelListInput { public static class ArrayArrayOfModel extends JsonSchema implements SchemaListValidator>, FrozenList>, ArrayArrayOfModelList> { private static ArrayArrayOfModel instance; + protected ArrayArrayOfModel() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items3.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items3.class) + ); } public static ArrayArrayOfModel getInstance() { @@ -497,15 +499,16 @@ public static class ArrayTest1 extends JsonSchema implements SchemaMapValidator< Do not edit the class manually. */ private static ArrayTest1 instance; + protected ArrayTest1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("array_of_string", ArrayOfString.class), new PropertyEntry("array_array_of_integer", ArrayArrayOfInteger.class), new PropertyEntry("array_array_of_model", ArrayArrayOfModel.class) - ))) - ))); + )) + ); } public static ArrayTest1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java index 73ee3fafbdc..9d074b29977 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java @@ -11,17 +11,12 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaxItemsValidator; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ArrayWithValidationsInItems { @@ -30,17 +25,18 @@ public class ArrayWithValidationsInItems { public static class Items extends JsonSchema implements SchemaNumberValidator { private static Items instance; + protected Items() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int64")), - new KeywordEntry("maximum", new MaximumValidator(7)) - ))); + ) + .format("int64") + .maximum(7) + ); } public static Items getInstance() { @@ -118,12 +114,13 @@ public static class ArrayWithValidationsInItems1 extends JsonSchema implements S Do not edit the class manually. */ private static ArrayWithValidationsInItems1 instance; + protected ArrayWithValidationsInItems1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)), - new KeywordEntry("maxItems", new MaxItemsValidator(2)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + .maxItems(2) + ); } public static ArrayWithValidationsInItems1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Banana.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Banana.java index ca745e9e224..d60d16a3b80 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Banana.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Banana.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Banana { @@ -65,16 +62,17 @@ public static class Banana1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("lengthCm", LengthCm.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "lengthCm" - ))) - ))); + )) + ); } public static Banana1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java index 0e01af3e37b..3cedc8afeb0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java @@ -18,13 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class BananaReq { @@ -78,18 +75,19 @@ public static class BananaReq1 extends JsonSchema implements SchemaMapValidator< Do not edit the class manually. */ private static BananaReq1 instance; + protected BananaReq1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("lengthCm", LengthCm.class), new PropertyEntry("sweet", Sweet.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "lengthCm" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static BananaReq1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java index 33db801158a..77d06a678e8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java @@ -12,10 +12,9 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Bar { @@ -32,11 +31,11 @@ public static class Bar1 extends JsonSchema implements SchemaStringValidator { private static Bar1 instance; protected Bar1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))) - ))); + ) + ); } public static Bar1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java index 8f277f9abff..6c43a0458c7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java @@ -12,17 +12,13 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class BasquePig { @@ -33,14 +29,14 @@ public static class ClassName extends JsonSchema implements SchemaStringValidato private static ClassName instance; protected ClassName() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "BasquePig" - ))) - ))); + )) + ); } public static ClassName getInstance() { @@ -115,16 +111,17 @@ public static class BasquePig1 extends JsonSchema implements SchemaMapValidator< Do not edit the class manually. */ private static BasquePig1 instance; + protected BasquePig1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("className", ClassName.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "className" - ))) - ))); + )) + ); } public static BasquePig1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BooleanEnum.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BooleanEnum.java index 4065af7432b..e1b91120db9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BooleanEnum.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BooleanEnum.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class BooleanEnum { @@ -32,13 +30,14 @@ public static class BooleanEnum1 extends JsonSchema implements SchemaBooleanVali Do not edit the class manually. */ private static BooleanEnum1 instance; + protected BooleanEnum1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + .enumValues(SetMaker.makeSet( true - ))) - ))); + )) + ); } public static BooleanEnum1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Capitalization.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Capitalization.java index a6918c30ef6..591163b2090 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Capitalization.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Capitalization.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Capitalization { @@ -116,18 +114,19 @@ public static class Capitalization1 extends JsonSchema implements SchemaMapValid Do not edit the class manually. */ private static Capitalization1 instance; + protected Capitalization1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("smallCamel", SmallCamel.class), new PropertyEntry("CapitalCamel", CapitalCamel.class), new PropertyEntry("small_Snake", SmallSnake.class), new PropertyEntry("Capital_Snake", CapitalSnake.class), new PropertyEntry("SCA_ETH_Flow_Points", SCAETHFlowPoints.class), new PropertyEntry("ATT_NAME", ATTNAME.class) - ))) - ))); + )) + ); } public static Capitalization1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java index c7777eb542c..0eab2465bbd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java @@ -15,13 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Cat { @@ -70,13 +67,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("declawed", Declawed.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -147,13 +145,14 @@ public static class Cat1 extends JsonSchema implements SchemaNullValidator, Sche Do not edit the class manually. */ private static Cat1 instance; + protected Cat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Animal.Animal1.class, Schema1.class - ))) - ))); + )) + ); } public static Cat1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java index dd95e1438e5..ebe273d2fe4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java @@ -14,14 +14,11 @@ import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Category { @@ -35,11 +32,11 @@ public static class Name extends JsonSchema implements SchemaStringValidator { private static Name instance; protected Name() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))) - ))); + ) + ); } public static Name getInstance() { @@ -122,17 +119,18 @@ public static class Category1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Id.class), new PropertyEntry("name", Name.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "name" - ))) - ))); + )) + ); } public static Category1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java index b8c52701e18..f701385e3eb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java @@ -15,13 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ChildCat { @@ -70,13 +67,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("name", Name.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -147,13 +145,14 @@ public static class ChildCat1 extends JsonSchema implements SchemaNullValidator, Do not edit the class manually. */ private static ChildCat1 instance; + protected ChildCat1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( ParentPet.ParentPet1.class, Schema1.class - ))) - ))); + )) + ); } public static ChildCat1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java index 4e528079eb5..bc3c2e46849 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -70,12 +69,13 @@ public static class ClassModel1 extends JsonSchema implements SchemaNullValidato Model for testing model with "_class" property */ private static ClassModel1 instance; + protected ClassModel1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("_class", ClassSchema.class) - ))) - ))); + )) + ); } public static ClassModel1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Client.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Client.java index a5905630a32..a33d04c7d2d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Client.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Client.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Client { @@ -66,13 +64,14 @@ public static class Client1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("client", Client2.class) - ))) - ))); + )) + ); } public static Client1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java index 803b6d4257e..368c69cd411 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java @@ -15,14 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComplexQuadrilateral { @@ -41,14 +37,14 @@ public static class QuadrilateralType extends JsonSchema implements SchemaString private static QuadrilateralType instance; protected QuadrilateralType() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "ComplexQuadrilateral" - ))) - ))); + )) + ); } public static QuadrilateralType getInstance() { @@ -119,13 +115,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("quadrilateralType", QuadrilateralType.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -196,13 +193,14 @@ public static class ComplexQuadrilateral1 extends JsonSchema implements SchemaNu Do not edit the class manually. */ private static ComplexQuadrilateral1 instance; + protected ComplexQuadrilateral1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( QuadrilateralInterface.QuadrilateralInterface1.class, Schema1.class - ))) - ))); + )) + ); } public static ComplexQuadrilateral1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java index bb5055713b2..c35b5aad0dc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java @@ -27,12 +27,10 @@ import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -40,7 +38,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedAnyOfDifferentTypesNoValidations { @@ -95,11 +92,12 @@ public static class Schema9ListInput { public static class Schema9 extends JsonSchema implements SchemaListValidator { private static Schema9 instance; + protected Schema9() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static Schema9 getInstance() { @@ -187,9 +185,10 @@ public static class ComposedAnyOfDifferentTypesNoValidations1 extends JsonSchema Do not edit the class manually. */ private static ComposedAnyOfDifferentTypesNoValidations1 instance; + protected ComposedAnyOfDifferentTypesNoValidations1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + super(new JsonSchemaInfo() + .anyOf(List.of( Schema0.class, Schema1.class, Schema2.class, @@ -206,8 +205,8 @@ protected ComposedAnyOfDifferentTypesNoValidations1() { Schema13.class, Schema14.class, Schema15.class - ))) - ))); + )) + ); } public static ComposedAnyOfDifferentTypesNoValidations1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedArray.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedArray.java index d3d0bf6ddb0..48365009b74 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedArray.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedArray.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedArray { @@ -50,11 +48,12 @@ public static class ComposedArray1 extends JsonSchema implements SchemaListValid Do not edit the class manually. */ private static ComposedArray1 instance; + protected ComposedArray1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static ComposedArray1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java index 99e5add3922..b12ffb63cfe 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedBool { @@ -35,13 +33,14 @@ public static class ComposedBool1 extends JsonSchema implements SchemaBooleanVal Do not edit the class manually. */ private static ComposedBool1 instance; + protected ComposedBool1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static ComposedBool1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java index f02852c98d9..260109862be 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedNone { @@ -35,13 +33,14 @@ public static class ComposedNone1 extends JsonSchema implements SchemaNullValida Do not edit the class manually. */ private static ComposedNone1 instance; + protected ComposedNone1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Void.class))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .type(Set.of(Void.class)) + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static ComposedNone1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java index d056e3ddafb..95b0ca13a07 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedNumber { @@ -35,18 +33,19 @@ public static class ComposedNumber1 extends JsonSchema implements SchemaNumberVa Do not edit the class manually. */ private static ComposedNumber1 instance; + protected ComposedNumber1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + ) + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static ComposedNumber1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java index f8c470af297..e9390e1a43a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java @@ -12,13 +12,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedObject { @@ -36,13 +34,14 @@ public static class ComposedObject1 extends JsonSchema implements SchemaMapValid Do not edit the class manually. */ private static ComposedObject1 instance; + protected ComposedObject1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static ComposedObject1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java index 6895797984f..a8eb0968dbc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java @@ -18,26 +18,17 @@ import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.DateJsonSchema; import org.openapijsonschematools.client.schemas.NullJsonSchema; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaxItemsValidator; -import org.openapijsonschematools.client.schemas.validation.MaxPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.MinItemsValidator; -import org.openapijsonschematools.client.schemas.validation.MinPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedOneOfDifferentTypes { @@ -52,12 +43,13 @@ public static class Schema3 extends DateJsonSchema {} public static class Schema4 extends JsonSchema implements SchemaMapValidator> { private static Schema4 instance; + protected Schema4() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("maxProperties", new MaxPropertiesValidator(4)), - new KeywordEntry("minProperties", new MinPropertiesValidator(4)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .maxProperties(4) + .minProperties(4) + ); } public static Schema4 getInstance() { @@ -129,13 +121,14 @@ public static class Schema5ListInput { public static class Schema5 extends JsonSchema implements SchemaListValidator { private static Schema5 instance; + protected Schema5() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)), - new KeywordEntry("maxItems", new MaxItemsValidator(4)), - new KeywordEntry("minItems", new MinItemsValidator(4)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + .maxItems(4) + .minItems(4) + ); } public static Schema5 getInstance() { @@ -201,15 +194,15 @@ public static class Schema6 extends JsonSchema implements SchemaStringValidator private static Schema6 instance; protected Schema6() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("date-time")), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .format("date-time") + .pattern(Pattern.compile( "^2020.*" - ))) - ))); + )) + ); } public static Schema6 getInstance() { @@ -259,9 +252,10 @@ public static class ComposedOneOfDifferentTypes1 extends JsonSchema implements S this is a model that allows payloads of type object or number */ private static ComposedOneOfDifferentTypes1 instance; + protected ComposedOneOfDifferentTypes1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( NumberWithValidations.NumberWithValidations1.class, Animal.Animal1.class, Schema2.class, @@ -269,8 +263,8 @@ protected ComposedOneOfDifferentTypes1() { Schema4.class, Schema5.class, Schema6.class - ))) - ))); + )) + ); } public static ComposedOneOfDifferentTypes1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java index 6898296a823..e5b98f4f40a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComposedString { @@ -37,14 +35,14 @@ public static class ComposedString1 extends JsonSchema implements SchemaStringVa private static ComposedString1 instance; protected ComposedString1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + ) + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static ComposedString1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java index fe424e8db8d..ca763255fee 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Currency { @@ -34,15 +32,15 @@ public static class Currency1 extends JsonSchema implements SchemaStringValidato private static Currency1 instance; protected Currency1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "eur", "usd" - ))) - ))); + )) + ); } public static Currency1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java index 3fbe1c5d331..c82f6502b1f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java @@ -12,17 +12,13 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class DanishPig { @@ -33,14 +29,14 @@ public static class ClassName extends JsonSchema implements SchemaStringValidato private static ClassName instance; protected ClassName() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "DanishPig" - ))) - ))); + )) + ); } public static ClassName getInstance() { @@ -115,16 +111,17 @@ public static class DanishPig1 extends JsonSchema implements SchemaMapValidator< Do not edit the class manually. */ private static DanishPig1 instance; + protected DanishPig1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("className", ClassName.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "className" - ))) - ))); + )) + ); } public static DanishPig1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java index b8c21e381ae..6b565f46d38 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class DateTimeTest { @@ -34,12 +32,12 @@ public static class DateTimeTest1 extends JsonSchema implements SchemaStringVali private static DateTimeTest1 instance; protected DateTimeTest1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + ) + .format("date-time") + ); } public static DateTimeTest1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java index 30b5be7c392..ae53f88bcc3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java @@ -13,13 +13,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class DateTimeWithValidations { @@ -36,15 +33,15 @@ public static class DateTimeWithValidations1 extends JsonSchema implements Schem private static DateTimeWithValidations1 instance; protected DateTimeWithValidations1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("date-time")), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .format("date-time") + .pattern(Pattern.compile( "^2020.*" - ))) - ))); + )) + ); } public static DateTimeWithValidations1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java index 28a41a7d1cb..8ca5ab3af7a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java @@ -13,13 +13,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class DateWithValidations { @@ -36,15 +33,15 @@ public static class DateWithValidations1 extends JsonSchema implements SchemaStr private static DateWithValidations1 instance; protected DateWithValidations1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("date")), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .format("date") + .pattern(Pattern.compile( "^2020.*" - ))) - ))); + )) + ); } public static DateWithValidations1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java index e749ffb74b7..e920cc6d904 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java @@ -15,13 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Dog { @@ -70,13 +67,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("breed", Breed.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -147,13 +145,14 @@ public static class Dog1 extends JsonSchema implements SchemaNullValidator, Sche Do not edit the class manually. */ private static Dog1 instance; + protected Dog1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Animal.Animal1.class, Schema1.class - ))) - ))); + )) + ); } public static Dog1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Drawing.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Drawing.java index be55fc770e0..e3dcdbf5f7c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Drawing.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Drawing.java @@ -14,15 +14,12 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Drawing { @@ -45,11 +42,12 @@ public static class ShapesListInput { public static class Shapes extends JsonSchema implements SchemaListValidator { private static Shapes instance; + protected Shapes() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Shape.Shape1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Shape.Shape1.class) + ); } public static Shapes getInstance() { @@ -168,17 +166,18 @@ public static class Drawing1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("mainShape", Shape.Shape1.class), new PropertyEntry("shapeOrNull", ShapeOrNull.ShapeOrNull1.class), new PropertyEntry("nullableShape", NullableShape.NullableShape1.class), new PropertyEntry("shapes", Shapes.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(Fruit.Fruit1.class)) - ))); + )) + .additionalProperties(Fruit.Fruit1.class) + ); } public static Drawing1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java index fc57717fddb..57e13c38c67 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java @@ -12,19 +12,15 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumArrays { @@ -35,15 +31,15 @@ public static class JustSymbol extends JsonSchema implements SchemaStringValidat private static JustSymbol instance; protected JustSymbol() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( ">=", "$" - ))) - ))); + )) + ); } public static JustSymbol getInstance() { @@ -87,15 +83,15 @@ public static class Items extends JsonSchema implements SchemaStringValidator { private static Items instance; protected Items() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "fish", "crab" - ))) - ))); + )) + ); } public static Items getInstance() { @@ -151,11 +147,12 @@ public static class ArrayEnumListInput { public static class ArrayEnum extends JsonSchema implements SchemaListValidator { private static ArrayEnum instance; + protected ArrayEnum() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static ArrayEnum getInstance() { @@ -261,14 +258,15 @@ public static class EnumArrays1 extends JsonSchema implements SchemaMapValidator Do not edit the class manually. */ private static EnumArrays1 instance; + protected EnumArrays1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("just_symbol", JustSymbol.class), new PropertyEntry("array_enum", ArrayEnum.class) - ))) - ))); + )) + ); } public static EnumArrays1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java index 3ceb0807e64..99286295f2d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumClass { @@ -34,18 +32,18 @@ public static class EnumClass1 extends JsonSchema implements SchemaStringValidat private static EnumClass1 instance; protected EnumClass1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "_abc", "-efg", "(xyz)", "COUNT_1M", "COUNT_50M" - ))) - ))); + )) + ); } public static EnumClass1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java index 16306831a66..3765f0a2bba 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java @@ -12,19 +12,14 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EnumTest { @@ -35,16 +30,16 @@ public static class EnumString extends JsonSchema implements SchemaStringValidat private static EnumString instance; protected EnumString() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "UPPER", "lower", "" - ))) - ))); + )) + ); } public static EnumString getInstance() { @@ -88,16 +83,16 @@ public static class EnumStringRequired extends JsonSchema implements SchemaStrin private static EnumStringRequired instance; protected EnumStringRequired() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "UPPER", "lower", "" - ))) - ))); + )) + ); } public static EnumStringRequired getInstance() { @@ -139,20 +134,21 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class EnumInteger extends JsonSchema implements SchemaNumberValidator { private static EnumInteger instance; + protected EnumInteger() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int32")), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .format("int32") + .enumValues(SetMaker.makeSet( 1, -1 - ))) - ))); + )) + ); } public static EnumInteger getInstance() { @@ -202,20 +198,21 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class EnumNumber extends JsonSchema implements SchemaNumberValidator { private static EnumNumber instance; + protected EnumNumber() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("double")), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .format("double") + .enumValues(SetMaker.makeSet( 1.1, -1.2 - ))) - ))); + )) + ); } public static EnumNumber getInstance() { @@ -350,10 +347,11 @@ public static class EnumTest1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("enum_string", EnumString.class), new PropertyEntry("enum_string_required", EnumStringRequired.class), new PropertyEntry("enum_integer", EnumInteger.class), @@ -363,11 +361,11 @@ protected EnumTest1() { new PropertyEntry("StringEnumWithDefaultValue", StringEnumWithDefaultValue.StringEnumWithDefaultValue1.class), new PropertyEntry("IntegerEnumWithDefaultValue", IntegerEnumWithDefaultValue.IntegerEnumWithDefaultValue1.class), new PropertyEntry("IntegerEnumOneValue", IntegerEnumOneValue.IntegerEnumOneValue1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "enum_string_required" - ))) - ))); + )) + ); } public static EnumTest1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java index b009866b3af..8734fc5b07f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java @@ -15,14 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EquilateralTriangle { @@ -41,14 +37,14 @@ public static class TriangleType extends JsonSchema implements SchemaStringValid private static TriangleType instance; protected TriangleType() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "EquilateralTriangle" - ))) - ))); + )) + ); } public static TriangleType getInstance() { @@ -119,13 +115,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("triangleType", TriangleType.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -196,13 +193,14 @@ public static class EquilateralTriangle1 extends JsonSchema implements SchemaNul Do not edit the class manually. */ private static EquilateralTriangle1 instance; + protected EquilateralTriangle1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( TriangleInterface.TriangleInterface1.class, Schema1.class - ))) - ))); + )) + ); } public static EquilateralTriangle1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/File.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/File.java index a7ddee91fcb..8064bdd5d2f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/File.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/File.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class File { @@ -68,13 +66,14 @@ public static class File1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("sourceURI", SourceURI.class) - ))) - ))); + )) + ); } public static File1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FileSchemaTestClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FileSchemaTestClass.java index 3bb47179f1c..722c211c55e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FileSchemaTestClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FileSchemaTestClass.java @@ -13,15 +13,12 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class FileSchemaTestClass { @@ -44,11 +41,12 @@ public static class FilesListInput { public static class Files extends JsonSchema implements SchemaListValidator, FrozenMap, FilesList> { private static Files instance; + protected Files() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(File.File1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(File.File1.class) + ); } public static Files getInstance() { @@ -154,14 +152,15 @@ public static class FileSchemaTestClass1 extends JsonSchema implements SchemaMap Do not edit the class manually. */ private static FileSchemaTestClass1 instance; + protected FileSchemaTestClass1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("file", File.File1.class), new PropertyEntry("files", Files.class) - ))) - ))); + )) + ); } public static FileSchemaTestClass1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Foo.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Foo.java index c79b74d4c8e..2ee34895be8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Foo.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Foo.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Foo { @@ -62,13 +60,14 @@ public static class Foo1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.Bar1.class) - ))) - ))); + )) + ); } public static Foo1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java index 830a5c3d424..3928eaab32a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java @@ -22,28 +22,16 @@ import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UuidJsonSchema; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; -import org.openapijsonschematools.client.schemas.validation.MultipleOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; -import org.openapijsonschematools.client.schemas.validation.UniqueItemsValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class FormatTest { @@ -52,18 +40,19 @@ public class FormatTest { public static class IntegerSchema extends JsonSchema implements SchemaNumberValidator { private static IntegerSchema instance; + protected IntegerSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("maximum", new MaximumValidator(100)), - new KeywordEntry("minimum", new MinimumValidator(10)), - new KeywordEntry("multipleOf", new MultipleOfValidator(2)) - ))); + ) + .maximum(100) + .minimum(10) + .multipleOf(2) + ); } public static IntegerSchema getInstance() { @@ -124,18 +113,19 @@ public static class Int32 extends Int32JsonSchema {} public static class Int32withValidations extends JsonSchema implements SchemaNumberValidator { private static Int32withValidations instance; + protected Int32withValidations() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int32")), - new KeywordEntry("maximum", new MaximumValidator(200)), - new KeywordEntry("minimum", new MinimumValidator(20)) - ))); + ) + .format("int32") + .maximum(200) + .minimum(20) + ); } public static Int32withValidations getInstance() { @@ -188,18 +178,19 @@ public static class Int64 extends Int64JsonSchema {} public static class NumberSchema extends JsonSchema implements SchemaNumberValidator { private static NumberSchema instance; + protected NumberSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("maximum", new MaximumValidator(543.2)), - new KeywordEntry("minimum", new MinimumValidator(32.1)), - new KeywordEntry("multipleOf", new MultipleOfValidator(32.5)) - ))); + ) + .maximum(543.2) + .minimum(32.1) + .multipleOf(32.5) + ); } public static NumberSchema getInstance() { @@ -256,18 +247,19 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class FloatSchema extends JsonSchema implements SchemaNumberValidator { private static FloatSchema instance; + protected FloatSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("float")), - new KeywordEntry("maximum", new MaximumValidator(987.6)), - new KeywordEntry("minimum", new MinimumValidator(54.3)) - ))); + ) + .format("float") + .maximum(987.6) + .minimum(54.3) + ); } public static FloatSchema getInstance() { @@ -315,18 +307,19 @@ public static class Float32 extends FloatJsonSchema {} public static class DoubleSchema extends JsonSchema implements SchemaNumberValidator { private static DoubleSchema instance; + protected DoubleSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("double")), - new KeywordEntry("maximum", new MaximumValidator(123.4)), - new KeywordEntry("minimum", new MinimumValidator(67.8)) - ))); + ) + .format("double") + .maximum(123.4) + .minimum(67.8) + ); } public static DoubleSchema getInstance() { @@ -391,12 +384,13 @@ public static class ArrayWithUniqueItemsListInput { public static class ArrayWithUniqueItems extends JsonSchema implements SchemaListValidator { private static ArrayWithUniqueItems instance; + protected ArrayWithUniqueItems() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)), - new KeywordEntry("uniqueItems", new UniqueItemsValidator(true)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + .uniqueItems(true) + ); } public static ArrayWithUniqueItems getInstance() { @@ -462,15 +456,15 @@ public static class StringSchema extends JsonSchema implements SchemaStringValid private static StringSchema instance; protected StringSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .pattern(Pattern.compile( "[a-z]", Pattern.CASE_INSENSITIVE - ))) - ))); + )) + ); } public static StringSchema getInstance() { @@ -534,14 +528,14 @@ public static class Password extends JsonSchema implements SchemaStringValidator private static Password instance; protected Password() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("password")), - new KeywordEntry("maxLength", new MaxLengthValidator(64)), - new KeywordEntry("minLength", new MinLengthValidator(10)) - ))); + ) + .format("password") + .maxLength(64) + .minLength(10) + ); } public static Password getInstance() { @@ -585,14 +579,14 @@ public static class PatternWithDigits extends JsonSchema implements SchemaString private static PatternWithDigits instance; protected PatternWithDigits() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .pattern(Pattern.compile( "^\\d{10}$" - ))) - ))); + )) + ); } public static PatternWithDigits getInstance() { @@ -636,15 +630,15 @@ public static class PatternWithDigitsAndDelimiter extends JsonSchema implements private static PatternWithDigitsAndDelimiter instance; protected PatternWithDigitsAndDelimiter() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .pattern(Pattern.compile( "^image_\\d{1,3}$", Pattern.CASE_INSENSITIVE - ))) - ))); + )) + ); } public static PatternWithDigitsAndDelimiter getInstance() { @@ -819,10 +813,11 @@ public static class FormatTest1 extends JsonSchema implements SchemaMapValidator Do not edit the class manually. */ private static FormatTest1 instance; + protected FormatTest1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("integer", IntegerSchema.class), new PropertyEntry("int32", Int32.class), new PropertyEntry("int32withValidations", Int32withValidations.class), @@ -844,14 +839,14 @@ protected FormatTest1() { new PropertyEntry("pattern_with_digits", PatternWithDigits.class), new PropertyEntry("pattern_with_digits_and_delimiter", PatternWithDigitsAndDelimiter.class), new PropertyEntry("noneProp", NoneProp.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "byte", "date", "number", "password" - ))) - ))); + )) + ); } public static FormatTest1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FromSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FromSchema.java index d6367a00a5a..f07b849a92b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FromSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FromSchema.java @@ -15,12 +15,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class FromSchema { @@ -77,14 +75,15 @@ public static class FromSchema1 extends JsonSchema implements SchemaMapValidator Do not edit the class manually. */ private static FromSchema1 instance; + protected FromSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("data", Data.class), new PropertyEntry("id", Id.class) - ))) - ))); + )) + ); } public static FromSchema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Fruit.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Fruit.java index 861ab2858af..032cbdaab38 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Fruit.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Fruit.java @@ -18,10 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -75,16 +73,17 @@ public static class Fruit1 extends JsonSchema implements SchemaNullValidator, Sc Do not edit the class manually. */ private static Fruit1 instance; + protected Fruit1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("color", Color.class) - ))), - new KeywordEntry("oneOf", new OneOfValidator(List.of( + )) + .oneOf(List.of( Apple.Apple1.class, Banana.Banana1.class - ))) - ))); + )) + ); } public static Fruit1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java index d95e28a3444..d6a5e964d3a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java @@ -18,8 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -44,14 +43,15 @@ public static class FruitReq1 extends JsonSchema implements SchemaNullValidator, Do not edit the class manually. */ private static FruitReq1 instance; + protected FruitReq1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( Schema0.class, AppleReq.AppleReq1.class, BananaReq.BananaReq1.class - ))) - ))); + )) + ); } public static FruitReq1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GmFruit.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GmFruit.java index 42c9e70dc1d..0b48ff8c8e2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GmFruit.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GmFruit.java @@ -15,13 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AnyOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -75,16 +73,17 @@ public static class GmFruit1 extends JsonSchema implements SchemaNullValidator, Do not edit the class manually. */ private static GmFruit1 instance; + protected GmFruit1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("color", Color.class) - ))), - new KeywordEntry("anyOf", new AnyOfValidator(List.of( + )) + .anyOf(List.of( Apple.Apple1.class, Banana.Banana1.class - ))) - ))); + )) + ); } public static GmFruit1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GrandparentAnimal.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GrandparentAnimal.java index 5eff2ee2c46..ddf9df3ea9c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GrandparentAnimal.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/GrandparentAnimal.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class GrandparentAnimal { @@ -65,16 +62,17 @@ public static class GrandparentAnimal1 extends JsonSchema implements SchemaMapVa Do not edit the class manually. */ private static GrandparentAnimal1 instance; + protected GrandparentAnimal1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("pet_type", PetType.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "pet_type" - ))) - ))); + )) + ); } public static GrandparentAnimal1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HasOnlyReadOnly.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HasOnlyReadOnly.java index 8f2e014cede..10da1ce02c9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HasOnlyReadOnly.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HasOnlyReadOnly { @@ -76,14 +74,15 @@ public static class HasOnlyReadOnly1 extends JsonSchema implements SchemaMapVali Do not edit the class manually. */ private static HasOnlyReadOnly1 instance; + protected HasOnlyReadOnly1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class), new PropertyEntry("foo", Foo.class) - ))) - ))); + )) + ); } public static HasOnlyReadOnly1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java index dd06f267bd2..0f9c2780c7f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java @@ -14,14 +14,12 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HealthCheckResult { @@ -30,13 +28,14 @@ public class HealthCheckResult { public static class NullableMessage extends JsonSchema implements SchemaNullValidator, SchemaStringValidator { private static NullableMessage instance; + protected NullableMessage() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, String.class - ))) - ))); + ) + ); } public static NullableMessage getInstance() { @@ -138,13 +137,14 @@ public static class HealthCheckResult1 extends JsonSchema implements SchemaMapVa Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. */ private static HealthCheckResult1 instance; + protected HealthCheckResult1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("NullableMessage", NullableMessage.class) - ))) - ))); + )) + ); } public static HealthCheckResult1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java index f508c4a63fc..420a62b6eaa 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IntegerEnum { @@ -32,20 +30,21 @@ public static class IntegerEnum1 extends JsonSchema implements SchemaNumberValid Do not edit the class manually. */ private static IntegerEnum1 instance; + protected IntegerEnum1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( 0, 1, 2 - ))) - ))); + )) + ); } public static IntegerEnum1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java index a5f0c9fd7b5..047194706a7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IntegerEnumBig { @@ -32,20 +30,21 @@ public static class IntegerEnumBig1 extends JsonSchema implements SchemaNumberVa Do not edit the class manually. */ private static IntegerEnumBig1 instance; + protected IntegerEnumBig1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( 10, 11, 12 - ))) - ))); + )) + ); } public static IntegerEnumBig1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java index a5f1c0d1512..8e54ca75dc4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IntegerEnumOneValue { @@ -32,18 +30,19 @@ public static class IntegerEnumOneValue1 extends JsonSchema implements SchemaNum Do not edit the class manually. */ private static IntegerEnumOneValue1 instance; + protected IntegerEnumOneValue1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( 0 - ))) - ))); + )) + ); } public static IntegerEnumOneValue1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java index eb82edd3fc5..4bcee7ab8cd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IntegerEnumWithDefaultValue { @@ -32,20 +30,21 @@ public static class IntegerEnumWithDefaultValue1 extends JsonSchema implements S Do not edit the class manually. */ private static IntegerEnumWithDefaultValue1 instance; + protected IntegerEnumWithDefaultValue1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( 0, 1, 2 - ))) - ))); + )) + ); } public static IntegerEnumWithDefaultValue1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java index 1b92c6cd408..ee7ad8cfba3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java @@ -11,13 +11,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IntegerMax10 { @@ -32,17 +29,18 @@ public static class IntegerMax101 extends JsonSchema implements SchemaNumberVali Do not edit the class manually. */ private static IntegerMax101 instance; + protected IntegerMax101() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int64")), - new KeywordEntry("maximum", new MaximumValidator(10)) - ))); + ) + .format("int64") + .maximum(10) + ); } public static IntegerMax101 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java index 50572bebc14..1bfc2b2061f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java @@ -11,13 +11,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IntegerMin15 { @@ -32,17 +29,18 @@ public static class IntegerMin151 extends JsonSchema implements SchemaNumberVali Do not edit the class manually. */ private static IntegerMin151 instance; + protected IntegerMin151() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int64")), - new KeywordEntry("minimum", new MinimumValidator(15)) - ))); + ) + .format("int64") + .minimum(15) + ); } public static IntegerMin151 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java index 91bddd2498a..b64bbbf5381 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java @@ -15,14 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IsoscelesTriangle { @@ -41,14 +37,14 @@ public static class TriangleType extends JsonSchema implements SchemaStringValid private static TriangleType instance; protected TriangleType() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "IsoscelesTriangle" - ))) - ))); + )) + ); } public static TriangleType getInstance() { @@ -119,13 +115,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("triangleType", TriangleType.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -196,13 +193,14 @@ public static class IsoscelesTriangle1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static IsoscelesTriangle1 instance; + protected IsoscelesTriangle1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( TriangleInterface.TriangleInterface1.class, Schema1.class - ))) - ))); + )) + ); } public static IsoscelesTriangle1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Items.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Items.java index 544ca25efe0..9a3bef2b87a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Items.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Items.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.MapJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Items { @@ -53,11 +51,12 @@ public static class Items1 extends JsonSchema implements SchemaListValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items2.class) + ); } public static Items1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequest.java index 389806c6d66..be0e2615a10 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequest.java @@ -16,10 +16,8 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -27,7 +25,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class JSONPatchRequest { @@ -36,14 +33,15 @@ public class JSONPatchRequest { public static class Items extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Items instance; + protected Items() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( JSONPatchRequestAddReplaceTest.JSONPatchRequestAddReplaceTest1.class, JSONPatchRequestRemove.JSONPatchRequestRemove1.class, JSONPatchRequestMoveCopy.JSONPatchRequestMoveCopy1.class - ))) - ))); + )) + ); } public static Items getInstance() { @@ -272,11 +270,12 @@ public static class JSONPatchRequest1 extends JsonSchema implements SchemaListVa Do not edit the class manually. */ private static JSONPatchRequest1 instance; + protected JSONPatchRequest1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static JSONPatchRequest1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java index 8a81f2c9911..7d24180313c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java @@ -16,17 +16,13 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class JSONPatchRequestAddReplaceTest { @@ -47,16 +43,16 @@ public static class Op extends JsonSchema implements SchemaStringValidator { private static Op instance; protected Op() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "add", "replace", "test" - ))) - ))); + )) + ); } public static Op getInstance() { @@ -135,21 +131,22 @@ public static class JSONPatchRequestAddReplaceTest1 extends JsonSchema implement Do not edit the class manually. */ private static JSONPatchRequestAddReplaceTest1 instance; + protected JSONPatchRequestAddReplaceTest1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("path", Path.class), new PropertyEntry("value", Value.class), new PropertyEntry("op", Op.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "op", "path", "value" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static JSONPatchRequestAddReplaceTest1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java index f9085fddf3a..c5148a0bde9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java @@ -16,17 +16,13 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class JSONPatchRequestMoveCopy { @@ -47,15 +43,15 @@ public static class Op extends JsonSchema implements SchemaStringValidator { private static Op instance; protected Op() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "move", "copy" - ))) - ))); + )) + ); } public static Op getInstance() { @@ -134,21 +130,22 @@ public static class JSONPatchRequestMoveCopy1 extends JsonSchema implements Sche Do not edit the class manually. */ private static JSONPatchRequestMoveCopy1 instance; + protected JSONPatchRequestMoveCopy1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("from", From.class), new PropertyEntry("path", Path.class), new PropertyEntry("op", Op.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "from", "op", "path" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static JSONPatchRequestMoveCopy1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java index cd84ea5c146..db4c02b2a8a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java @@ -16,17 +16,13 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class JSONPatchRequestRemove { @@ -44,14 +40,14 @@ public static class Op extends JsonSchema implements SchemaStringValidator { private static Op instance; protected Op() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "remove" - ))) - ))); + )) + ); } public static Op getInstance() { @@ -125,19 +121,20 @@ public static class JSONPatchRequestRemove1 extends JsonSchema implements Schema Do not edit the class manually. */ private static JSONPatchRequestRemove1 instance; + protected JSONPatchRequestRemove1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("path", Path.class), new PropertyEntry("op", Op.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "op", "path" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static JSONPatchRequestRemove1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Mammal.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Mammal.java index f3cc545e8a9..26b4a0cb27a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Mammal.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Mammal.java @@ -17,8 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -40,14 +39,15 @@ public static class Mammal1 extends JsonSchema implements SchemaNullValidator, S Do not edit the class manually. */ private static Mammal1 instance; + protected Mammal1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( Whale.Whale1.class, Zebra.Zebra1.class, Pig.Pig1.class - ))) - ))); + )) + ); } public static Mammal1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java index b06ddd1b413..6a1360b464d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java @@ -15,16 +15,13 @@ import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class MapTest { @@ -56,11 +53,12 @@ public static class AdditionalPropertiesMapInput { public static class AdditionalProperties extends JsonSchema implements SchemaMapValidator { private static AdditionalProperties instance; + protected AdditionalProperties() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties1.class) + ); } public static AdditionalProperties getInstance() { @@ -145,11 +143,12 @@ public static class MapMapOfStringMapInput { public static class MapMapOfString extends JsonSchema implements SchemaMapValidator, FrozenMap, MapMapOfStringMap> { private static MapMapOfString instance; + protected MapMapOfString() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static MapMapOfString getInstance() { @@ -216,15 +215,15 @@ public static class AdditionalProperties2 extends JsonSchema implements SchemaSt private static AdditionalProperties2 instance; protected AdditionalProperties2() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "UPPER", "lower" - ))) - ))); + )) + ); } public static AdditionalProperties2 getInstance() { @@ -286,11 +285,12 @@ public static class MapOfEnumStringMapInput { public static class MapOfEnumString extends JsonSchema implements SchemaMapValidator { private static MapOfEnumString instance; + protected MapOfEnumString() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties2.class) + ); } public static MapOfEnumString getInstance() { @@ -378,11 +378,12 @@ public static class DirectMapMapInput { public static class DirectMap extends JsonSchema implements SchemaMapValidator { private static DirectMap instance; + protected DirectMap() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties3.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties3.class) + ); } public static DirectMap getInstance() { @@ -503,16 +504,17 @@ public static class MapTest1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("map_map_of_string", MapMapOfString.class), new PropertyEntry("map_of_enum_string", MapOfEnumString.class), new PropertyEntry("direct_map", DirectMap.class), new PropertyEntry("indirect_map", StringBooleanMap.StringBooleanMap1.class) - ))) - ))); + )) + ); } public static MapTest1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java index 2238b4098c4..978c32a9b98 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java @@ -16,12 +16,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class MixedPropertiesAndAdditionalPropertiesClass { @@ -56,11 +54,12 @@ public static class MapMapInput { public static class MapSchema extends JsonSchema implements SchemaMapValidator, FrozenMap, MapMap> { private static MapSchema instance; + protected MapSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(Animal.Animal1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(Animal.Animal1.class) + ); } public static MapSchema getInstance() { @@ -162,15 +161,16 @@ public static class MixedPropertiesAndAdditionalPropertiesClass1 extends JsonSch Do not edit the class manually. */ private static MixedPropertiesAndAdditionalPropertiesClass1 instance; + protected MixedPropertiesAndAdditionalPropertiesClass1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("uuid", UuidSchema.class), new PropertyEntry("dateTime", DateTime.class), new PropertyEntry("map", MapSchema.class) - ))) - ))); + )) + ); } public static MixedPropertiesAndAdditionalPropertiesClass1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java index c6a5263c763..4f46ea285ab 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Money { @@ -71,19 +68,20 @@ public static class Money1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("amount", Amount.class), new PropertyEntry("currency", Currency.Currency1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "amount", "currency" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static Money1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java index 2e0fc579fe8..30d8548adfb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class MyObjectDto { @@ -67,14 +65,15 @@ public static class MyObjectDto1 extends JsonSchema implements SchemaMapValidato Do not edit the class manually. */ private static MyObjectDto1 instance; + protected MyObjectDto1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Id.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static MyObjectDto1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Name.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Name.java index 1bed8d16fa9..88a7437f521 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Name.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Name.java @@ -19,11 +19,9 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; @@ -97,17 +95,18 @@ public static class Name1 extends JsonSchema implements SchemaNullValidator, Sch Model for testing model name same as property name */ private static Name1 instance; + protected Name1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("name", Name2.class), new PropertyEntry("snake_case", SnakeCase.class), new PropertyEntry("property", Property.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "name" - ))) - ))); + )) + ); } public static Name1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java index 23faf1a3843..a3a696cadef 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NoAdditionalProperties { @@ -77,18 +74,19 @@ public static class NoAdditionalProperties1 extends JsonSchema implements Schema Do not edit the class manually. */ private static NoAdditionalProperties1 instance; + protected NoAdditionalProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Id.class), new PropertyEntry("petId", PetId.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "id" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static NoAdditionalProperties1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java index 66266687b26..3514339499f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java @@ -15,14 +15,11 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.MapJsonSchema; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NullableClass { @@ -39,13 +35,14 @@ public class NullableClass { public static class AdditionalProperties3 extends JsonSchema implements SchemaNullValidator, SchemaMapValidator> { private static AdditionalProperties3 instance; + protected AdditionalProperties3() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))) - ))); + ) + ); } public static AdditionalProperties3 getInstance() { @@ -122,16 +119,17 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class IntegerProp extends JsonSchema implements SchemaNullValidator, SchemaNumberValidator { private static IntegerProp instance; + protected IntegerProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, Integer.class, Long.class, Float.class, Double.class - ))) - ))); + ) + ); } public static IntegerProp getInstance() { @@ -212,16 +210,17 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class NumberProp extends JsonSchema implements SchemaNullValidator, SchemaNumberValidator { private static NumberProp instance; + protected NumberProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, Integer.class, Long.class, Float.class, Double.class - ))) - ))); + ) + ); } public static NumberProp getInstance() { @@ -301,13 +300,14 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class BooleanProp extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator { private static BooleanProp instance; + protected BooleanProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, Boolean.class - ))) - ))); + ) + ); } public static BooleanProp getInstance() { @@ -373,13 +373,14 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class StringProp extends JsonSchema implements SchemaNullValidator, SchemaStringValidator { private static StringProp instance; + protected StringProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, String.class - ))) - ))); + ) + ); } public static StringProp getInstance() { @@ -444,14 +445,15 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class DateProp extends JsonSchema implements SchemaNullValidator, SchemaStringValidator { private static DateProp instance; + protected DateProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, String.class - ))), - new KeywordEntry("format", new FormatValidator("date")) - ))); + ) + .format("date") + ); } public static DateProp getInstance() { @@ -516,14 +518,15 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class DatetimeProp extends JsonSchema implements SchemaNullValidator, SchemaStringValidator { private static DatetimeProp instance; + protected DatetimeProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, String.class - ))), - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + ) + .format("date-time") + ); } public static DatetimeProp getInstance() { @@ -605,14 +608,15 @@ public static class ArrayNullablePropListInput { public static class ArrayNullableProp extends JsonSchema implements SchemaNullValidator, SchemaListValidator, FrozenMap, ArrayNullablePropList> { private static ArrayNullableProp instance; + protected ArrayNullableProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenList.class - ))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + ) + .items(Items.class) + ); } public static ArrayNullableProp getInstance() { @@ -699,13 +703,14 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Items1 extends JsonSchema implements SchemaNullValidator, SchemaMapValidator> { private static Items1 instance; + protected Items1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))) - ))); + ) + ); } public static Items1 getInstance() { @@ -796,14 +801,15 @@ public static class ArrayAndItemsNullablePropListInput { public static class ArrayAndItemsNullableProp extends JsonSchema implements SchemaNullValidator, SchemaListValidator, FrozenMap, ArrayAndItemsNullablePropList> { private static ArrayAndItemsNullableProp instance; + protected ArrayAndItemsNullableProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenList.class - ))), - new KeywordEntry("items", new ItemsValidator(Items1.class)) - ))); + ) + .items(Items1.class) + ); } public static ArrayAndItemsNullableProp getInstance() { @@ -890,13 +896,14 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Items2 extends JsonSchema implements SchemaNullValidator, SchemaMapValidator> { private static Items2 instance; + protected Items2() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))) - ))); + ) + ); } public static Items2 getInstance() { @@ -987,11 +994,12 @@ public static class ArrayItemsNullableListInput { public static class ArrayItemsNullable extends JsonSchema implements SchemaListValidator, FrozenMap, ArrayItemsNullableList> { private static ArrayItemsNullable instance; + protected ArrayItemsNullable() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items2.class) + ); } public static ArrayItemsNullable getInstance() { @@ -1078,14 +1086,15 @@ public static class ObjectNullablePropMapInput { public static class ObjectNullableProp extends JsonSchema implements SchemaNullValidator, SchemaMapValidator, FrozenMap, ObjectNullablePropMap> { private static ObjectNullableProp instance; + protected ObjectNullableProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + ) + .additionalProperties(AdditionalProperties.class) + ); } public static ObjectNullableProp getInstance() { @@ -1172,13 +1181,14 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class AdditionalProperties1 extends JsonSchema implements SchemaNullValidator, SchemaMapValidator> { private static AdditionalProperties1 instance; + protected AdditionalProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))) - ))); + ) + ); } public static AdditionalProperties1 getInstance() { @@ -1275,14 +1285,15 @@ public static class ObjectAndItemsNullablePropMapInput { public static class ObjectAndItemsNullableProp extends JsonSchema implements SchemaNullValidator, SchemaMapValidator, FrozenMap, ObjectAndItemsNullablePropMap> { private static ObjectAndItemsNullableProp instance; + protected ObjectAndItemsNullableProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties1.class)) - ))); + ) + .additionalProperties(AdditionalProperties1.class) + ); } public static ObjectAndItemsNullableProp getInstance() { @@ -1369,13 +1380,14 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class AdditionalProperties2 extends JsonSchema implements SchemaNullValidator, SchemaMapValidator> { private static AdditionalProperties2 instance; + protected AdditionalProperties2() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))) - ))); + ) + ); } public static AdditionalProperties2 getInstance() { @@ -1472,11 +1484,12 @@ public static class ObjectItemsNullableMapInput { public static class ObjectItemsNullable extends JsonSchema implements SchemaMapValidator, FrozenMap, ObjectItemsNullableMap> { private static ObjectItemsNullable instance; + protected ObjectItemsNullable() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties2.class) + ); } public static ObjectItemsNullable getInstance() { @@ -1652,10 +1665,11 @@ public static class NullableClass1 extends JsonSchema implements SchemaMapValida Do not edit the class manually. */ private static NullableClass1 instance; + protected NullableClass1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("integer_prop", IntegerProp.class), new PropertyEntry("number_prop", NumberProp.class), new PropertyEntry("boolean_prop", BooleanProp.class), @@ -1668,9 +1682,9 @@ protected NullableClass1() { new PropertyEntry("object_nullable_prop", ObjectNullableProp.class), new PropertyEntry("object_and_items_nullable_prop", ObjectAndItemsNullableProp.class), new PropertyEntry("object_items_nullable", ObjectItemsNullable.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties3.class)) - ))); + )) + .additionalProperties(AdditionalProperties3.class) + ); } public static NullableClass1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java index e7383447a89..292b37f5742 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java @@ -18,8 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -46,14 +45,15 @@ public static class NullableShape1 extends JsonSchema implements SchemaNullValid The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) */ private static NullableShape1 instance; + protected NullableShape1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( Triangle.Triangle1.class, Quadrilateral.Quadrilateral1.class, Schema2.class - ))) - ))); + )) + ); } public static NullableShape1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java index cff97e41a55..e132fb8a5ae 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NullableString { @@ -33,13 +32,14 @@ public static class NullableString1 extends JsonSchema implements SchemaNullVali Do not edit the class manually. */ private static NullableString1 instance; + protected NullableString1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, String.class - ))) - ))); + ) + ); } public static NullableString1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberOnly.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberOnly.java index b22867a3d01..6a9528066c4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberOnly.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberOnly.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NumberOnly { @@ -66,13 +64,14 @@ public static class NumberOnly1 extends JsonSchema implements SchemaMapValidator Do not edit the class manually. */ private static NumberOnly1 instance; + protected NumberOnly1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("JustNumber", JustNumber.class) - ))) - ))); + )) + ); } public static NumberOnly1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java index ed948852389..e3ea8f89daf 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java @@ -11,13 +11,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.ExclusiveMaximumValidator; -import org.openapijsonschematools.client.schemas.validation.ExclusiveMinimumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NumberWithExclusiveMinMax { @@ -32,17 +29,18 @@ public static class NumberWithExclusiveMinMax1 extends JsonSchema implements Sch Do not edit the class manually. */ private static NumberWithExclusiveMinMax1 instance; + protected NumberWithExclusiveMinMax1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("exclusiveMaximum", new ExclusiveMaximumValidator(12)), - new KeywordEntry("exclusiveMinimum", new ExclusiveMinimumValidator(10)) - ))); + ) + .exclusiveMaximum(12) + .exclusiveMinimum(10) + ); } public static NumberWithExclusiveMinMax1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java index f2b9f177dae..ecfc1bb08cf 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java @@ -12,12 +12,9 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class NumberWithValidations { @@ -32,17 +29,18 @@ public static class NumberWithValidations1 extends JsonSchema implements SchemaN Do not edit the class manually. */ private static NumberWithValidations1 instance; + protected NumberWithValidations1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("maximum", new MaximumValidator(20)), - new KeywordEntry("minimum", new MinimumValidator(10)) - ))); + ) + .maximum(20) + .minimum(10) + ); } public static NumberWithValidations1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredProps.java index b669fe7c6ca..8bc2ea47497 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredProps.java @@ -12,16 +12,12 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjWithRequiredProps { @@ -66,19 +62,20 @@ public static class ObjWithRequiredProps1 extends JsonSchema implements SchemaMa Do not edit the class manually. */ private static ObjWithRequiredProps1 instance; + protected ObjWithRequiredProps1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("a", A.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "a" - ))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + )) + .allOf(List.of( ObjWithRequiredPropsBase.ObjWithRequiredPropsBase1.class - ))) - ))); + )) + ); } public static ObjWithRequiredProps1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsBase.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsBase.java index bc829f9baa4..f76843b647c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsBase.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsBase.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjWithRequiredPropsBase { @@ -65,16 +62,17 @@ public static class ObjWithRequiredPropsBase1 extends JsonSchema implements Sche Do not edit the class manually. */ private static ObjWithRequiredPropsBase1 instance; + protected ObjWithRequiredPropsBase1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("b", B.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "b" - ))) - ))); + )) + ); } public static ObjWithRequiredPropsBase1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithArgAndArgsProperties.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithArgAndArgsProperties.java index 1e40f299df2..40ca5250307 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithArgAndArgsProperties.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithArgAndArgsProperties.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectModelWithArgAndArgsProperties { @@ -73,18 +70,19 @@ public static class ObjectModelWithArgAndArgsProperties1 extends JsonSchema impl Do not edit the class manually. */ private static ObjectModelWithArgAndArgsProperties1 instance; + protected ObjectModelWithArgAndArgsProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("arg", Arg.class), new PropertyEntry("args", Args.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "arg", "args" - ))) - ))); + )) + ); } public static ObjectModelWithArgAndArgsProperties1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java index c2650b27a22..ac7db323d3a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectModelWithRefProps { @@ -78,15 +76,16 @@ public static class ObjectModelWithRefProps1 extends JsonSchema implements Schem a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations */ private static ObjectModelWithRefProps1 instance; + protected ObjectModelWithRefProps1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("myNumber", NumberWithValidations.NumberWithValidations1.class), new PropertyEntry("myString", StringSchema.StringSchema1.class), new PropertyEntry("myBoolean", BooleanSchema.BooleanSchema1.class) - ))) - ))); + )) + ); } public static ObjectModelWithRefProps1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java index ab0086ae1d6..f9ede04611b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java @@ -15,22 +15,18 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithAllOfWithReqTestPropFromUnsetAddProp { @@ -77,16 +73,17 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("name", Name.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "test" - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -157,13 +154,14 @@ public static class ObjectWithAllOfWithReqTestPropFromUnsetAddProp1 extends Json Do not edit the class manually. */ private static ObjectWithAllOfWithReqTestPropFromUnsetAddProp1 instance; + protected ObjectWithAllOfWithReqTestPropFromUnsetAddProp1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( ObjectWithOptionalTestProp.ObjectWithOptionalTestProp1.class, Schema1.class - ))) - ))); + )) + ); } public static ObjectWithAllOfWithReqTestPropFromUnsetAddProp1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithCollidingProperties.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithCollidingProperties.java index 1c23195624c..32a290f14d9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithCollidingProperties.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithCollidingProperties.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.MapJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithCollidingProperties { @@ -78,14 +76,15 @@ public static class ObjectWithCollidingProperties1 extends JsonSchema implements component with properties that have name collisions */ private static ObjectWithCollidingProperties1 instance; + protected ObjectWithCollidingProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someProp", SomeProp.class), new PropertyEntry("someprop", Someprop.class) - ))) - ))); + )) + ); } public static ObjectWithCollidingProperties1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDecimalProperties.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDecimalProperties.java index bc8a22ffd30..d0055b4de6c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDecimalProperties.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDecimalProperties.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.DecimalJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithDecimalProperties { @@ -80,15 +78,16 @@ public static class ObjectWithDecimalProperties1 extends JsonSchema implements S Do not edit the class manually. */ private static ObjectWithDecimalProperties1 instance; + protected ObjectWithDecimalProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("length", DecimalPayload.DecimalPayload1.class), new PropertyEntry("width", Width.class), new PropertyEntry("cost", Money.Money1.class) - ))) - ))); + )) + ); } public static ObjectWithDecimalProperties1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDifficultlyNamedProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDifficultlyNamedProps.java index 06a82cd9a15..00563c50509 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDifficultlyNamedProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithDifficultlyNamedProps.java @@ -16,13 +16,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithDifficultlyNamedProps { @@ -74,18 +71,19 @@ public static class ObjectWithDifficultlyNamedProps1 extends JsonSchema implemen model with properties that have invalid names for python */ private static ObjectWithDifficultlyNamedProps1 instance; + protected ObjectWithDifficultlyNamedProps1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("$special[property.name]", Specialpropertyname.class), new PropertyEntry("123-list", Schema123list.class), new PropertyEntry("123Number", Schema123Number.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "123-list" - ))) - ))); + )) + ); } public static ObjectWithDifficultlyNamedProps1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java index 8e8508671ec..0cb572b1999 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java @@ -14,14 +14,11 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +26,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithInlineCompositionProperty { @@ -40,12 +36,12 @@ public static class Schema0 extends JsonSchema implements SchemaStringValidator private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .minLength(1) + ); } public static Schema0 getInstance() { @@ -87,12 +83,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class SomeProp extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static SomeProp instance; + protected SomeProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static SomeProp getInstance() { @@ -336,13 +333,14 @@ public static class ObjectWithInlineCompositionProperty1 extends JsonSchema impl Do not edit the class manually. */ private static ObjectWithInlineCompositionProperty1 instance; + protected ObjectWithInlineCompositionProperty1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someProp", SomeProp.class) - ))) - ))); + )) + ); } public static ObjectWithInlineCompositionProperty1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInvalidNamedRefedProperties.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInvalidNamedRefedProperties.java index 285b914d56a..99a81b4b1e6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInvalidNamedRefedProperties.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInvalidNamedRefedProperties.java @@ -13,13 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithInvalidNamedRefedProperties { @@ -62,18 +59,19 @@ public static class ObjectWithInvalidNamedRefedProperties1 extends JsonSchema im Do not edit the class manually. */ private static ObjectWithInvalidNamedRefedProperties1 instance; + protected ObjectWithInvalidNamedRefedProperties1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("from", FromSchema.FromSchema1.class), new PropertyEntry("!reference", ArrayWithValidationsInItems.ArrayWithValidationsInItems1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "!reference", "from" - ))) - ))); + )) + ); } public static ObjectWithInvalidNamedRefedProperties1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithNonIntersectingValues.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithNonIntersectingValues.java index 38515230ad4..3a32883dfef 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithNonIntersectingValues.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithNonIntersectingValues.java @@ -16,12 +16,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithNonIntersectingValues { @@ -70,14 +68,15 @@ public static class ObjectWithNonIntersectingValues1 extends JsonSchema implemen Do not edit the class manually. */ private static ObjectWithNonIntersectingValues1 instance; + protected ObjectWithNonIntersectingValues1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("a", A.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static ObjectWithNonIntersectingValues1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java index dc75cfdeaf7..3d8fb1190df 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java @@ -18,12 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithOnlyOptionalProps { @@ -78,15 +76,16 @@ public static class ObjectWithOnlyOptionalProps1 extends JsonSchema implements S Do not edit the class manually. */ private static ObjectWithOnlyOptionalProps1 instance; + protected ObjectWithOnlyOptionalProps1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("a", A.class), new PropertyEntry("b", B.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static ObjectWithOnlyOptionalProps1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOptionalTestProp.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOptionalTestProp.java index e429a8869b6..db41693fb4c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOptionalTestProp.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOptionalTestProp.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithOptionalTestProp { @@ -66,13 +64,14 @@ public static class ObjectWithOptionalTestProp1 extends JsonSchema implements Sc Do not edit the class manually. */ private static ObjectWithOptionalTestProp1 instance; + protected ObjectWithOptionalTestProp1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("test", Test.class) - ))) - ))); + )) + ); } public static ObjectWithOptionalTestProp1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithValidations.java index 8fb3df86e76..e082416d713 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithValidations.java @@ -13,11 +13,9 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinPropertiesValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ObjectWithValidations { @@ -32,11 +30,12 @@ public static class ObjectWithValidations1 extends JsonSchema implements SchemaM Do not edit the class manually. */ private static ObjectWithValidations1 instance; + protected ObjectWithValidations1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("minProperties", new MinPropertiesValidator(2)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .minProperties(2) + ); } public static ObjectWithValidations1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java index 687266d3a18..a2b04f76fae 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java @@ -16,16 +16,13 @@ import org.openapijsonschematools.client.schemas.Int32JsonSchema; import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Order { @@ -48,16 +45,16 @@ public static class Status extends JsonSchema implements SchemaStringValidator { private static Status instance; protected Status() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "placed", "approved", "delivered" - ))) - ))); + )) + ); } public static Status getInstance() { @@ -172,18 +169,19 @@ public static class Order1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Id.class), new PropertyEntry("petId", PetId.class), new PropertyEntry("quantity", Quantity.class), new PropertyEntry("shipDate", ShipDate.class), new PropertyEntry("status", Status.class), new PropertyEntry("complete", Complete.class) - ))) - ))); + )) + ); } public static Order1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java index 0c2c71fab11..e906b8e9c66 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java @@ -17,16 +17,12 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PaginatedResultMyObjectDto { @@ -56,11 +52,12 @@ public static class ResultsListInput { public static class Results extends JsonSchema implements SchemaListValidator, FrozenMap, ResultsList> { private static Results instance; + protected Results() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(MyObjectDto.MyObjectDto1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(MyObjectDto.MyObjectDto1.class) + ); } public static Results getInstance() { @@ -156,19 +153,20 @@ public static class PaginatedResultMyObjectDto1 extends JsonSchema implements Sc Do not edit the class manually. */ private static PaginatedResultMyObjectDto1 instance; + protected PaginatedResultMyObjectDto1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("count", Count.class), new PropertyEntry("results", Results.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "count", "results" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PaginatedResultMyObjectDto1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ParentPet.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ParentPet.java index 6b838ddb086..197321b8841 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ParentPet.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ParentPet.java @@ -11,13 +11,11 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ParentPet { @@ -32,13 +30,14 @@ public static class ParentPet1 extends JsonSchema implements SchemaMapValidator< Do not edit the class manually. */ private static ParentPet1 instance; + protected ParentPet1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .allOf(List.of( GrandparentAnimal.GrandparentAnimal1.class - ))) - ))); + )) + ); } public static ParentPet1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java index be6edccc288..bce174d916f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java @@ -14,20 +14,15 @@ import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Pet { @@ -59,11 +54,12 @@ public static class PhotoUrlsListInput { public static class PhotoUrls extends JsonSchema implements SchemaListValidator { private static PhotoUrls instance; + protected PhotoUrls() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static PhotoUrls getInstance() { @@ -129,16 +125,16 @@ public static class Status extends JsonSchema implements SchemaStringValidator { private static Status instance; protected Status() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "available", "pending", "sold" - ))) - ))); + )) + ); } public static Status getInstance() { @@ -194,11 +190,12 @@ public static class TagsListInput { public static class Tags extends JsonSchema implements SchemaListValidator, FrozenMap, TagsList> { private static Tags instance; + protected Tags() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Tag.Tag1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Tag.Tag1.class) + ); } public static Tags getInstance() { @@ -331,22 +328,23 @@ public static class Pet1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Id.class), new PropertyEntry("category", Category.Category1.class), new PropertyEntry("name", Name.class), new PropertyEntry("photoUrls", PhotoUrls.class), new PropertyEntry("tags", Tags.class), new PropertyEntry("status", Status.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "name", "photoUrls" - ))) - ))); + )) + ); } public static Pet1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pig.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pig.java index 35d7fe97206..250b27ca67f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pig.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pig.java @@ -17,8 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -40,13 +39,14 @@ public static class Pig1 extends JsonSchema implements SchemaNullValidator, Sche Do not edit the class manually. */ private static Pig1 instance; + protected Pig1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( BasquePig.BasquePig1.class, DanishPig.DanishPig1.class - ))) - ))); + )) + ); } public static Pig1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Player.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Player.java index 1f20bc325c0..654823876e0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Player.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Player.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Player { @@ -75,14 +73,15 @@ public static class Player1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("name", Name.class), new PropertyEntry("enemyPlayer", Player1.class) - ))) - ))); + )) + ); } public static Player1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PublicKey.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PublicKey.java index c806489fda7..8d26edbb383 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PublicKey.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PublicKey.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PublicKey { @@ -68,13 +66,14 @@ public static class PublicKey1 extends JsonSchema implements SchemaMapValidator< schema that contains a property named key */ private static PublicKey1 instance; + protected PublicKey1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("key", Key.class) - ))) - ))); + )) + ); } public static PublicKey1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Quadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Quadrilateral.java index 3019f4e6334..29f2f58f669 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Quadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Quadrilateral.java @@ -17,8 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -40,13 +39,14 @@ public static class Quadrilateral1 extends JsonSchema implements SchemaNullValid Do not edit the class manually. */ private static Quadrilateral1 instance; + protected Quadrilateral1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( SimpleQuadrilateral.SimpleQuadrilateral1.class, ComplexQuadrilateral.ComplexQuadrilateral1.class - ))) - ))); + )) + ); } public static Quadrilateral1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java index 781c26bfc26..493ce296f35 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java @@ -16,22 +16,18 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QuadrilateralInterface { @@ -42,14 +38,14 @@ public static class ShapeType extends JsonSchema implements SchemaStringValidato private static ShapeType instance; protected ShapeType() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "Quadrilateral" - ))) - ))); + )) + ); } public static ShapeType getInstance() { @@ -132,17 +128,18 @@ public static class QuadrilateralInterface1 extends JsonSchema implements Schema Do not edit the class manually. */ private static QuadrilateralInterface1 instance; + protected QuadrilateralInterface1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("shapeType", ShapeType.class), new PropertyEntry("quadrilateralType", QuadrilateralType.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "quadrilateralType", "shapeType" - ))) - ))); + )) + ); } public static QuadrilateralInterface1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReadOnlyFirst.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReadOnlyFirst.java index 63e341b4522..f463a88c639 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReadOnlyFirst.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReadOnlyFirst.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ReadOnlyFirst { @@ -76,14 +74,15 @@ public static class ReadOnlyFirst1 extends JsonSchema implements SchemaMapValida Do not edit the class manually. */ private static ReadOnlyFirst1 instance; + protected ReadOnlyFirst1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("bar", Bar.class), new PropertyEntry("baz", Baz.class) - ))) - ))); + )) + ); } public static ReadOnlyFirst1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddProps.java index f9fab9edc2f..1978483c082 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddProps.java @@ -15,11 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ReqPropsFromExplicitAddProps { @@ -64,15 +62,16 @@ public static class ReqPropsFromExplicitAddProps1 extends JsonSchema implements Do not edit the class manually. */ private static ReqPropsFromExplicitAddProps1 instance; + protected ReqPropsFromExplicitAddProps1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("required", new RequiredValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .required(Set.of( "invalid-name", "validName" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static ReqPropsFromExplicitAddProps1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddProps.java index 66725f74be4..865771efeab 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddProps.java @@ -15,11 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ReqPropsFromTrueAddProps { @@ -64,15 +62,16 @@ public static class ReqPropsFromTrueAddProps1 extends JsonSchema implements Sche Do not edit the class manually. */ private static ReqPropsFromTrueAddProps1 instance; + protected ReqPropsFromTrueAddProps1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("required", new RequiredValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .required(Set.of( "invalid-name", "validName" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static ReqPropsFromTrueAddProps1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddProps.java index 6ed2163eab8..24a04deb78c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddProps.java @@ -13,11 +13,9 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ReqPropsFromUnsetAddProps { @@ -60,14 +58,15 @@ public static class ReqPropsFromUnsetAddProps1 extends JsonSchema implements Sch Do not edit the class manually. */ private static ReqPropsFromUnsetAddProps1 instance; + protected ReqPropsFromUnsetAddProps1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("required", new RequiredValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .required(Set.of( "invalid-name", "validName" - ))) - ))); + )) + ); } public static ReqPropsFromUnsetAddProps1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReturnSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReturnSchema.java index 0338ffaa58b..d4426a59f39 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReturnSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ReturnSchema.java @@ -18,9 +18,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -70,12 +69,13 @@ public static class ReturnSchema1 extends JsonSchema implements SchemaNullValida Model for testing reserved words */ private static ReturnSchema1 instance; + protected ReturnSchema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("return", ReturnSchema2.class) - ))) - ))); + )) + ); } public static ReturnSchema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java index e1b071e12cf..85877506e7d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java @@ -15,14 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ScaleneTriangle { @@ -41,14 +37,14 @@ public static class TriangleType extends JsonSchema implements SchemaStringValid private static TriangleType instance; protected TriangleType() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "ScaleneTriangle" - ))) - ))); + )) + ); } public static TriangleType getInstance() { @@ -119,13 +115,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("triangleType", TriangleType.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -196,13 +193,14 @@ public static class ScaleneTriangle1 extends JsonSchema implements SchemaNullVal Do not edit the class manually. */ private static ScaleneTriangle1 instance; + protected ScaleneTriangle1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( TriangleInterface.TriangleInterface1.class, Schema1.class - ))) - ))); + )) + ); } public static ScaleneTriangle1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java index a8a53f63c15..1c4ec6e1ee4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java @@ -19,9 +19,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -81,13 +80,14 @@ public static class Schema200Response1 extends JsonSchema implements SchemaNullV model with an invalid class name for python, starts with a number */ private static Schema200Response1 instance; + protected Schema200Response1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("name", Name.class), new PropertyEntry("class", ClassSchema.class) - ))) - ))); + )) + ); } public static Schema200Response1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModel.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModel.java index 52755d363f8..fa246a37f05 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModel.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModel.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class SelfReferencingArrayModel { @@ -46,11 +44,12 @@ public static class SelfReferencingArrayModel1 extends JsonSchema implements Sch Do not edit the class manually. */ private static SelfReferencingArrayModel1 instance; + protected SelfReferencingArrayModel1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(SelfReferencingArrayModel1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(SelfReferencingArrayModel1.class) + ); } public static SelfReferencingArrayModel1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingObjectModel.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingObjectModel.java index ddce7db1017..74140982602 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingObjectModel.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingObjectModel.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class SelfReferencingObjectModel { @@ -62,14 +60,15 @@ public static class SelfReferencingObjectModel1 extends JsonSchema implements Sc Do not edit the class manually. */ private static SelfReferencingObjectModel1 instance; + protected SelfReferencingObjectModel1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("selfRef", SelfReferencingObjectModel1.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(SelfReferencingObjectModel1.class)) - ))); + )) + .additionalProperties(SelfReferencingObjectModel1.class) + ); } public static SelfReferencingObjectModel1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Shape.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Shape.java index 6f6722cc818..2e114108122 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Shape.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Shape.java @@ -17,8 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -40,13 +39,14 @@ public static class Shape1 extends JsonSchema implements SchemaNullValidator, Sc Do not edit the class manually. */ private static Shape1 instance; + protected Shape1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( Triangle.Triangle1.class, Quadrilateral.Quadrilateral1.class - ))) - ))); + )) + ); } public static Shape1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java index e7e1db6e65f..4f615232bad 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java @@ -18,8 +18,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -46,14 +45,15 @@ public static class ShapeOrNull1 extends JsonSchema implements SchemaNullValidat The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. */ private static ShapeOrNull1 instance; + protected ShapeOrNull1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( Schema0.class, Triangle.Triangle1.class, Quadrilateral.Quadrilateral1.class - ))) - ))); + )) + ); } public static ShapeOrNull1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java index 453cf009b4c..8dd07071a7d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java @@ -15,14 +15,11 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class SimpleQuadrilateral { @@ -41,14 +37,14 @@ public static class QuadrilateralType extends JsonSchema implements SchemaString private static QuadrilateralType instance; protected QuadrilateralType() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "SimpleQuadrilateral" - ))) - ))); + )) + ); } public static QuadrilateralType getInstance() { @@ -119,13 +115,14 @@ public static class Schema1MapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("quadrilateralType", QuadrilateralType.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { @@ -196,13 +193,14 @@ public static class SimpleQuadrilateral1 extends JsonSchema implements SchemaNul Do not edit the class manually. */ private static SimpleQuadrilateral1 instance; + protected SimpleQuadrilateral1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( QuadrilateralInterface.QuadrilateralInterface1.class, Schema1.class - ))) - ))); + )) + ); } public static SimpleQuadrilateral1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SomeObject.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SomeObject.java index 0445195ebc5..9db33d220db 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SomeObject.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SomeObject.java @@ -14,11 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -40,12 +39,13 @@ public static class SomeObject1 extends JsonSchema implements SchemaNullValidato Do not edit the class manually. */ private static SomeObject1 instance; + protected SomeObject1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( ObjectInterface.ObjectInterface1.class - ))) - ))); + )) + ); } public static SomeObject1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SpecialModelname.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SpecialModelname.java index 2ae3ff5439a..f5d74827cf8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SpecialModelname.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SpecialModelname.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class SpecialModelname { @@ -68,13 +66,14 @@ public static class SpecialModelname1 extends JsonSchema implements SchemaMapVal model with an invalid class name for python */ private static SpecialModelname1 instance; + protected SpecialModelname1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("a", A.class) - ))) - ))); + )) + ); } public static SpecialModelname1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringBooleanMap.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringBooleanMap.java index dd25d2475d9..e843c4ca607 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringBooleanMap.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringBooleanMap.java @@ -15,10 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class StringBooleanMap { @@ -56,11 +55,12 @@ public static class StringBooleanMap1 extends JsonSchema implements SchemaMapVal Do not edit the class manually. */ private static StringBooleanMap1 instance; + protected StringBooleanMap1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static StringBooleanMap1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java index d7670caf992..438e864bfe1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java @@ -12,15 +12,13 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class StringEnum { @@ -35,13 +33,14 @@ public static class StringEnum1 extends JsonSchema implements SchemaNullValidato Do not edit the class manually. */ private static StringEnum1 instance; + protected StringEnum1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "placed", "approved", "delivered", @@ -49,8 +48,8 @@ protected StringEnum1() { "multiple\nlines", "double quote \n with newline", null - ))) - ))); + )) + ); } public static StringEnum1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java index 22429445838..54611f1d54e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class StringEnumWithDefaultValue { @@ -34,16 +32,16 @@ public static class StringEnumWithDefaultValue1 extends JsonSchema implements Sc private static StringEnumWithDefaultValue1 instance; protected StringEnumWithDefaultValue1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "placed", "approved", "delivered" - ))) - ))); + )) + ); } public static StringEnumWithDefaultValue1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java index 7c69990e16c..457a0e09a88 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java @@ -12,11 +12,9 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class StringWithValidation { @@ -33,12 +31,12 @@ public static class StringWithValidation1 extends JsonSchema implements SchemaSt private static StringWithValidation1 instance; protected StringWithValidation1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(7)) - ))); + ) + .minLength(7) + ); } public static StringWithValidation1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Tag.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Tag.java index d5dde4c4c29..d70404bf8ca 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Tag.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Tag.java @@ -15,12 +15,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Tag { @@ -77,14 +75,15 @@ public static class Tag1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Id.class), new PropertyEntry("name", Name.class) - ))) - ))); + )) + ); } public static Tag1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Triangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Triangle.java index 095ffc89337..e8df892faac 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Triangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Triangle.java @@ -17,8 +17,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.OneOfValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -40,14 +39,15 @@ public static class Triangle1 extends JsonSchema implements SchemaNullValidator, Do not edit the class manually. */ private static Triangle1 instance; + protected Triangle1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("oneOf", new OneOfValidator(List.of( + super(new JsonSchemaInfo() + .oneOf(List.of( EquilateralTriangle.EquilateralTriangle1.class, IsoscelesTriangle.IsoscelesTriangle1.class, ScaleneTriangle.ScaleneTriangle1.class - ))) - ))); + )) + ); } public static Triangle1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java index dcd9dc7dd93..fad42190bc1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java @@ -16,22 +16,18 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class TriangleInterface { @@ -42,14 +38,14 @@ public static class ShapeType extends JsonSchema implements SchemaStringValidato private static ShapeType instance; protected ShapeType() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "Triangle" - ))) - ))); + )) + ); } public static ShapeType getInstance() { @@ -132,17 +128,18 @@ public static class TriangleInterface1 extends JsonSchema implements SchemaNullV Do not edit the class manually. */ private static TriangleInterface1 instance; + protected TriangleInterface1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .properties(Map.ofEntries( new PropertyEntry("shapeType", ShapeType.class), new PropertyEntry("triangleType", TriangleType.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "shapeType", "triangleType" - ))) - ))); + )) + ); } public static TriangleInterface1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java index ab784068136..2057cad6362 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java @@ -12,13 +12,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class UUIDString { @@ -35,13 +32,13 @@ public static class UUIDString1 extends JsonSchema implements SchemaStringValida private static UUIDString1 instance; protected UUIDString1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("uuid")), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .format("uuid") + .minLength(1) + ); } public static UUIDString1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java index e0665e574a5..e9414770b94 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java @@ -23,10 +23,8 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.NotValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -34,7 +32,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class User { @@ -70,13 +67,14 @@ public static class ObjectWithNoDeclaredProps extends MapJsonSchema {} public static class ObjectWithNoDeclaredPropsNullable extends JsonSchema implements SchemaNullValidator, SchemaMapValidator> { private static ObjectWithNoDeclaredPropsNullable instance; + protected ObjectWithNoDeclaredPropsNullable() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Void.class, FrozenMap.class - ))) - ))); + ) + ); } public static ObjectWithNoDeclaredPropsNullable getInstance() { @@ -159,10 +157,11 @@ public static class Not extends NullJsonSchema {} public static class AnyTypeExceptNullProp extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static AnyTypeExceptNullProp instance; + protected AnyTypeExceptNullProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("not", new NotValidator(Not.class)) - ))); + super(new JsonSchemaInfo() + .not(Not.class) + ); } public static AnyTypeExceptNullProp getInstance() { @@ -493,10 +492,11 @@ public static class User1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Id.class), new PropertyEntry("username", Username.class), new PropertyEntry("firstName", FirstName.class), @@ -510,8 +510,8 @@ protected User1() { new PropertyEntry("anyTypeProp", AnyTypeProp.class), new PropertyEntry("anyTypeExceptNullProp", AnyTypeExceptNullProp.class), new PropertyEntry("anyTypePropNullable", AnyTypePropNullable.class) - ))) - ))); + )) + ); } public static User1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java index 4685959d160..965d093bc28 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java @@ -13,17 +13,13 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Whale { @@ -40,14 +36,14 @@ public static class ClassName extends JsonSchema implements SchemaStringValidato private static ClassName instance; protected ClassName() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "whale" - ))) - ))); + )) + ); } public static ClassName getInstance() { @@ -137,18 +133,19 @@ public static class Whale1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("hasBaleen", HasBaleen.class), new PropertyEntry("hasTeeth", HasTeeth.class), new PropertyEntry("className", ClassName.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "className" - ))) - ))); + )) + ); } public static Whale1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java index 6e600d0fbf3..656b8c9b356 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java @@ -14,17 +14,13 @@ import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Zebra { @@ -38,16 +34,16 @@ public static class Type extends JsonSchema implements SchemaStringValidator { private static Type instance; protected Type() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "plains", "mountain", "grevys" - ))) - ))); + )) + ); } public static Type getInstance() { @@ -91,14 +87,14 @@ public static class ClassName extends JsonSchema implements SchemaStringValidato private static ClassName instance; protected ClassName() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "zebra" - ))) - ))); + )) + ); } public static ClassName getInstance() { @@ -180,18 +176,19 @@ public static class Zebra1 extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("type", Type.class), new PropertyEntry("className", ClassName.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "className" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static Zebra1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/HeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/HeaderParameters.java index be9650bf84e..83edf3ad84c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/HeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/HeaderParameters.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HeaderParameters { @@ -58,14 +56,15 @@ public static class HeaderParametersMapInput { public static class HeaderParameters1 extends JsonSchema implements SchemaMapValidator { private static HeaderParameters1 instance; + protected HeaderParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someHeader", Schema0.Schema01.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static HeaderParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/PathParameters.java index 940004ac2b2..422f8efaadd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("subDir", Schema1.Schema11.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "subDir" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java index b86e6c11b75..ac6ab7b8ae3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema1 { @@ -28,15 +26,15 @@ public static class Schema11 extends JsonSchema implements SchemaStringValidator private static Schema11 instance; protected Schema11() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "c", "d" - ))) - ))); + )) + ); } public static Schema11 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/PathParameters.java index 65f4bd0da4b..3bcce633fa6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("subDir", PathParamSchema0.PathParamSchema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "subDir" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/QueryParameters.java index 0b03bbf0bec..071a90d7ccb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/QueryParameters.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -58,14 +56,15 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("searchStr", Schema0.Schema01.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java index 8dad78ae27b..5c3c4efe2c7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParamSchema0 { @@ -28,15 +26,15 @@ public static class PathParamSchema01 extends JsonSchema implements SchemaString private static PathParamSchema01 instance; protected PathParamSchema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "a", "b" - ))) - ))); + )) + ); } public static PathParamSchema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/HeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/HeaderParameters.java index 4006da51ee5..dac787b1ef6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/HeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/HeaderParameters.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HeaderParameters { @@ -58,14 +56,15 @@ public static class HeaderParametersMapInput { public static class HeaderParameters1 extends JsonSchema implements SchemaMapValidator { private static HeaderParameters1 instance; + protected HeaderParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someHeader", Schema0.Schema01.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static HeaderParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/PathParameters.java index 170af0be4d4..936363587c1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("subDir", PathParamSchema0.PathParamSchema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "subDir" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/HeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/HeaderParameters.java index 92ff2492087..445dcf36096 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/HeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/HeaderParameters.java @@ -18,13 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HeaderParameters { @@ -66,18 +63,19 @@ public static class HeaderParametersMapInput { public static class HeaderParameters1 extends JsonSchema implements SchemaMapValidator { private static HeaderParameters1 instance; + protected HeaderParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("required_boolean_group", Schema1.Schema11.class), new PropertyEntry("boolean_group", Schema4.Schema41.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "required_boolean_group" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static HeaderParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/QueryParameters.java index 0f44f42ad0c..3b793810fff 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/QueryParameters.java @@ -20,13 +20,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -80,21 +77,22 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("required_string_group", Schema0.Schema01.class), new PropertyEntry("int64_group", Schema5.Schema51.class), new PropertyEntry("string_group", Schema3.Schema31.class), new PropertyEntry("required_int64_group", Schema2.Schema21.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "required_int64_group", "required_string_group" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java index fd95076b8e4..ad1aff9a13f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema1 { @@ -28,15 +26,15 @@ public static class Schema11 extends JsonSchema implements SchemaStringValidator private static Schema11 instance; protected Schema11() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "true", "false" - ))) - ))); + )) + ); } public static Schema11 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java index 9e1a21965e0..9b1155340d4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema4 { @@ -28,15 +26,15 @@ public static class Schema41 extends JsonSchema implements SchemaStringValidator private static Schema41 instance; protected Schema41() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "true", "false" - ))) - ))); + )) + ); } public static Schema41 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/HeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/HeaderParameters.java index 11875463c41..3db302ace19 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/HeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/HeaderParameters.java @@ -18,12 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HeaderParameters { @@ -66,15 +64,16 @@ public static class HeaderParametersMapInput { public static class HeaderParameters1 extends JsonSchema implements SchemaMapValidator { private static HeaderParameters1 instance; + protected HeaderParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("enum_header_string", Schema1.Schema11.class), new PropertyEntry("enum_header_string_array", Schema0.Schema01.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static HeaderParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/QueryParameters.java index 270c5d5428f..1a880f15153 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/QueryParameters.java @@ -20,12 +20,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -82,17 +80,18 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("enum_query_double", Schema5.Schema51.class), new PropertyEntry("enum_query_string", Schema3.Schema31.class), new PropertyEntry("enum_query_integer", Schema4.Schema41.class), new PropertyEntry("enum_query_string_array", Schema2.Schema21.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java index 38f6cb23f89..7f95e9bc88e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java @@ -12,15 +12,12 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema0 { @@ -31,15 +28,15 @@ public static class Items0 extends JsonSchema implements SchemaStringValidator { private static Items0 instance; protected Items0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( ">", "$" - ))) - ))); + )) + ); } public static Items0 getInstance() { @@ -95,11 +92,12 @@ public static class SchemaListInput0 { public static class Schema01 extends JsonSchema implements SchemaListValidator { private static Schema01 instance; + protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items0.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items0.class) + ); } public static Schema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java index 81693c4a2e2..11b7e6efbf8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema1 { @@ -28,16 +26,16 @@ public static class Schema11 extends JsonSchema implements SchemaStringValidator private static Schema11 instance; protected Schema11() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "_abc", "-efg", "(xyz)" - ))) - ))); + )) + ); } public static Schema11 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java index f1cc2c3ba4d..704d220ff8e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java @@ -12,15 +12,12 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema2 { @@ -31,15 +28,15 @@ public static class Items2 extends JsonSchema implements SchemaStringValidator { private static Items2 instance; protected Items2() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( ">", "$" - ))) - ))); + )) + ); } public static Items2 getInstance() { @@ -95,11 +92,12 @@ public static class SchemaListInput2 { public static class Schema21 extends JsonSchema implements SchemaListValidator { private static Schema21 instance; + protected Schema21() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items2.class) + ); } public static Schema21 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java index 94ab5d2f5d5..61ded728002 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java @@ -12,12 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema3 { @@ -28,16 +26,16 @@ public static class Schema31 extends JsonSchema implements SchemaStringValidator private static Schema31 instance; protected Schema31() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "_abc", "-efg", "(xyz)" - ))) - ))); + )) + ); } public static Schema31 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java index 83e6c2fcc15..726d4469cb1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java @@ -12,13 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema4 { @@ -27,20 +24,21 @@ public class Schema4 { public static class Schema41 extends JsonSchema implements SchemaNumberValidator { private static Schema41 instance; + protected Schema41() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int32")), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .format("int32") + .enumValues(SetMaker.makeSet( 1, -2 - ))) - ))); + )) + ); } public static Schema41 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java index bf1dc6ec8f3..a2525771858 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java @@ -12,13 +12,10 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema5 { @@ -27,20 +24,21 @@ public class Schema5 { public static class Schema51 extends JsonSchema implements SchemaNumberValidator { private static Schema51 instance; + protected Schema51() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("double")), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .format("double") + .enumValues(SetMaker.makeSet( 1.1, -1.2 - ))) - ))); + )) + ); } public static Schema51 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java index bda2ce34631..b747ecd0108 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java @@ -12,19 +12,15 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -35,15 +31,15 @@ public static class Items extends JsonSchema implements SchemaStringValidator { private static Items instance; protected Items() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( ">", "$" - ))) - ))); + )) + ); } public static Items getInstance() { @@ -99,11 +95,12 @@ public static class EnumFormStringArrayListInput { public static class EnumFormStringArray extends JsonSchema implements SchemaListValidator { private static EnumFormStringArray instance; + protected EnumFormStringArray() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static EnumFormStringArray getInstance() { @@ -169,16 +166,16 @@ public static class EnumFormString extends JsonSchema implements SchemaStringVal private static EnumFormString instance; protected EnumFormString() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "_abc", "-efg", "(xyz)" - ))) - ))); + )) + ); } public static EnumFormString getInstance() { @@ -256,14 +253,15 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("enum_form_string_array", EnumFormStringArray.class), new PropertyEntry("enum_form_string", EnumFormString.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java index 4b4780555b0..a0e1fa97fee 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java @@ -16,23 +16,14 @@ import org.openapijsonschematools.client.schemas.DateJsonSchema; import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaxLengthValidator; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PatternValidator; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -41,17 +32,18 @@ public class Schema { public static class IntegerSchema extends JsonSchema implements SchemaNumberValidator { private static IntegerSchema instance; + protected IntegerSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("maximum", new MaximumValidator(100)), - new KeywordEntry("minimum", new MinimumValidator(10)) - ))); + ) + .maximum(100) + .minimum(10) + ); } public static IntegerSchema getInstance() { @@ -109,18 +101,19 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Int32 extends JsonSchema implements SchemaNumberValidator { private static Int32 instance; + protected Int32() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int32")), - new KeywordEntry("maximum", new MaximumValidator(200)), - new KeywordEntry("minimum", new MinimumValidator(20)) - ))); + ) + .format("int32") + .maximum(200) + .minimum(20) + ); } public static Int32 getInstance() { @@ -173,17 +166,18 @@ public static class Int64 extends Int64JsonSchema {} public static class NumberSchema extends JsonSchema implements SchemaNumberValidator { private static NumberSchema instance; + protected NumberSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("maximum", new MaximumValidator(543.2)), - new KeywordEntry("minimum", new MinimumValidator(32.1)) - ))); + ) + .maximum(543.2) + .minimum(32.1) + ); } public static NumberSchema getInstance() { @@ -240,17 +234,18 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class FloatSchema extends JsonSchema implements SchemaNumberValidator { private static FloatSchema instance; + protected FloatSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("float")), - new KeywordEntry("maximum", new MaximumValidator(987.6)) - ))); + ) + .format("float") + .maximum(987.6) + ); } public static FloatSchema getInstance() { @@ -295,18 +290,19 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class DoubleSchema extends JsonSchema implements SchemaNumberValidator { private static DoubleSchema instance; + protected DoubleSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("double")), - new KeywordEntry("maximum", new MaximumValidator(123.4)), - new KeywordEntry("minimum", new MinimumValidator(67.8)) - ))); + ) + .format("double") + .maximum(123.4) + .minimum(67.8) + ); } public static DoubleSchema getInstance() { @@ -353,15 +349,15 @@ public static class StringSchema extends JsonSchema implements SchemaStringValid private static StringSchema instance; protected StringSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .pattern(Pattern.compile( "[a-z]", Pattern.CASE_INSENSITIVE - ))) - ))); + )) + ); } public static StringSchema getInstance() { @@ -405,14 +401,14 @@ public static class PatternWithoutDelimiter extends JsonSchema implements Schema private static PatternWithoutDelimiter instance; protected PatternWithoutDelimiter() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("pattern", new PatternValidator(Pattern.compile( + ) + .pattern(Pattern.compile( "^[A-Z].*" - ))) - ))); + )) + ); } public static PatternWithoutDelimiter getInstance() { @@ -467,12 +463,12 @@ public static class DateTime extends JsonSchema implements SchemaStringValidator private static DateTime instance; protected DateTime() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + ) + .format("date-time") + ); } public static DateTime getInstance() { @@ -516,14 +512,14 @@ public static class Password extends JsonSchema implements SchemaStringValidator private static Password instance; protected Password() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("format", new FormatValidator("password")), - new KeywordEntry("maxLength", new MaxLengthValidator(64)), - new KeywordEntry("minLength", new MinLengthValidator(10)) - ))); + ) + .format("password") + .maxLength(64) + .minLength(10) + ); } public static Password getInstance() { @@ -651,10 +647,11 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("integer", IntegerSchema.class), new PropertyEntry("int32", Int32.class), new PropertyEntry("int64", Int64.class), @@ -669,14 +666,14 @@ protected Schema1() { new PropertyEntry("dateTime", DateTime.class), new PropertyEntry("password", Password.class), new PropertyEntry("callback", Callback.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "byte", "double", "number", "pattern_without_delimiter" - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/QueryParameters.java index b4b398b972d..2b1bb8246ce 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/QueryParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -57,17 +54,18 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("query", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "query" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/QueryParameters.java index c609335c491..57164f1e783 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/QueryParameters.java @@ -19,13 +19,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -69,21 +66,22 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someVar", Schema0.Schema01.class), new PropertyEntry("some_var", Schema2.Schema21.class), new PropertyEntry("SomeVar", Schema1.Schema11.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "SomeVar", "someVar", "some_var" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/PathParameters.java index 951dbb004ed..85afc04c1b9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("id", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "id" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.java index e1bbc2946d8..ec4b794f38c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlineadditionalproperties/post/requestbody/content/applicationjson/Schema.java @@ -15,10 +15,9 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -50,11 +49,12 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(AdditionalProperties.class) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/QueryParameters.java index 4cc0ca15b8b..24cbcf9b2fc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/QueryParameters.java @@ -18,12 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -66,15 +64,16 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("compositionAtRoot", Schema0.Schema01.class), new PropertyEntry("compositionInProperty", Schema1.Schema11.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java index 2dbc4ed599a..0366d19ae20 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -27,7 +25,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema0 { @@ -38,12 +35,12 @@ public static class Schema00 extends JsonSchema implements SchemaStringValidator private static Schema00 instance; protected Schema00() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .minLength(1) + ); } public static Schema00 getInstance() { @@ -85,12 +82,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema01 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema01 instance; + protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Schema00.class - ))) - ))); + )) + ); } public static Schema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java index 94c5decaaa7..f5518c254f3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java @@ -14,14 +14,11 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +26,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema1 { @@ -40,12 +36,12 @@ public static class Schema01 extends JsonSchema implements SchemaStringValidator private static Schema01 instance; protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .minLength(1) + ); } public static Schema01 getInstance() { @@ -87,12 +83,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class SomeProp1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static SomeProp1 instance; + protected SomeProp1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Schema01.class - ))) - ))); + )) + ); } public static SomeProp1 getInstance() { @@ -330,13 +327,14 @@ public static class SchemaMapInput1 { public static class Schema11 extends JsonSchema implements SchemaMapValidator { private static Schema11 instance; + protected Schema11() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someProp", SomeProp1.class) - ))) - ))); + )) + ); } public static Schema11 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java index 8e389f27c44..69ea1b32f83 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -27,7 +25,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -38,12 +35,12 @@ public static class Schema0 extends JsonSchema implements SchemaStringValidator private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .minLength(1) + ); } public static Schema0 getInstance() { @@ -85,12 +82,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java index 6f9e41fa3b1..e32df90aae5 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java @@ -14,14 +14,11 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +26,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -40,12 +36,12 @@ public static class Schema0 extends JsonSchema implements SchemaStringValidator private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .minLength(1) + ); } public static Schema0 getInstance() { @@ -87,12 +83,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class SomeProp extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static SomeProp instance; + protected SomeProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static SomeProp getInstance() { @@ -330,13 +327,14 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someProp", SomeProp.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java index b7dc2b21fcb..5d9bd0a24bc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -27,7 +25,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -38,12 +35,12 @@ public static class Schema0 extends JsonSchema implements SchemaStringValidator private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .minLength(1) + ); } public static Schema0 getInstance() { @@ -85,12 +82,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class Schema1 extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java index d9d17bd5857..6f60dfb6ea8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java @@ -14,14 +14,11 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.AllOfValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MinLengthValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; @@ -29,7 +26,6 @@ import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -40,12 +36,12 @@ public static class Schema0 extends JsonSchema implements SchemaStringValidator private static Schema0 instance; protected Schema0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("minLength", new MinLengthValidator(1)) - ))); + ) + .minLength(1) + ); } public static Schema0 getInstance() { @@ -87,12 +83,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class SomeProp extends JsonSchema implements SchemaNullValidator, SchemaBooleanValidator, SchemaNumberValidator, SchemaStringValidator, SchemaListValidator>, SchemaMapValidator> { private static SomeProp instance; + protected SomeProp() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("allOf", new AllOfValidator(List.of( + super(new JsonSchemaInfo() + .allOf(List.of( Schema0.class - ))) - ))); + )) + ); } public static SomeProp getInstance() { @@ -330,13 +327,14 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someProp", SomeProp.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.java index a8587359242..0125923fc36 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakejsonformdata/get/requestbody/content/applicationxwwwformurlencoded/Schema.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -67,18 +64,19 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("param", Param.class), new PropertyEntry("param2", Param2.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "param", "param2" - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.java index a0f445ba279..483a1c636a5 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/applicationjson/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -60,13 +58,14 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("a", A.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.java index 0d9eafa2883..ec7591fcf7c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakemultiplerequestbodycontenttypes/post/requestbody/content/multipartformdata/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -60,13 +58,14 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("b", B.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/QueryParameters.java index f46a45b4cd0..e65915aa53e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/QueryParameters.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -58,14 +56,15 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator, FrozenMap, QueryParametersMap> { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("mapBean", Schema0.Schema01.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/parameters/parameter0/Schema0.java index 4585daaf593..2837dd71d47 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/parameters/parameter0/Schema0.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema0 { @@ -60,13 +58,14 @@ public static class SchemaMapInput0 { public static class Schema01 extends JsonSchema implements SchemaMapValidator { private static Schema01 instance; + protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("keyword", Keyword0.class) - ))) - ))); + )) + ); } public static Schema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/CookieParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/CookieParameters.java index bc75efc0abb..b87cc1e5fef 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/CookieParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/CookieParameters.java @@ -21,12 +21,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class CookieParameters { @@ -78,18 +76,19 @@ public static class CookieParametersMapInput { public static class CookieParameters1 extends JsonSchema implements SchemaMapValidator { private static CookieParameters1 instance; + protected CookieParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("1", Schema14.Schema141.class), new PropertyEntry("aB", Schema15.Schema151.class), new PropertyEntry("Ab", Schema16.Schema161.class), new PropertyEntry("A-B", Schema18.Schema181.class), new PropertyEntry("self", Schema17.Schema171.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static CookieParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/HeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/HeaderParameters.java index 759b11459a7..84a386afad5 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/HeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/HeaderParameters.java @@ -20,12 +20,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HeaderParameters { @@ -70,17 +68,18 @@ public static class HeaderParametersMapInput { public static class HeaderParameters1 extends JsonSchema implements SchemaMapValidator { private static HeaderParameters1 instance; + protected HeaderParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("1", Schema5.Schema51.class), new PropertyEntry("aB", Schema6.Schema61.class), new PropertyEntry("A-B", Schema8.Schema81.class), new PropertyEntry("self", Schema7.Schema71.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static HeaderParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/PathParameters.java index d4065043d0c..b58fa756ad6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/PathParameters.java @@ -21,13 +21,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -73,25 +70,26 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("1", Schema9.Schema91.class), new PropertyEntry("aB", Schema10.Schema101.class), new PropertyEntry("Ab", Schema11.Schema111.class), new PropertyEntry("A-B", Schema13.Schema131.class), new PropertyEntry("self", Schema12.Schema121.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "1", "A-B", "Ab", "aB", "self" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/QueryParameters.java index 78ccf926b00..248f7ec9547 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/QueryParameters.java @@ -21,12 +21,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -78,18 +76,19 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("1", Schema0.Schema01.class), new PropertyEntry("aB", Schema1.Schema11.class), new PropertyEntry("Ab", Schema2.Schema21.class), new PropertyEntry("A-B", Schema4.Schema41.class), new PropertyEntry("self", Schema3.Schema31.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/PathParameters.java index 1fddbc3484e..20671fddeb5 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("petId", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "petId" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.java index 840cad2e920..3f12193ea35 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/requestbody/content/multipartformdata/Schema.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -72,17 +69,18 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("additionalMetadata", AdditionalMetadata.class), new PropertyEntry("requiredFile", RequiredFile.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "requiredFile" - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/QueryParameters.java index f910304c947..7edd3687511 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/QueryParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -57,17 +54,18 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("someParam", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "someParam" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/QueryParameters.java index 0e7e6e23114..4cf4096acb2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/QueryParameters.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -58,14 +56,15 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator, FrozenMap, QueryParametersMap> { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("mapBean", Foo.Foo1.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/QueryParameters.java index 2b62508c86e..5d9c50b92db 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/QueryParameters.java @@ -22,13 +22,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -87,27 +84,28 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("refParam", StringWithValidation.StringWithValidation1.class), new PropertyEntry("ioutil", Schema1.Schema11.class), new PropertyEntry("context", Schema4.Schema41.class), new PropertyEntry("http", Schema2.Schema21.class), new PropertyEntry("pipe", Schema0.Schema01.class), new PropertyEntry("url", Schema3.Schema31.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "context", "http", "ioutil", "pipe", "refParam", "url" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.java index b3e75e7d23e..236a85a89b9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter0/Schema0.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema0 { @@ -44,11 +42,12 @@ public static class SchemaListInput0 { public static class Schema01 extends JsonSchema implements SchemaListValidator { private static Schema01 instance; + protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items0.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items0.class) + ); } public static Schema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.java index c39547ba288..5dc04b4a429 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter1/Schema1.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema1 { @@ -44,11 +42,12 @@ public static class SchemaListInput1 { public static class Schema11 extends JsonSchema implements SchemaListValidator { private static Schema11 instance; + protected Schema11() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items1.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items1.class) + ); } public static Schema11 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.java index d41bb6074b1..0f4fcac9d99 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter2/Schema2.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema2 { @@ -44,11 +42,12 @@ public static class SchemaListInput2 { public static class Schema21 extends JsonSchema implements SchemaListValidator { private static Schema21 instance; + protected Schema21() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items2.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items2.class) + ); } public static Schema21 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.java index 0cb28514d14..36ed4be1eba 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter3/Schema3.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema3 { @@ -44,11 +42,12 @@ public static class SchemaListInput3 { public static class Schema31 extends JsonSchema implements SchemaListValidator { private static Schema31 instance; + protected Schema31() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items3.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items3.class) + ); } public static Schema31 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.java index 61e358d0008..6eb4773aaa7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/parameters/parameter4/Schema4.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema4 { @@ -44,11 +42,12 @@ public static class SchemaListInput4 { public static class Schema41 extends JsonSchema implements SchemaListValidator { private static Schema41 instance; + protected Schema41() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items4.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items4.class) + ); } public static Schema41 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.java index c4768c6e8d2..5da38fcbab9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/requestbody/content/multipartformdata/Schema.java @@ -14,13 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -72,17 +69,18 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("additionalMetadata", AdditionalMetadata.class), new PropertyEntry("file", File.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "file" - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.java index c07403f5718..d06d328c3a1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/requestbody/content/multipartformdata/Schema.java @@ -14,15 +14,12 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -50,11 +47,12 @@ public static class FilesListInput { public static class Files extends JsonSchema implements SchemaListValidator { private static Files instance; + protected Files() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items.class) + ); } public static Files getInstance() { @@ -147,13 +145,14 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("files", Files.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.java index 4b934930582..1de47f11957 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/responsedefault/content/applicationjson/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -51,13 +49,14 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("string", Foo.Foo1.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/QueryParameters.java index 6cf5e828f7d..ff7489546c4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/QueryParameters.java @@ -18,13 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -58,17 +55,18 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator, FrozenList, QueryParametersMap> { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("status", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "status" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java index c5abc42691f..2f3ce490fe2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java @@ -12,15 +12,12 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.SetMaker; -import org.openapijsonschematools.client.schemas.validation.EnumValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema0 { @@ -31,16 +28,16 @@ public static class Items0 extends JsonSchema implements SchemaStringValidator { private static Items0 instance; protected Items0() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( String.class - ))), - new KeywordEntry("enum", new EnumValidator(SetMaker.makeSet( + ) + .enumValues(SetMaker.makeSet( "available", "pending", "sold" - ))) - ))); + )) + ); } public static Items0 getInstance() { @@ -96,11 +93,12 @@ public static class SchemaListInput0 { public static class Schema01 extends JsonSchema implements SchemaListValidator { private static Schema01 instance; + protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items0.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items0.class) + ); } public static Schema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/QueryParameters.java index 3fca2ec7ff2..e06de461eff 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/QueryParameters.java @@ -18,13 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -58,17 +55,18 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator, FrozenList, QueryParametersMap> { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("tags", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "tags" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/parameters/parameter0/Schema0.java index 35aaa8b106c..58cb4b0e0b0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/parameters/parameter0/Schema0.java @@ -13,12 +13,10 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema0 { @@ -44,11 +42,12 @@ public static class SchemaListInput0 { public static class Schema01 extends JsonSchema implements SchemaListValidator { private static Schema01 instance; + protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(Items0.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(Items0.class) + ); } public static Schema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/HeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/HeaderParameters.java index f7288d0156a..32c59fa37e6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/HeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/HeaderParameters.java @@ -17,12 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class HeaderParameters { @@ -58,14 +56,15 @@ public static class HeaderParametersMapInput { public static class HeaderParameters1 extends JsonSchema implements SchemaMapValidator { private static HeaderParameters1 instance; + protected HeaderParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("api_key", Schema0.Schema01.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static HeaderParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PathParameters.java index 45214ed134d..e681de95850 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("petId", Schema1.Schema11.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "petId" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PathParameters.java index 0bdd334f1c5..2ee23da4ad5 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("petId", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "petId" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PathParameters.java index 02b2db18d65..414c468d08e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("petId", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "petId" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.java index e116a68a52c..311da487218 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/requestbody/content/applicationxwwwformurlencoded/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -70,14 +68,15 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("name", Name.class), new PropertyEntry("status", Status.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PathParameters.java index 0e547b504af..9b1d0aaaa93 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("petId", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "petId" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.java index 316c5e50d09..4659c457e12 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/requestbody/content/multipartformdata/Schema.java @@ -14,12 +14,10 @@ import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema { @@ -72,14 +70,15 @@ public static class SchemaMapInput { public static class Schema1 extends JsonSchema implements SchemaMapValidator { private static Schema1 instance; + protected Schema1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("additionalMetadata", AdditionalMetadata.class), new PropertyEntry("file", File.class) - ))) - ))); + )) + ); } public static Schema1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/PathParameters.java index ec3e1e09e7f..7fb14a1bb85 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("order_id", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "order_id" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/PathParameters.java index bf57e215eaa..f108d7208be 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("order_id", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "order_id" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java index 9cdcfba542b..a7bada5e6c9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java @@ -11,14 +11,10 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; -import org.openapijsonschematools.client.schemas.validation.MaximumValidator; -import org.openapijsonschematools.client.schemas.validation.MinimumValidator; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Schema0 { @@ -27,18 +23,19 @@ public class Schema0 { public static class Schema01 extends JsonSchema implements SchemaNumberValidator { private static Schema01 instance; + protected Schema01() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( + super(new JsonSchemaInfo() + .type(Set.of( Integer.class, Long.class, Float.class, Double.class - ))), - new KeywordEntry("format", new FormatValidator("int64")), - new KeywordEntry("maximum", new MaximumValidator(5)), - new KeywordEntry("minimum", new MinimumValidator(1)) - ))); + ) + .format("int64") + .maximum(5) + .minimum(1) + ); } public static Schema01 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/QueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/QueryParameters.java index e371ccdefe6..b4275b8f9fa 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/QueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/QueryParameters.java @@ -18,13 +18,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class QueryParameters { @@ -63,19 +60,20 @@ public static class QueryParametersMapInput { public static class QueryParameters1 extends JsonSchema implements SchemaMapValidator { private static QueryParameters1 instance; + protected QueryParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("password", Schema1.Schema11.class), new PropertyEntry("username", Schema0.Schema01.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "password", "username" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static QueryParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/response200/Headers.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/response200/Headers.java index 4cb632d289d..b9079adc95f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/response200/Headers.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/response200/Headers.java @@ -21,13 +21,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class Headers { @@ -72,23 +69,24 @@ public static class HeadersMapInput { public static class Headers1 extends JsonSchema implements SchemaMapValidator { private static Headers1 instance; + protected Headers1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("X-Rate-Limit", XRateLimitSchema.XRateLimitSchema1.class), new PropertyEntry("int32", Int32JsonContentTypeHeaderSchema.Int32JsonContentTypeHeaderSchema1.class), new PropertyEntry("X-Expires-After", XExpiresAfterSchema.XExpiresAfterSchema1.class), new PropertyEntry("ref-content-schema-header", StringWithValidation.StringWithValidation1.class), new PropertyEntry("numberHeader", NumberHeaderSchema.NumberHeaderSchema1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "X-Rate-Limit", "int32", "ref-content-schema-header" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static Headers1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/PathParameters.java index f402daf843c..79221947c21 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("username", Schema.Schema1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "username" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/PathParameters.java index cd220b83dd9..b33e190de1e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("username", Schema.Schema1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "username" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/PathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/PathParameters.java index 38b7138c080..f2fcc979ac2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/PathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/PathParameters.java @@ -17,13 +17,10 @@ import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.RequiredValidator; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class PathParameters { @@ -57,17 +54,18 @@ public static class PathParametersMapInput { public static class PathParameters1 extends JsonSchema implements SchemaMapValidator { private static PathParameters1 instance; + protected PathParameters1() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( new PropertyEntry("username", Schema.Schema1.class) - ))), - new KeywordEntry("required", new RequiredValidator(Set.of( + )) + .required(Set.of( "username" - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(AdditionalProperties.class)) - ))); + )) + .additionalProperties(AdditionalProperties.class) + ); } public static PathParameters1 getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java index b5b773c518c..187d28b6d01 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java @@ -3,6 +3,7 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.exceptions.InvalidTypeException; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -12,11 +13,205 @@ import java.util.Map; import java.util.Set; import java.util.UUID; +import java.util.regex.Pattern; public abstract class JsonSchema { + public final Set> type; + public final String format; + public final Class items; + public final Map> properties; + public final Set required; + public final Number exclusiveMaximum; + public final Number exclusiveMinimum; + public final Integer maxItems; + public final Integer minItems; + public final Integer maxLength; + public final Integer minLength; + public final Integer maxProperties; + public final Integer minProperties; + public final Number maximum; + public final Number minimum; + public final BigDecimal multipleOf; + public final Class additionalProperties; + public final List> allOf; + public final List> anyOf; + public final List> oneOf; + public final Class not; + public final Boolean uniqueItems; + public final Set enumValues; + public final Pattern pattern; public final LinkedHashMap keywordToValidator; - protected JsonSchema(LinkedHashMap keywordToValidator) { + protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { + LinkedHashMap keywordToValidator = new LinkedHashMap<>(); + this.type = jsonSchemaInfo.type; + if (this.type != null) { + keywordToValidator.put( + "type", + new TypeValidator(this.type) + ); + } + this.format = jsonSchemaInfo.format; + if (this.format != null) { + keywordToValidator.put( + "format", + new FormatValidator(this.format) + ); + } + this.items = jsonSchemaInfo.items; + if (this.items != null) { + keywordToValidator.put( + "items", + new ItemsValidator(this.items) + ); + } + this.properties = jsonSchemaInfo.properties; + if (this.properties != null) { + keywordToValidator.put( + "properties", + new PropertiesValidator(this.properties) + ); + } + this.required = jsonSchemaInfo.required; + if (this.required != null) { + keywordToValidator.put( + "required", + new RequiredValidator(this.required) + ); + } + this.exclusiveMaximum = jsonSchemaInfo.exclusiveMaximum; + if (this.exclusiveMaximum != null) { + keywordToValidator.put( + "exclusiveMaximum", + new ExclusiveMaximumValidator(this.exclusiveMaximum) + ); + } + this.exclusiveMinimum = jsonSchemaInfo.exclusiveMinimum; + if (this.exclusiveMinimum != null) { + keywordToValidator.put( + "exclusiveMinimum", + new ExclusiveMinimumValidator(this.exclusiveMinimum) + ); + } + this.maxItems = jsonSchemaInfo.maxItems; + if (this.maxItems != null) { + keywordToValidator.put( + "maxItems", + new MaxItemsValidator(this.maxItems) + ); + } + this.minItems = jsonSchemaInfo.minItems; + if (this.minItems != null) { + keywordToValidator.put( + "minItems", + new MinItemsValidator(this.minItems) + ); + } + this.maxLength = jsonSchemaInfo.maxLength; + if (this.maxLength != null) { + keywordToValidator.put( + "maxLength", + new MaxLengthValidator(this.maxLength) + ); + } + this.minLength = jsonSchemaInfo.minLength; + if (this.minLength != null) { + keywordToValidator.put( + "minLength", + new MinLengthValidator(this.minLength) + ); + } + this.maxProperties = jsonSchemaInfo.maxProperties; + if (this.maxProperties != null) { + keywordToValidator.put( + "maxProperties", + new MaxPropertiesValidator(this.maxProperties) + ); + } + this.minProperties = jsonSchemaInfo.minProperties; + if (this.minProperties != null) { + keywordToValidator.put( + "minProperties", + new MinPropertiesValidator(this.minProperties) + ); + } + this.maximum = jsonSchemaInfo.maximum; + if (this.maximum != null) { + keywordToValidator.put( + "maximum", + new MaximumValidator(this.maximum) + ); + } + this.minimum = jsonSchemaInfo.minimum; + if (this.minimum != null) { + keywordToValidator.put( + "minimum", + new MinimumValidator(this.minimum) + ); + } + this.multipleOf = jsonSchemaInfo.multipleOf; + if (this.multipleOf != null) { + keywordToValidator.put( + "multipleOf", + new MultipleOfValidator(this.multipleOf) + ); + } + this.additionalProperties = jsonSchemaInfo.additionalProperties; + if (this.additionalProperties != null) { + keywordToValidator.put( + "additionalProperties", + new AdditionalPropertiesValidator(this.additionalProperties) + ); + } + this.allOf = jsonSchemaInfo.allOf; + if (this.allOf != null) { + keywordToValidator.put( + "allOf", + new AllOfValidator(this.allOf) + ); + } + this.anyOf = jsonSchemaInfo.anyOf; + if (this.anyOf != null) { + keywordToValidator.put( + "anyOf", + new AnyOfValidator(this.anyOf) + ); + } + this.oneOf = jsonSchemaInfo.oneOf; + if (this.oneOf != null) { + keywordToValidator.put( + "oneOf", + new OneOfValidator(this.oneOf) + ); + } + this.not = jsonSchemaInfo.not; + if (this.not != null) { + keywordToValidator.put( + "not", + new NotValidator(this.not) + ); + } + this.uniqueItems = jsonSchemaInfo.uniqueItems; + if (this.uniqueItems != null) { + keywordToValidator.put( + "uniqueItems", + new UniqueItemsValidator(this.uniqueItems) + ); + } + this.enumValues = jsonSchemaInfo.enumValues; + if (this.enumValues != null) { + keywordToValidator.put( + "enum", + new EnumValidator(this.enumValues) + ); + } + this.pattern = jsonSchemaInfo.pattern; + if (this.pattern != null) { + keywordToValidator.put( + "pattern", + new PatternValidator(this.pattern) + ); + } this.keywordToValidator = keywordToValidator; } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java new file mode 100644 index 00000000000..6133b7b3298 --- /dev/null +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java @@ -0,0 +1,130 @@ +package org.openapijsonschematools.client.schemas.validation; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +public class JsonSchemaInfo { + public Set> type; + public JsonSchemaInfo type(Set> type) { + this.type = type; + return this; + } + public String format; + public JsonSchemaInfo format(String format) { + this.format = format; + return this; + } + public Class items; + public JsonSchemaInfo items(Class items) { + this.items = items; + return this; + } + public Map> properties; + public JsonSchemaInfo properties(Map> properties) { + this.properties = properties; + return this; + } + public Set required; + public JsonSchemaInfo required(Set required) { + this.required = required; + return this; + } + public Number exclusiveMaximum; + public JsonSchemaInfo exclusiveMaximum(Number exclusiveMaximum) { + this.exclusiveMaximum = exclusiveMaximum; + return this; + } + public Number exclusiveMinimum; + public JsonSchemaInfo exclusiveMinimum(Number exclusiveMinimum) { + this.exclusiveMinimum = exclusiveMinimum; + return this; + } + public Integer maxItems; + public JsonSchemaInfo maxItems(Integer maxItems) { + this.maxItems = maxItems; + return this; + } + public Integer minItems; + public JsonSchemaInfo minItems(Integer minItems) { + this.minItems = minItems; + return this; + } + public Integer maxLength; + public JsonSchemaInfo maxLength(Integer maxLength) { + this.maxLength = maxLength; + return this; + } + public Integer minLength; + public JsonSchemaInfo minLength(Integer minLength) { + this.minLength = minLength; + return this; + } + public Integer maxProperties; + public JsonSchemaInfo maxProperties(Integer maxProperties) { + this.maxProperties = maxProperties; + return this; + } + public Integer minProperties; + public JsonSchemaInfo minProperties(Integer minProperties) { + this.minProperties = minProperties; + return this; + } + public Number maximum; + public JsonSchemaInfo maximum(Number maximum) { + this.maximum = maximum; + return this; + } + public Number minimum; + public JsonSchemaInfo minimum(Number minimum) { + this.minimum = minimum; + return this; + } + public BigDecimal multipleOf; + public JsonSchemaInfo multipleOf(BigDecimal multipleOf) { + this.multipleOf = multipleOf; + return this; + } + public Class additionalProperties; + public JsonSchemaInfo additionalProperties(Class additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + public List> allOf; + public JsonSchemaInfo allOf(List> allOf) { + this.allOf = allOf; + return this; + } + public List> anyOf; + public JsonSchemaInfo anyOf(List> anyOf) { + this.anyOf = anyOf; + return this; + } + public List> oneOf; + public JsonSchemaInfo oneOf(List> oneOf) { + this.oneOf = oneOf; + return this; + } + public Class not; + public JsonSchemaInfo not(Class not) { + this.not = not; + return this; + } + public Boolean uniqueItems; + public JsonSchemaInfo uniqueItems(Boolean uniqueItems) { + this.uniqueItems = uniqueItems; + return this; + } + public Set enumValues; + public JsonSchemaInfo enumValues(Set enumValues) { + this.enumValues = enumValues; + return this; + } + public Pattern pattern; + public JsonSchemaInfo enumValues(Pattern pattern) { + this.pattern = pattern; + return this; + } +} \ No newline at end of file diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/CodegenSchema.java b/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/CodegenSchema.java index c5663dcfbc4..07a79e32315 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/CodegenSchema.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/CodegenSchema.java @@ -130,86 +130,6 @@ public boolean hasValidation() { return maxItems != null || minItems != null || minProperties != null || maxProperties != null || minLength != null || maxLength != null || multipleOf != null || patternInfo != null || minimum != null || maximum != null || exclusiveMinimum != null || exclusiveMaximum != null || uniqueItems != null; } - public List keywords() { - List keywords = new ArrayList<>(); - if (type != null) { - keywords.add("type"); - } - if (format != null) { - keywords.add("format"); - } - if (items != null) { - keywords.add("items"); - } - if (properties != null) { - keywords.add("properties"); - } - if (requiredProperties != null) { - keywords.add("required"); - } - if (exclusiveMaximum != null) { - keywords.add("exclusiveMaximum"); - } - if (exclusiveMinimum != null) { - keywords.add("exclusiveMinimum"); - } - if (maxItems != null) { - keywords.add("maxItems"); - } - if (minItems != null) { - keywords.add("minItems"); - } - if (maxLength != null) { - keywords.add("maxLength"); - } - if (minLength != null) { - keywords.add("minLength"); - } - if (maxProperties != null) { - keywords.add("maxProperties"); - } - if (minProperties != null) { - keywords.add("minProperties"); - } - if (maximum != null) { - keywords.add("maximum"); - } - if (minimum != null) { - keywords.add("minimum"); - } - if (multipleOf != null) { - keywords.add("multipleOf"); - } - if (additionalProperties != null) { - keywords.add("additionalProperties"); - } - if (allOf != null) { - keywords.add("allOf"); - } - if (anyOf != null) { - keywords.add("anyOf"); - } - if (oneOf != null) { - keywords.add("oneOf"); - } - if (not != null) { - keywords.add("not"); - } - if (uniqueItems != null) { - keywords.add("uniqueItems"); - } - if (enumInfo != null) { - keywords.add("enum"); - } - if (patternInfo != null) { - keywords.add("pattern"); - } - if (keywords.isEmpty()) { - return null; - } - return keywords; - } - public boolean isCustomSchema() { // true when schema class is directly extended, false otherwise if (isBooleanSchemaTrue || isBooleanSchemaFalse) { From d1051c739401c82a81ab662525103554e3401fcf Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 10:35:16 -0800 Subject: [PATCH 09/12] Fixes some types on custom schemas --- .../components/schemas/AllofCombinedWithAnyofOneof.md | 6 +++--- .../java/docs/components/schemas/ByInt.md | 2 +- .../java/docs/components/schemas/ByNumber.md | 2 +- .../java/docs/components/schemas/BySmallNumber.md | 2 +- ...lidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md | 2 +- .../components/schemas/AllofCombinedWithAnyofOneof.java | 7 ++++--- .../client/components/schemas/AnyofWithBaseSchema.java | 2 +- .../client/components/schemas/ByInt.java | 3 ++- .../client/components/schemas/ByNumber.java | 3 ++- .../client/components/schemas/BySmallNumber.java | 3 ++- .../components/schemas/EnumWith0DoesNotMatchFalse.java | 2 +- .../components/schemas/EnumWith1DoesNotMatchTrue.java | 2 +- .../components/schemas/EnumWithEscapedCharacters.java | 2 +- .../client/components/schemas/EnumsInProperties.java | 4 ++-- ...dInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java | 5 +++-- .../components/schemas/InvalidStringValueForDefault.java | 2 +- .../components/schemas/NulCharactersInStrings.java | 2 +- .../client/components/schemas/OneofWithBaseSchema.java | 2 +- .../client/components/schemas/SimpleEnumValidation.java | 2 +- ...ltKeywordDoesNotDoAnythingIfThePropertyIsMissing.java | 2 +- .../client/schemas/validation/MultipleOfValidator.java | 4 ++-- .../codegen/generators/JavaClientGenerator.java | 9 +++++++++ .../components/schemas/SchemaClass/_multipleOf.hbs | 4 ++-- .../components/schemas/SchemaClass/_types.hbs | 2 +- .../schemas/validation/MultipleOfValidator.hbs | 4 ++-- 25 files changed, 47 insertions(+), 33 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md index 3e9598dff0d..feabc22f491 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md @@ -52,7 +52,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| BigDecimal |     multipleOf = 5
| +| BigDecimal |     multipleOf = new BigDecimal("5")
| ### Method Summary | Modifier and Type | Method and Description | @@ -76,7 +76,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| BigDecimal |     multipleOf = 3
| +| BigDecimal |     multipleOf = new BigDecimal("3")
| ### Method Summary | Modifier and Type | Method and Description | @@ -100,7 +100,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| BigDecimal |     multipleOf = 2
| +| BigDecimal |     multipleOf = new BigDecimal("2")
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md index ae4ddcec7b4..5d712d4bb50 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByInt.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| BigDecimal |     multipleOf = 2
| +| BigDecimal |     multipleOf = new BigDecimal("2")
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md index 53f71e63fed..5358e3bb3e1 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/ByNumber.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| BigDecimal |     multipleOf = 1.5
| +| BigDecimal |     multipleOf = new BigDecimal("1.5")
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md index 83b9f5096fe..dc8fef0f4d7 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/BySmallNumber.md @@ -23,7 +23,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| BigDecimal |     multipleOf = 0.00010
| +| BigDecimal |     multipleOf = new BigDecimal("0.00010")
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md index 971dcf5cde1..d66536bafd2 100644 --- a/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md +++ b/samples/client/3_0_3_unit_test/java/docs/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md @@ -46,7 +46,7 @@ long validatedPayload = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.I | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| -| BigDecimal |     multipleOf = 0.123456789
| +| BigDecimal |     multipleOf = new BigDecimal("0.123456789")
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index fafb47f8301..80204253386 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -36,7 +37,7 @@ public static class Schema02 extends JsonSchema implements SchemaNullValidator, protected Schema02() { super(new JsonSchemaInfo() - .multipleOf(2) + .multipleOf(new BigDecimal("2")) ); } @@ -249,7 +250,7 @@ public static class Schema01 extends JsonSchema implements SchemaNullValidator, protected Schema01() { super(new JsonSchemaInfo() - .multipleOf(3) + .multipleOf(new BigDecimal("3")) ); } @@ -462,7 +463,7 @@ public static class Schema0 extends JsonSchema implements SchemaNullValidator, S protected Schema0() { super(new JsonSchemaInfo() - .multipleOf(5) + .multipleOf(new BigDecimal("5")) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index 19b7b1ddd86..ae3ef36e18f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -470,7 +470,7 @@ protected AnyofWithBaseSchema1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .anyOf(List.of( Schema0.class, Schema1.class diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java index 51f617c164e..23eb69154b0 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -42,7 +43,7 @@ public static class ByInt1 extends JsonSchema implements SchemaNullValidator, Sc protected ByInt1() { super(new JsonSchemaInfo() - .multipleOf(2) + .multipleOf(new BigDecimal("2")) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java index eb635b1e4ea..80cd3dc981f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -42,7 +43,7 @@ public static class ByNumber1 extends JsonSchema implements SchemaNullValidator, protected ByNumber1() { super(new JsonSchemaInfo() - .multipleOf(1.5) + .multipleOf(new BigDecimal("1.5")) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java index 964b85cb04a..34d11625d83 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -42,7 +43,7 @@ public static class BySmallNumber1 extends JsonSchema implements SchemaNullValid protected BySmallNumber1() { super(new JsonSchemaInfo() - .multipleOf(0.00010) + .multipleOf(new BigDecimal("0.00010")) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java index c0ffbdfac12..235cfbeb4c8 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java @@ -38,7 +38,7 @@ protected EnumWith0DoesNotMatchFalse1() { Long.class, Float.class, Double.class - ) + )) .enumValues(SetMaker.makeSet( 0 )) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java index adbcfac4f49..7880730c50b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java @@ -38,7 +38,7 @@ protected EnumWith1DoesNotMatchTrue1() { Long.class, Float.class, Double.class - ) + )) .enumValues(SetMaker.makeSet( 1 )) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java index 1f21f41ddc6..d9d47a46d03 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java @@ -35,7 +35,7 @@ protected EnumWithEscapedCharacters1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "foo\nbar", "foo\rbar" diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java index cf0c61ab987..f99445bfce0 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java @@ -32,7 +32,7 @@ protected Foo() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "foo" )) @@ -83,7 +83,7 @@ protected Bar() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "bar" )) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java index d83abf617da..9c18a12e50b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -37,8 +38,8 @@ protected InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf1() { Long.class, Float.class, Double.class - ) - .multipleOf(0.123456789) + )) + .multipleOf(new BigDecimal("0.123456789")) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java index 4f20d04fa17..bb76554f489 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefault.java @@ -39,7 +39,7 @@ protected Bar() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(4) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java index 672285692ad..e1a042586aa 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java @@ -35,7 +35,7 @@ protected NulCharactersInStrings1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "hello\0there" )) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java index 46d953fe9be..5cf02b0d97a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java @@ -470,7 +470,7 @@ protected OneofWithBaseSchema1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .oneOf(List.of( Schema0.class, Schema1.class diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java index 204927ca40f..fb4dbcd794f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java @@ -38,7 +38,7 @@ protected SimpleEnumValidation1() { Long.class, Float.class, Double.class - ) + )) .enumValues(SetMaker.makeSet( 1, 2, diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java index dba654997e5..8cd31417b5b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.java @@ -34,7 +34,7 @@ protected Alpha() { Long.class, Float.class, Double.class - ) + )) .maximum(3) ); } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java index ae874e72ff4..cde604e8581 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java @@ -7,8 +7,8 @@ public class MultipleOfValidator implements KeywordValidator { public final BigDecimal multipleOf; - public MultipleOfValidator(Number multipleOf) { - this.multipleOf = getBigDecimal(multipleOf); + public MultipleOfValidator(BigDecimal multipleOf) { + this.multipleOf = multipleOf; } @Override diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 6e44c9b97e1..7bfe6ae31c5 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -1520,6 +1520,7 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu addOneOfValidator(schema, imports); addEnumValidator(schema, imports); addPatternValidator(schema, imports); + addMultipleOfValidator(schema, imports); if (schema.mapValueSchema != null) { imports.addAll(getDeeperImports(sourceJsonPath, schema.mapValueSchema)); } @@ -1581,6 +1582,13 @@ private void addAdditionalPropertiesValidator(CodegenSchema schema, Set } } + private void addMultipleOfValidator(CodegenSchema schema, Set imports) { + if (schema.multipleOf != null) { + imports.add("import java.math.BigDecimal;"); + } + } + + private void addCustomSchemaImports(Set imports, CodegenSchema schema) { imports.add("import " + packageName + ".schemas.validation.JsonSchema;"); imports.add("import " + packageName + ".schemas.validation.JsonSchemaInfo;"); @@ -1643,6 +1651,7 @@ private void addNumberSchemaImports(Set imports, CodegenSchema schema) { addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); addEnumValidator(schema, imports); + addMultipleOfValidator(schema, imports); } private void addStringSchemaImports(Set imports, CodegenSchema schema) { diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs index c65758658c9..ac1c7545a60 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_multipleOf.hbs @@ -1,5 +1,5 @@ {{#if forDocs}} -    multipleOf = {{multipleOf}}
+    multipleOf = new BigDecimal("{{multipleOf.toString}}")
{{~else}} -.multipleOf({{multipleOf}}) +.multipleOf(new BigDecimal("{{multipleOf.toString}}")) {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs index cdb80fcfda6..21908444ef5 100644 --- a/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs +++ b/src/main/resources/java/src/main/java/packagename/components/schemas/SchemaClass/_types.hbs @@ -73,7 +73,7 @@ Boolean.class{{#unless @last}},{{/unless}} {{/eq}} {{/each}} -) +)) {{/if}} {{/and}} {{/if}} \ No newline at end of file diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/MultipleOfValidator.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/MultipleOfValidator.hbs index 61c61c578c9..046d4079b99 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/validation/MultipleOfValidator.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/MultipleOfValidator.hbs @@ -7,8 +7,8 @@ import java.math.BigDecimal; public class MultipleOfValidator implements KeywordValidator { public final BigDecimal multipleOf; - public MultipleOfValidator(Number multipleOf) { - this.multipleOf = getBigDecimal(multipleOf); + public MultipleOfValidator(BigDecimal multipleOf) { + this.multipleOf = multipleOf; } @Override From ee8626d7f4185d3449ffeda37e1daec8c06abb2d Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 11:06:02 -0800 Subject: [PATCH 10/12] Fixes tests --- .../client/schemas/AnyTypeJsonSchema.java | 3 +- .../client/schemas/BooleanJsonSchema.java | 7 +-- .../client/schemas/DateJsonSchema.java | 9 ++-- .../client/schemas/DateTimeJsonSchema.java | 9 ++-- .../client/schemas/DecimalJsonSchema.java | 9 ++-- .../client/schemas/DoubleJsonSchema.java | 9 ++-- .../client/schemas/FloatJsonSchema.java | 9 ++-- .../client/schemas/Int32JsonSchema.java | 15 +++--- .../client/schemas/Int64JsonSchema.java | 19 +++---- .../client/schemas/IntJsonSchema.java | 19 +++---- .../client/schemas/ListJsonSchema.java | 7 +-- .../client/schemas/MapJsonSchema.java | 7 +-- .../client/schemas/NotAnyTypeJsonSchema.java | 7 +-- .../client/schemas/NullJsonSchema.java | 7 +-- .../client/schemas/NumberJsonSchema.java | 17 ++++--- .../client/schemas/StringJsonSchema.java | 7 +-- .../client/schemas/UuidJsonSchema.java | 9 ++-- .../schemas/validation/JsonSchemaInfo.java | 2 +- .../validation/UnsetAnyTypeJsonSchema.java | 2 +- .../client/schemas/ArrayTypeSchemaTest.java | 22 ++++---- .../client/schemas/ObjectTypeSchemaTest.java | 51 +++++++++---------- .../AdditionalPropertiesValidatorTest.java | 14 ++--- .../schemas/validation/JsonSchemaTest.java | 6 +-- .../packagename/schemas/AnyTypeJsonSchema.hbs | 3 +- .../packagename/schemas/BooleanJsonSchema.hbs | 7 +-- .../packagename/schemas/DateJsonSchema.hbs | 9 ++-- .../schemas/DateTimeJsonSchema.hbs | 9 ++-- .../packagename/schemas/DecimalJsonSchema.hbs | 9 ++-- .../packagename/schemas/DoubleJsonSchema.hbs | 9 ++-- .../packagename/schemas/FloatJsonSchema.hbs | 9 ++-- .../packagename/schemas/Int32JsonSchema.hbs | 15 +++--- .../packagename/schemas/Int64JsonSchema.hbs | 19 +++---- .../packagename/schemas/IntJsonSchema.hbs | 19 +++---- .../packagename/schemas/ListJsonSchema.hbs | 7 +-- .../packagename/schemas/MapJsonSchema.hbs | 7 +-- .../schemas/NotAnyTypeJsonSchema.hbs | 7 +-- .../packagename/schemas/NullJsonSchema.hbs | 7 +-- .../packagename/schemas/NumberJsonSchema.hbs | 17 ++++--- .../packagename/schemas/StringJsonSchema.hbs | 7 +-- .../packagename/schemas/UuidJsonSchema.hbs | 9 ++-- .../schemas/validation/JsonSchemaInfo.hbs | 2 +- .../validation/UnsetAnyTypeJsonSchema.hbs | 2 +- .../schemas/ArrayTypeSchemaTest.hbs | 26 ++++------ .../schemas/ObjectTypeSchemaTest.hbs | 51 +++++++++---------- .../AdditionalPropertiesValidatorTest.hbs | 14 ++--- .../schemas/validation/JsonSchemaTest.hbs | 6 +-- 46 files changed, 278 insertions(+), 258 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java index d4b08683c94..7fdabe3b725 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java @@ -7,6 +7,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -31,7 +32,7 @@ public class AnyTypeJsonSchema extends JsonSchema implements SchemaNullValidator private static AnyTypeJsonSchema instance; protected AnyTypeJsonSchema() { - super(null); + super(new JsonSchemaInfo()); } public static AnyTypeJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java index ed45f884b9b..5c072caddcc 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -23,9 +24,9 @@ public class BooleanJsonSchema extends JsonSchema implements SchemaBooleanValida private static BooleanJsonSchema instance; protected BooleanJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + ); } public static BooleanJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java index e26ac786940..6fba2c33485 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -25,10 +26,10 @@ public class DateJsonSchema extends JsonSchema implements SchemaStringValidator private static DateJsonSchema instance; protected DateJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("date")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date") + ); } public static DateJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java index 48cb11ae1d6..cad1e3696e4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -25,10 +26,10 @@ public class DateTimeJsonSchema extends JsonSchema implements SchemaStringValida private static DateTimeJsonSchema instance; protected DateTimeJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date-time") + ); } public static DateTimeJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java index 024dc806a9a..0df517cb39e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -24,10 +25,10 @@ public class DecimalJsonSchema extends JsonSchema implements SchemaStringValidat private static DecimalJsonSchema instance; protected DecimalJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("number")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("number") + ); } public static DecimalJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java index c783717d2ee..6dc59c4ef16 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; @@ -24,10 +25,10 @@ public class DoubleJsonSchema extends JsonSchema implements SchemaNumberValidato private static DoubleJsonSchema instance; protected DoubleJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Double.class))), - new KeywordEntry("format", new FormatValidator("double")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Double.class)) + .format("double") + ); } public static DoubleJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java index ab1b54e9b8d..7748038cb7a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; @@ -24,10 +25,10 @@ public class FloatJsonSchema extends JsonSchema implements SchemaNumberValidator private static FloatJsonSchema instance; protected FloatJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Float.class))), - new KeywordEntry("format", new FormatValidator("float")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Float.class)) + .format("float") + ); } public static FloatJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java index 96be726202c..c8aa532ce78 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,13 +25,13 @@ public class Int32JsonSchema extends JsonSchema implements SchemaNumberValidator private static Int32JsonSchema instance; protected Int32JsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Float.class - ))), - new KeywordEntry("format", new FormatValidator("int32")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Float.class + )) + .format("int32") + ); } public static Int32JsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java index 2c14e4bb9b2..963c5ad0bed 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,15 +25,15 @@ public class Int64JsonSchema extends JsonSchema implements SchemaNumberValidator private static Int64JsonSchema instance; protected Int64JsonSchema() { - super(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")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int64") + ); } public static Int64JsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java index ec55400d01b..98e3d648d5a 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,15 +25,15 @@ public class IntJsonSchema extends JsonSchema implements SchemaNumberValidator { private static IntJsonSchema instance; protected IntJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - ))), - new KeywordEntry("format", new FormatValidator("int")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int") + ); } public static IntJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java index 90a27ce262a..2d6c4c6bfc5 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,9 +25,9 @@ public class ListJsonSchema extends JsonSchema implements SchemaListValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + ); } public static ListJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java index dd5730ad849..4406d66c12d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,9 +25,9 @@ public class MapJsonSchema extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + ); } public static MapJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java index 5ba8a9e0939..57b8adcc354 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java @@ -7,6 +7,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.NotValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -31,9 +32,9 @@ public class NotAnyTypeJsonSchema extends JsonSchema implements SchemaNullValida private static NotAnyTypeJsonSchema instance; protected NotAnyTypeJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("not", new NotValidator(AnyTypeJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .not(AnyTypeJsonSchema.class) + ); } public static NotAnyTypeJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java index 2ed58d45ce9..4445d6ac8b7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; @@ -23,9 +24,9 @@ public class NullJsonSchema extends JsonSchema implements SchemaNullValidator { private static NullJsonSchema instance; protected NullJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Void.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Void.class)) + ); } public static NullJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java index eed4f82f321..885adc6b92f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java @@ -3,6 +3,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -23,14 +24,14 @@ public class NumberJsonSchema extends JsonSchema implements SchemaNumberValidato private static NumberJsonSchema instance; protected NumberJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + ); } public static NumberJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java index 6f200a19485..6b7dbe2e7b2 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -26,9 +27,9 @@ public class StringJsonSchema extends JsonSchema implements SchemaStringValidato private static StringJsonSchema instance; protected StringJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); } public static StringJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java index 08094fc2a24..cc73e76b345 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java @@ -3,6 +3,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -25,10 +26,10 @@ public class UuidJsonSchema extends JsonSchema implements SchemaStringValidator private static UuidJsonSchema instance; protected UuidJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("uuid")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("uuid") + ); } public static UuidJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java index 6133b7b3298..0d069ea2f99 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java @@ -123,7 +123,7 @@ public JsonSchemaInfo enumValues(Set enumValues) { return this; } public Pattern pattern; - public JsonSchemaInfo enumValues(Pattern pattern) { + public JsonSchemaInfo pattern(Pattern pattern) { this.pattern = pattern; return this; } diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java index 65e4b3eb833..8f5e4adc0bd 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java @@ -17,7 +17,7 @@ public class UnsetAnyTypeJsonSchema extends JsonSchema implements SchemaNullVali private static UnsetAnyTypeJsonSchema instance; protected UnsetAnyTypeJsonSchema() { - super(null); + super(new JsonSchemaInfo()); } public static UnsetAnyTypeJsonSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java index ae0d9705599..5438db8734d 100644 --- a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java +++ b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java @@ -5,22 +5,18 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; import java.util.ArrayList; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; @@ -35,10 +31,10 @@ public class ArrayTypeSchemaTest { public static class ArrayWithItemsSchema extends JsonSchema implements SchemaListValidator> { public ArrayWithItemsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(StringJsonSchema.class) + ); } @Override @@ -94,10 +90,10 @@ public static ArrayWithOutputClsSchemaList of(List arg, SchemaConfigurat public static class ArrayWithOutputClsSchema extends JsonSchema implements SchemaListValidator { public ArrayWithOutputClsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(StringJsonSchema.class) + ); } diff --git a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java index c5513efe95a..178ee83c689 100644 --- a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java +++ b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java @@ -5,15 +5,12 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; -import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; @@ -39,12 +36,12 @@ public class ObjectTypeSchemaTest { public static class ObjectWithPropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithPropsSchema instance; private ObjectWithPropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } @@ -89,10 +86,10 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class ObjectWithAddpropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithAddpropsSchema instance; private ObjectWithAddpropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(StringJsonSchema.class) + ); } public static ObjectWithAddpropsSchema getInstance() { @@ -146,13 +143,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class ObjectWithPropsAndAddpropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithPropsAndAddpropsSchema instance; private ObjectWithPropsAndAddpropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(BooleanJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + .additionalProperties(BooleanJsonSchema.class) + ); } public static ObjectWithPropsAndAddpropsSchema getInstance() { @@ -207,12 +204,12 @@ public static ObjectWithOutputTypeSchemaMap of(Map arg, SchemaCo public static class ObjectWithOutputTypeSchema extends JsonSchema implements SchemaMapValidator { private static ObjectWithOutputTypeSchema instance; public ObjectWithOutputTypeSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } public static ObjectWithOutputTypeSchema getInstance() { diff --git a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java index 2145de63899..01f2d0fcd18 100644 --- a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java +++ b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java @@ -21,12 +21,12 @@ public class AdditionalPropertiesValidatorTest { public static class ObjectWithPropsSchema extends JsonSchema { private static ObjectWithPropsSchema instance; private ObjectWithPropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } @@ -41,7 +41,7 @@ public static ObjectWithPropsSchema getInstance() { public Object getNewInstance(Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { if (arg instanceof FrozenMap) { @SuppressWarnings("unchecked") FrozenMap castArg = (FrozenMap) arg; - return arg; + return castArg; } throw new InvalidTypeException("Invalid input type="+arg.getClass()+". It can't be instantiated by this schema"); } diff --git a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java index eea333e56ae..73b11d7c6a2 100644 --- a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java +++ b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java @@ -16,9 +16,9 @@ class SomeSchema extends JsonSchema { private static SomeSchema instance; protected SomeSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); } public static SomeSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/AnyTypeJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/AnyTypeJsonSchema.hbs index dd530f23b07..e0ce19dd595 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/AnyTypeJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/AnyTypeJsonSchema.hbs @@ -7,6 +7,7 @@ import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.FrozenList; import {{{packageName}}}.schemas.validation.FrozenMap; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaNullValidator; import {{{packageName}}}.schemas.validation.SchemaBooleanValidator; @@ -31,7 +32,7 @@ public class AnyTypeJsonSchema extends JsonSchema implements SchemaNullValidator private static AnyTypeJsonSchema instance; protected AnyTypeJsonSchema() { - super(null); + super(new JsonSchemaInfo()); } public static AnyTypeJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/BooleanJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/BooleanJsonSchema.hbs index 7769c66fb7b..164d20feaab 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/BooleanJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/BooleanJsonSchema.hbs @@ -5,6 +5,7 @@ import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaBooleanValidator; @@ -23,9 +24,9 @@ public class BooleanJsonSchema extends JsonSchema implements SchemaBooleanValida private static BooleanJsonSchema instance; protected BooleanJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + ); } public static BooleanJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/DateJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/DateJsonSchema.hbs index af067e7de17..3c13573a05b 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/DateJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/DateJsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaStringValidator; @@ -25,10 +26,10 @@ public class DateJsonSchema extends JsonSchema implements SchemaStringValidator private static DateJsonSchema instance; protected DateJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("date")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date") + ); } public static DateJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/DateTimeJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/DateTimeJsonSchema.hbs index a3acba36b50..e52c57c9432 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/DateTimeJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/DateTimeJsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaStringValidator; @@ -25,10 +26,10 @@ public class DateTimeJsonSchema extends JsonSchema implements SchemaStringValida private static DateTimeJsonSchema instance; protected DateTimeJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date-time") + ); } public static DateTimeJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/DecimalJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/DecimalJsonSchema.hbs index 8ffc247c134..7908603edba 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/DecimalJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/DecimalJsonSchema.hbs @@ -5,6 +5,7 @@ import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaStringValidator; @@ -24,10 +25,10 @@ public class DecimalJsonSchema extends JsonSchema implements SchemaStringValidat private static DecimalJsonSchema instance; protected DecimalJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("number")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("number") + ); } public static DecimalJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/DoubleJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/DoubleJsonSchema.hbs index 3002426c889..8f0669049d8 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/DoubleJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/DoubleJsonSchema.hbs @@ -5,6 +5,7 @@ import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaNumberValidator; @@ -24,10 +25,10 @@ public class DoubleJsonSchema extends JsonSchema implements SchemaNumberValidato private static DoubleJsonSchema instance; protected DoubleJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Double.class))), - new KeywordEntry("format", new FormatValidator("double")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Double.class)) + .format("double") + ); } public static DoubleJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/FloatJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/FloatJsonSchema.hbs index 9e61a5d08d7..b03f38e0097 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/FloatJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/FloatJsonSchema.hbs @@ -5,6 +5,7 @@ import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaNumberValidator; @@ -24,10 +25,10 @@ public class FloatJsonSchema extends JsonSchema implements SchemaNumberValidator private static FloatJsonSchema instance; protected FloatJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Float.class))), - new KeywordEntry("format", new FormatValidator("float")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Float.class)) + .format("float") + ); } public static FloatJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/Int32JsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/Int32JsonSchema.hbs index efa709f4838..4cda0003165 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/Int32JsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/Int32JsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.FormatValidator; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -24,13 +25,13 @@ public class Int32JsonSchema extends JsonSchema implements SchemaNumberValidator private static Int32JsonSchema instance; protected Int32JsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Float.class - ))), - new KeywordEntry("format", new FormatValidator("int32")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Float.class + )) + .format("int32") + ); } public static Int32JsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/Int64JsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/Int64JsonSchema.hbs index 7f7a85888de..36c551c85bf 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/Int64JsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/Int64JsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.FormatValidator; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -24,15 +25,15 @@ public class Int64JsonSchema extends JsonSchema implements SchemaNumberValidator private static Int64JsonSchema instance; protected Int64JsonSchema() { - super(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")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int64") + ); } public static Int64JsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/IntJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/IntJsonSchema.hbs index 40f321b5891..f626515ea60 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/IntJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/IntJsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.FormatValidator; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -24,15 +25,15 @@ public class IntJsonSchema extends JsonSchema implements SchemaNumberValidator { private static IntJsonSchema instance; protected IntJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - ))), - new KeywordEntry("format", new FormatValidator("int")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int") + ); } public static IntJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/ListJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/ListJsonSchema.hbs index d033e09030c..f6e14b5c7dc 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/ListJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/ListJsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.FrozenList; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -24,9 +25,9 @@ public class ListJsonSchema extends JsonSchema implements SchemaListValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + ); } public static ListJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/MapJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/MapJsonSchema.hbs index 37114eb09d0..c1aa48cb93e 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/MapJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/MapJsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.FrozenMap; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -24,9 +25,9 @@ public class MapJsonSchema extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + ); } public static MapJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/NotAnyTypeJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/NotAnyTypeJsonSchema.hbs index ec3a1357b1f..4218c9287d7 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/NotAnyTypeJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/NotAnyTypeJsonSchema.hbs @@ -7,6 +7,7 @@ import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.FrozenList; import {{{packageName}}}.schemas.validation.FrozenMap; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.NotValidator; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -31,9 +32,9 @@ public class NotAnyTypeJsonSchema extends JsonSchema implements SchemaNullValida private static NotAnyTypeJsonSchema instance; protected NotAnyTypeJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("not", new NotValidator(AnyTypeJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .not(AnyTypeJsonSchema.class) + ); } public static NotAnyTypeJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/NullJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/NullJsonSchema.hbs index ac363b9dffb..6e3e303ed96 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/NullJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/NullJsonSchema.hbs @@ -5,6 +5,7 @@ import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaNullValidator; @@ -23,9 +24,9 @@ public class NullJsonSchema extends JsonSchema implements SchemaNullValidator { private static NullJsonSchema instance; protected NullJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Void.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Void.class)) + ); } public static NullJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/NumberJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/NumberJsonSchema.hbs index e5029a5d004..7d07c04087b 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/NumberJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/NumberJsonSchema.hbs @@ -3,6 +3,7 @@ package {{{packageName}}}.schemas; import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -23,14 +24,14 @@ public class NumberJsonSchema extends JsonSchema implements SchemaNumberValidato private static NumberJsonSchema instance; protected NumberJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + ); } public static NumberJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/StringJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/StringJsonSchema.hbs index 49563e2d73b..97786126941 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/StringJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/StringJsonSchema.hbs @@ -4,6 +4,7 @@ import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaStringValidator; @@ -26,9 +27,9 @@ public class StringJsonSchema extends JsonSchema implements SchemaStringValidato private static StringJsonSchema instance; protected StringJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); } public static StringJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/UuidJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/UuidJsonSchema.hbs index bc22b14b0a2..aedccdbd571 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/UuidJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/UuidJsonSchema.hbs @@ -3,6 +3,7 @@ package {{{packageName}}}.schemas; import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.exceptions.InvalidTypeException; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; @@ -25,10 +26,10 @@ public class UuidJsonSchema extends JsonSchema implements SchemaStringValidator private static UuidJsonSchema instance; protected UuidJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("uuid")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("uuid") + ); } public static UuidJsonSchema getInstance() { diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs index 237e86fd8a0..673f607b31b 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchemaInfo.hbs @@ -123,7 +123,7 @@ public class JsonSchemaInfo { return this; } public Pattern pattern; - public JsonSchemaInfo enumValues(Pattern pattern) { + public JsonSchemaInfo pattern(Pattern pattern) { this.pattern = pattern; return this; } diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/UnsetAnyTypeJsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/UnsetAnyTypeJsonSchema.hbs index 7b69e20a399..46ba353d510 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/validation/UnsetAnyTypeJsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/UnsetAnyTypeJsonSchema.hbs @@ -17,7 +17,7 @@ public class UnsetAnyTypeJsonSchema extends JsonSchema implements SchemaNullVali private static UnsetAnyTypeJsonSchema instance; protected UnsetAnyTypeJsonSchema() { - super(null); + super(new JsonSchemaInfo()); } public static UnsetAnyTypeJsonSchema getInstance() { diff --git a/src/main/resources/java/src/test/java/packagename/schemas/ArrayTypeSchemaTest.hbs b/src/main/resources/java/src/test/java/packagename/schemas/ArrayTypeSchemaTest.hbs index d3fb5c1ad18..148b8afe3a6 100644 --- a/src/main/resources/java/src/test/java/packagename/schemas/ArrayTypeSchemaTest.hbs +++ b/src/main/resources/java/src/test/java/packagename/schemas/ArrayTypeSchemaTest.hbs @@ -5,22 +5,18 @@ import org.junit.Test; import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; -import {{{packageName}}}.schemas.validation.ItemsValidator; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.FrozenList; -import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; import {{{packageName}}}.schemas.validation.SchemaListValidator; -import {{{packageName}}}.schemas.validation.TypeValidator; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.ValidationMetadata; import java.util.ArrayList; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; @@ -28,17 +24,17 @@ public class ArrayTypeSchemaTest { static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone()); static final ValidationMetadata validationMetadata = new ValidationMetadata( List.of("args[0"), - configuration, - new PathToSchemasMap(), + configuration, + new PathToSchemasMap(), new LinkedHashSet<>() ); public static class ArrayWithItemsSchema extends JsonSchema implements SchemaListValidator> { public ArrayWithItemsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(StringJsonSchema.class) + ); } @Override @@ -94,10 +90,10 @@ public class ArrayTypeSchemaTest { public static class ArrayWithOutputClsSchema extends JsonSchema implements SchemaListValidator { public ArrayWithOutputClsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(StringJsonSchema.class) + ); } diff --git a/src/main/resources/java/src/test/java/packagename/schemas/ObjectTypeSchemaTest.hbs b/src/main/resources/java/src/test/java/packagename/schemas/ObjectTypeSchemaTest.hbs index 39d4059085c..d1dbb853366 100644 --- a/src/main/resources/java/src/test/java/packagename/schemas/ObjectTypeSchemaTest.hbs +++ b/src/main/resources/java/src/test/java/packagename/schemas/ObjectTypeSchemaTest.hbs @@ -5,15 +5,12 @@ import org.junit.Test; import {{{packageName}}}.configurations.JsonSchemaKeywordFlags; import {{{packageName}}}.configurations.SchemaConfiguration; import {{{packageName}}}.exceptions.InvalidTypeException; -import {{{packageName}}}.schemas.validation.AdditionalPropertiesValidator; import {{{packageName}}}.schemas.validation.JsonSchema; +import {{{packageName}}}.schemas.validation.JsonSchemaInfo; import {{{packageName}}}.schemas.validation.FrozenMap; -import {{{packageName}}}.schemas.validation.KeywordEntry; import {{{packageName}}}.schemas.validation.PathToSchemasMap; -import {{{packageName}}}.schemas.validation.PropertiesValidator; import {{{packageName}}}.schemas.validation.PropertyEntry; import {{{packageName}}}.schemas.validation.SchemaMapValidator; -import {{{packageName}}}.schemas.validation.TypeValidator; import {{{packageName}}}.exceptions.ValidationException; import {{{packageName}}}.schemas.validation.ValidationMetadata; @@ -39,12 +36,12 @@ public class ObjectTypeSchemaTest { public static class ObjectWithPropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithPropsSchema instance; private ObjectWithPropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } @@ -89,10 +86,10 @@ public class ObjectTypeSchemaTest { public static class ObjectWithAddpropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithAddpropsSchema instance; private ObjectWithAddpropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(StringJsonSchema.class) + ); } public static ObjectWithAddpropsSchema getInstance() { @@ -146,13 +143,13 @@ public class ObjectTypeSchemaTest { public static class ObjectWithPropsAndAddpropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithPropsAndAddpropsSchema instance; private ObjectWithPropsAndAddpropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(BooleanJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + .additionalProperties(BooleanJsonSchema.class) + ); } public static ObjectWithPropsAndAddpropsSchema getInstance() { @@ -207,12 +204,12 @@ public class ObjectTypeSchemaTest { public static class ObjectWithOutputTypeSchema extends JsonSchema implements SchemaMapValidator { private static ObjectWithOutputTypeSchema instance; public ObjectWithOutputTypeSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } public static ObjectWithOutputTypeSchema getInstance() { diff --git a/src/main/resources/java/src/test/java/packagename/schemas/validation/AdditionalPropertiesValidatorTest.hbs b/src/main/resources/java/src/test/java/packagename/schemas/validation/AdditionalPropertiesValidatorTest.hbs index 21ff31e06f3..31f81bfca82 100644 --- a/src/main/resources/java/src/test/java/packagename/schemas/validation/AdditionalPropertiesValidatorTest.hbs +++ b/src/main/resources/java/src/test/java/packagename/schemas/validation/AdditionalPropertiesValidatorTest.hbs @@ -21,12 +21,12 @@ public class AdditionalPropertiesValidatorTest { public static class ObjectWithPropsSchema extends JsonSchema { private static ObjectWithPropsSchema instance; private ObjectWithPropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } @@ -41,7 +41,7 @@ public class AdditionalPropertiesValidatorTest { public Object getNewInstance(Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { if (arg instanceof FrozenMap) { @SuppressWarnings("unchecked") FrozenMap castArg = (FrozenMap) arg; - return arg; + return castArg; } throw new InvalidTypeException("Invalid input type="+arg.getClass()+". It can't be instantiated by this schema"); } diff --git a/src/main/resources/java/src/test/java/packagename/schemas/validation/JsonSchemaTest.hbs b/src/main/resources/java/src/test/java/packagename/schemas/validation/JsonSchemaTest.hbs index f450371abdd..cc13d02ee25 100644 --- a/src/main/resources/java/src/test/java/packagename/schemas/validation/JsonSchemaTest.hbs +++ b/src/main/resources/java/src/test/java/packagename/schemas/validation/JsonSchemaTest.hbs @@ -16,9 +16,9 @@ import java.util.Map; class SomeSchema extends JsonSchema { private static SomeSchema instance; protected SomeSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); } public static SomeSchema getInstance() { From 4b573f7c55b758f97762f0b65a3f1856f87f6682 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 11:13:11 -0800 Subject: [PATCH 11/12] Samples regen --- .../java/.openapi-generator/FILES | 87 +++++++++++ .../client/schemas/ArrayTypeSchemaTest.java | 4 +- .../petstore/java/.openapi-generator/FILES | 139 ++++++++++++++++++ .../docs/components/schemas/FormatTest.md | 4 +- .../client/components/schemas/Animal.java | 2 +- .../client/components/schemas/Apple.java | 6 +- .../schemas/ArrayWithValidationsInItems.java | 2 +- .../client/components/schemas/Bar.java | 2 +- .../client/components/schemas/BasquePig.java | 2 +- .../client/components/schemas/Category.java | 2 +- .../schemas/ComplexQuadrilateral.java | 2 +- .../components/schemas/ComposedNumber.java | 2 +- .../schemas/ComposedOneOfDifferentTypes.java | 2 +- .../components/schemas/ComposedString.java | 2 +- .../client/components/schemas/Currency.java | 2 +- .../client/components/schemas/DanishPig.java | 2 +- .../components/schemas/DateTimeTest.java | 2 +- .../schemas/DateTimeWithValidations.java | 2 +- .../schemas/DateWithValidations.java | 2 +- .../client/components/schemas/EnumArrays.java | 4 +- .../client/components/schemas/EnumClass.java | 2 +- .../client/components/schemas/EnumTest.java | 8 +- .../schemas/EquilateralTriangle.java | 2 +- .../client/components/schemas/FormatTest.java | 23 +-- .../components/schemas/HealthCheckResult.java | 2 +- .../components/schemas/IntegerEnum.java | 2 +- .../components/schemas/IntegerEnumBig.java | 2 +- .../schemas/IntegerEnumOneValue.java | 2 +- .../schemas/IntegerEnumWithDefaultValue.java | 2 +- .../components/schemas/IntegerMax10.java | 2 +- .../components/schemas/IntegerMin15.java | 2 +- .../components/schemas/IsoscelesTriangle.java | 2 +- .../JSONPatchRequestAddReplaceTest.java | 2 +- .../schemas/JSONPatchRequestMoveCopy.java | 2 +- .../schemas/JSONPatchRequestRemove.java | 2 +- .../client/components/schemas/MapTest.java | 2 +- .../components/schemas/NullableClass.java | 30 ++-- .../components/schemas/NullableString.java | 2 +- .../schemas/NumberWithExclusiveMinMax.java | 2 +- .../schemas/NumberWithValidations.java | 2 +- .../ObjectWithInlineCompositionProperty.java | 2 +- .../client/components/schemas/Order.java | 2 +- .../client/components/schemas/Pet.java | 2 +- .../schemas/QuadrilateralInterface.java | 2 +- .../components/schemas/ScaleneTriangle.java | 2 +- .../schemas/SimpleQuadrilateral.java | 2 +- .../client/components/schemas/StringEnum.java | 2 +- .../schemas/StringEnumWithDefaultValue.java | 2 +- .../schemas/StringWithValidation.java | 2 +- .../components/schemas/TriangleInterface.java | 2 +- .../client/components/schemas/UUIDString.java | 2 +- .../client/components/schemas/User.java | 2 +- .../client/components/schemas/Whale.java | 2 +- .../client/components/schemas/Zebra.java | 4 +- .../delete/parameters/parameter1/Schema1.java | 2 +- .../parameter0/PathParamSchema0.java | 2 +- .../delete/parameters/parameter1/Schema1.java | 2 +- .../delete/parameters/parameter4/Schema4.java | 2 +- .../get/parameters/parameter0/Schema0.java | 2 +- .../get/parameters/parameter1/Schema1.java | 2 +- .../get/parameters/parameter2/Schema2.java | 2 +- .../get/parameters/parameter3/Schema3.java | 2 +- .../get/parameters/parameter4/Schema4.java | 2 +- .../get/parameters/parameter5/Schema5.java | 2 +- .../applicationxwwwformurlencoded/Schema.java | 4 +- .../applicationxwwwformurlencoded/Schema.java | 18 +-- .../post/parameters/parameter0/Schema0.java | 2 +- .../post/parameters/parameter1/Schema1.java | 2 +- .../content/applicationjson/Schema.java | 2 +- .../content/multipartformdata/Schema.java | 2 +- .../content/applicationjson/Schema.java | 2 +- .../content/multipartformdata/Schema.java | 2 +- .../get/parameters/parameter0/Schema0.java | 2 +- .../get/parameters/parameter0/Schema0.java | 2 +- .../client/schemas/AnyTypeJsonSchema.java | 3 +- .../client/schemas/BooleanJsonSchema.java | 7 +- .../client/schemas/DateJsonSchema.java | 9 +- .../client/schemas/DateTimeJsonSchema.java | 9 +- .../client/schemas/DecimalJsonSchema.java | 9 +- .../client/schemas/DoubleJsonSchema.java | 9 +- .../client/schemas/FloatJsonSchema.java | 9 +- .../client/schemas/Int32JsonSchema.java | 15 +- .../client/schemas/Int64JsonSchema.java | 19 +-- .../client/schemas/IntJsonSchema.java | 19 +-- .../client/schemas/ListJsonSchema.java | 7 +- .../client/schemas/MapJsonSchema.java | 7 +- .../client/schemas/NotAnyTypeJsonSchema.java | 7 +- .../client/schemas/NullJsonSchema.java | 7 +- .../client/schemas/NumberJsonSchema.java | 17 ++- .../client/schemas/StringJsonSchema.java | 7 +- .../client/schemas/UuidJsonSchema.java | 9 +- .../schemas/validation/JsonSchemaInfo.java | 2 +- .../validation/MultipleOfValidator.java | 4 +- .../validation/UnsetAnyTypeJsonSchema.java | 2 +- .../client/schemas/ArrayTypeSchemaTest.java | 26 ++-- .../client/schemas/ObjectTypeSchemaTest.java | 51 +++---- .../AdditionalPropertiesValidatorTest.java | 14 +- .../schemas/validation/JsonSchemaTest.java | 6 +- 98 files changed, 483 insertions(+), 246 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES b/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES index f9577b3c188..eafdbc0572f 100644 --- a/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES +++ b/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES @@ -244,6 +244,93 @@ src/main/java/org/openapijsonschematools/client/schemas/validation/TypeValidator src/main/java/org/openapijsonschematools/client/schemas/validation/UniqueItemsValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationMetadata.java +src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidateTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItselfTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicatorsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneofTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemasTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnyofTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArraysTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTypeMatchesBooleansTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ByIntTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ByNumberTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BySmallNumberTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DateTimeFormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EmailFormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalseTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrueTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharactersTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0Test.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1Test.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumsInPropertiesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ForbiddenPropertyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/HostnameFormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/IntegerTypeMatchesIntegersTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefaultTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/Ipv4FormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/Ipv6FormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MaximumValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedIntegerTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MinimumValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedIntegerTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MinitemsValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MinlengthValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemanticsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NestedItemsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemanticsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NotTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStringsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NumberTypeMatchesNumbersTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectTypeMatchesObjectsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/OneofTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/OneofWithRequiredTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchoredTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PatternValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharactersTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalpropertiesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefInAllofTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefInAnyofTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefInItemsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefInNotTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefInOneofTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefInPropertyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RequiredValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArrayTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharactersTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/StringTypeMatchesStringsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/UriFormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormatTest.java src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java src/test/java/org/openapijsonschematools/client/schemas/AnyTypeSchemaTest.java src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java diff --git a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java index 5438db8734d..98be1a42413 100644 --- a/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java +++ b/samples/client/3_0_3_unit_test/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java @@ -24,8 +24,8 @@ public class ArrayTypeSchemaTest { static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone()); static final ValidationMetadata validationMetadata = new ValidationMetadata( List.of("args[0"), - configuration, - new PathToSchemasMap(), + configuration, + new PathToSchemasMap(), new LinkedHashSet<>() ); diff --git a/samples/client/petstore/java/.openapi-generator/FILES b/samples/client/petstore/java/.openapi-generator/FILES index 8af22dcbc3c..9443f16fdca 100644 --- a/samples/client/petstore/java/.openapi-generator/FILES +++ b/samples/client/petstore/java/.openapi-generator/FILES @@ -710,6 +710,145 @@ src/main/java/org/openapijsonschematools/client/schemas/validation/TypeValidator src/main/java/org/openapijsonschematools/client/schemas/validation/UniqueItemsValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationMetadata.java +src/test/java/org/openapijsonschematools/client/components/schemas/AbstractStepMessageTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesClassTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesWithArrayOfEnumsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AddressTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnimalFarmTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnimalTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotStringTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AppleReqTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/AppleTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyTypeTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ArrayOfArrayOfNumberOnlyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ArrayOfEnumsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ArrayOfNumberOnlyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ArrayTestTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItemsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BananaReqTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BananaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BarTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BasquePigTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BooleanEnumTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/BooleanSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/CapitalizationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/CatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/CategoryTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ChildCatTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ClassModelTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ClientTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateralTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidationsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedArrayTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedBoolTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedNoneTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedNumberTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedObjectTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ComposedStringTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/CurrencyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DanishPigTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DateTimeTestTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidationsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DateWithValidationsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DecimalPayloadTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DogTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/DrawingTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumArraysTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumClassTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EnumTestTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangleTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/FileSchemaTestClassTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/FileTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/FooTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/FormatTestTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/FromSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/FruitReqTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/FruitTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/GmFruitTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/GrandparentAnimalTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/HasOnlyReadOnlyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/HealthCheckResultTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBigTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValueTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValueTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/IntegerMax10Test.java +src/test/java/org/openapijsonschematools/client/components/schemas/IntegerMin15Test.java +src/test/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangleTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ItemsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTestTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemoveTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MammalTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MapTestTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClassTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MoneyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/MyObjectDtoTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NameTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NoAdditionalPropertiesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NullableClassTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NullableShapeTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NullableStringTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NumberOnlyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NumberSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMaxTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/NumberWithValidationsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsBaseTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectInterfaceTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithArgAndArgsPropertiesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefPropsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddPropTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithCollidingPropertiesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithDecimalPropertiesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithDifficultlyNamedPropsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionPropertyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithInvalidNamedRefedPropertiesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithNonIntersectingValuesTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalPropsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithOptionalTestPropTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithValidationsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/OrderTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDtoTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ParentPetTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PetTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PigTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PlayerTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/PublicKeyTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterfaceTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/QuadrilateralTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ReadOnlyFirstTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/RefPetTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddPropsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddPropsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddPropsTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ReturnSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangleTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/Schema200ResponseTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModelTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/SelfReferencingObjectModelTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ShapeOrNullTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ShapeTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateralTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/SomeObjectTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/SpecialModelnameTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/StringBooleanMapTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/StringEnumTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValueTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/StringSchemaTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/StringWithValidationTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/TagTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/TriangleInterfaceTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/TriangleTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/UUIDStringTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/UserTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/WhaleTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ZebraTest.java src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java src/test/java/org/openapijsonschematools/client/schemas/AnyTypeSchemaTest.java src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java diff --git a/samples/client/petstore/java/docs/components/schemas/FormatTest.md b/samples/client/petstore/java/docs/components/schemas/FormatTest.md index a1f5a407a1d..d21b201116c 100644 --- a/samples/client/petstore/java/docs/components/schemas/FormatTest.md +++ b/samples/client/petstore/java/docs/components/schemas/FormatTest.md @@ -667,7 +667,7 @@ int validatedPayload = FormatTest.NumberSchema.validate( | Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| | Number |     maximum = 543.2
| | Number |     minimum = 32.1
| -| BigDecimal |     multipleOf = 32.5
| +| BigDecimal |     multipleOf = new BigDecimal("32.5")
| ### Method Summary | Modifier and Type | Method and Description | @@ -769,7 +769,7 @@ long validatedPayload = FormatTest.IntegerSchema.validate( | Set> |     type = Set.of(
        Integer.class,
        Long.class,
        Float.class,
        Double.class
    )
| | Number |     maximum = 100
| | Number |     minimum = 10
| -| BigDecimal |     multipleOf = 2
| +| BigDecimal |     multipleOf = new BigDecimal("2")
| ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java index 44f23de0bb1..25b958bc4c6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java @@ -35,7 +35,7 @@ protected Color() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java index 444abeecd06..a1fb8ce40d3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java @@ -34,7 +34,7 @@ protected Cultivar() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .pattern(Pattern.compile( "^[a-zA-Z\\s]*$" )) @@ -85,7 +85,7 @@ protected Origin() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .pattern(Pattern.compile( "^[A-Z\\s]*$", Pattern.CASE_INSENSITIVE @@ -179,7 +179,7 @@ protected Apple1() { .type(Set.of( Void.class, FrozenMap.class - ) + )) .properties(Map.ofEntries( new PropertyEntry("cultivar", Cultivar.class), new PropertyEntry("origin", Origin.class) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java index 9d074b29977..5c1f5eaa4d0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItems.java @@ -33,7 +33,7 @@ protected Items() { Long.class, Float.class, Double.class - ) + )) .format("int64") .maximum(7) ); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java index 77d06a678e8..b342ae04f17 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java @@ -34,7 +34,7 @@ protected Bar1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java index 6c43a0458c7..cf4e740101e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java @@ -32,7 +32,7 @@ protected ClassName() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "BasquePig" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java index ebe273d2fe4..387cb7eb5c0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Category.java @@ -35,7 +35,7 @@ protected Name() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java index 368c69cd411..8fefe737e36 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java @@ -40,7 +40,7 @@ protected QuadrilateralType() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "ComplexQuadrilateral" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java index 95b0ca13a07..7077a1c3a7a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java @@ -41,7 +41,7 @@ protected ComposedNumber1() { Long.class, Float.class, Double.class - ) + )) .allOf(List.of( Schema0.class )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java index a8eb0968dbc..347d2c92fdc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java @@ -197,7 +197,7 @@ protected Schema6() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("date-time") .pattern(Pattern.compile( "^2020.*" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java index e5b98f4f40a..bbda5775a85 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java @@ -38,7 +38,7 @@ protected ComposedString1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .allOf(List.of( Schema0.class )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java index ca763255fee..5444ee79bfc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Currency.java @@ -35,7 +35,7 @@ protected Currency1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "eur", "usd" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java index c82f6502b1f..f2685e9471a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DanishPig.java @@ -32,7 +32,7 @@ protected ClassName() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "DanishPig" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java index 6b565f46d38..fbb33620008 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeTest.java @@ -35,7 +35,7 @@ protected DateTimeTest1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("date-time") ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java index ae53f88bcc3..621ce3854c3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidations.java @@ -36,7 +36,7 @@ protected DateTimeWithValidations1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("date-time") .pattern(Pattern.compile( "^2020.*" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java index 8ca5ab3af7a..83793abb2a4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/DateWithValidations.java @@ -36,7 +36,7 @@ protected DateWithValidations1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("date") .pattern(Pattern.compile( "^2020.*" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java index 57e13c38c67..9fc9a6e6e75 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumArrays.java @@ -34,7 +34,7 @@ protected JustSymbol() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( ">=", "$" @@ -86,7 +86,7 @@ protected Items() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "fish", "crab" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java index 99286295f2d..760ba955974 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumClass.java @@ -35,7 +35,7 @@ protected EnumClass1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "_abc", "-efg", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java index 3765f0a2bba..42394fa658b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EnumTest.java @@ -33,7 +33,7 @@ protected EnumString() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "UPPER", "lower", @@ -86,7 +86,7 @@ protected EnumStringRequired() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "UPPER", "lower", @@ -142,7 +142,7 @@ protected EnumInteger() { Long.class, Float.class, Double.class - ) + )) .format("int32") .enumValues(SetMaker.makeSet( 1, @@ -206,7 +206,7 @@ protected EnumNumber() { Long.class, Float.class, Double.class - ) + )) .format("double") .enumValues(SetMaker.makeSet( 1.1, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java index 8734fc5b07f..2f0cee08c3b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java @@ -40,7 +40,7 @@ protected TriangleType() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "EquilateralTriangle" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java index 3928eaab32a..12339b15435 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -48,10 +49,10 @@ protected IntegerSchema() { Long.class, Float.class, Double.class - ) + )) .maximum(100) .minimum(10) - .multipleOf(2) + .multipleOf(new BigDecimal("2")) ); } @@ -121,7 +122,7 @@ protected Int32withValidations() { Long.class, Float.class, Double.class - ) + )) .format("int32") .maximum(200) .minimum(20) @@ -186,10 +187,10 @@ protected NumberSchema() { Long.class, Float.class, Double.class - ) + )) .maximum(543.2) .minimum(32.1) - .multipleOf(32.5) + .multipleOf(new BigDecimal("32.5")) ); } @@ -255,7 +256,7 @@ protected FloatSchema() { Long.class, Float.class, Double.class - ) + )) .format("float") .maximum(987.6) .minimum(54.3) @@ -315,7 +316,7 @@ protected DoubleSchema() { Long.class, Float.class, Double.class - ) + )) .format("double") .maximum(123.4) .minimum(67.8) @@ -459,7 +460,7 @@ protected StringSchema() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .pattern(Pattern.compile( "[a-z]", Pattern.CASE_INSENSITIVE @@ -531,7 +532,7 @@ protected Password() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("password") .maxLength(64) .minLength(10) @@ -582,7 +583,7 @@ protected PatternWithDigits() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .pattern(Pattern.compile( "^\\d{10}$" )) @@ -633,7 +634,7 @@ protected PatternWithDigitsAndDelimiter() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .pattern(Pattern.compile( "^image_\\d{1,3}$", Pattern.CASE_INSENSITIVE diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java index 0f9c2780c7f..444f3e92a70 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/HealthCheckResult.java @@ -34,7 +34,7 @@ protected NullableMessage() { .type(Set.of( Void.class, String.class - ) + )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java index 420a62b6eaa..a39e80a18b3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnum.java @@ -38,7 +38,7 @@ protected IntegerEnum1() { Long.class, Float.class, Double.class - ) + )) .enumValues(SetMaker.makeSet( 0, 1, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java index 047194706a7..cb21f7fc633 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBig.java @@ -38,7 +38,7 @@ protected IntegerEnumBig1() { Long.class, Float.class, Double.class - ) + )) .enumValues(SetMaker.makeSet( 10, 11, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java index 8e54ca75dc4..97928afc466 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValue.java @@ -38,7 +38,7 @@ protected IntegerEnumOneValue1() { Long.class, Float.class, Double.class - ) + )) .enumValues(SetMaker.makeSet( 0 )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java index 4bcee7ab8cd..8dda4cd09a3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValue.java @@ -38,7 +38,7 @@ protected IntegerEnumWithDefaultValue1() { Long.class, Float.class, Double.class - ) + )) .enumValues(SetMaker.makeSet( 0, 1, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java index ee7ad8cfba3..2a7af14212f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.java @@ -37,7 +37,7 @@ protected IntegerMax101() { Long.class, Float.class, Double.class - ) + )) .format("int64") .maximum(10) ); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java index 1bfc2b2061f..e9e720efce1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java @@ -37,7 +37,7 @@ protected IntegerMin151() { Long.class, Float.class, Double.class - ) + )) .format("int64") .minimum(15) ); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java index b64bbbf5381..f701c253860 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java @@ -40,7 +40,7 @@ protected TriangleType() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "IsoscelesTriangle" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java index 7d24180313c..f5a0c5e7bee 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java @@ -46,7 +46,7 @@ protected Op() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "add", "replace", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java index c5148a0bde9..e29b2fe1ef9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java @@ -46,7 +46,7 @@ protected Op() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "move", "copy" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java index db4c02b2a8a..7ee27f31f0f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java @@ -43,7 +43,7 @@ protected Op() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "remove" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java index 6a1360b464d..6ec54c12396 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java @@ -218,7 +218,7 @@ protected AdditionalProperties2() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "UPPER", "lower" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java index 3514339499f..d5e30f4977e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java @@ -41,7 +41,7 @@ protected AdditionalProperties3() { .type(Set.of( Void.class, FrozenMap.class - ) + )) ); } @@ -128,7 +128,7 @@ protected IntegerProp() { Long.class, Float.class, Double.class - ) + )) ); } @@ -219,7 +219,7 @@ protected NumberProp() { Long.class, Float.class, Double.class - ) + )) ); } @@ -306,7 +306,7 @@ protected BooleanProp() { .type(Set.of( Void.class, Boolean.class - ) + )) ); } @@ -379,7 +379,7 @@ protected StringProp() { .type(Set.of( Void.class, String.class - ) + )) ); } @@ -451,7 +451,7 @@ protected DateProp() { .type(Set.of( Void.class, String.class - ) + )) .format("date") ); } @@ -524,7 +524,7 @@ protected DatetimeProp() { .type(Set.of( Void.class, String.class - ) + )) .format("date-time") ); } @@ -614,7 +614,7 @@ protected ArrayNullableProp() { .type(Set.of( Void.class, FrozenList.class - ) + )) .items(Items.class) ); } @@ -709,7 +709,7 @@ protected Items1() { .type(Set.of( Void.class, FrozenMap.class - ) + )) ); } @@ -807,7 +807,7 @@ protected ArrayAndItemsNullableProp() { .type(Set.of( Void.class, FrozenList.class - ) + )) .items(Items1.class) ); } @@ -902,7 +902,7 @@ protected Items2() { .type(Set.of( Void.class, FrozenMap.class - ) + )) ); } @@ -1092,7 +1092,7 @@ protected ObjectNullableProp() { .type(Set.of( Void.class, FrozenMap.class - ) + )) .additionalProperties(AdditionalProperties.class) ); } @@ -1187,7 +1187,7 @@ protected AdditionalProperties1() { .type(Set.of( Void.class, FrozenMap.class - ) + )) ); } @@ -1291,7 +1291,7 @@ protected ObjectAndItemsNullableProp() { .type(Set.of( Void.class, FrozenMap.class - ) + )) .additionalProperties(AdditionalProperties1.class) ); } @@ -1386,7 +1386,7 @@ protected AdditionalProperties2() { .type(Set.of( Void.class, FrozenMap.class - ) + )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java index e132fb8a5ae..27391e94b51 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java @@ -38,7 +38,7 @@ protected NullableString1() { .type(Set.of( Void.class, String.class - ) + )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java index e3ea8f89daf..45f813d02e6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java @@ -37,7 +37,7 @@ protected NumberWithExclusiveMinMax1() { Long.class, Float.class, Double.class - ) + )) .exclusiveMaximum(12) .exclusiveMinimum(10) ); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java index ecfc1bb08cf..00509cc2d77 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java @@ -37,7 +37,7 @@ protected NumberWithValidations1() { Long.class, Float.class, Double.class - ) + )) .maximum(20) .minimum(10) ); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java index 0cb572b1999..f226e9bec65 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionProperty.java @@ -39,7 +39,7 @@ protected Schema0() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(1) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java index a2b04f76fae..3c8b2780eab 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Order.java @@ -48,7 +48,7 @@ protected Status() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "placed", "approved", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java index bce174d916f..e26c3d1adeb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Pet.java @@ -128,7 +128,7 @@ protected Status() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "available", "pending", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java index 493ce296f35..da06c394eec 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterface.java @@ -41,7 +41,7 @@ protected ShapeType() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "Quadrilateral" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java index 85877506e7d..94032fad5d9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java @@ -40,7 +40,7 @@ protected TriangleType() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "ScaleneTriangle" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java index 8dd07071a7d..0f0f2024162 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java @@ -40,7 +40,7 @@ protected QuadrilateralType() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "SimpleQuadrilateral" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java index 438e864bfe1..ae6d810674a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java @@ -39,7 +39,7 @@ protected StringEnum1() { .type(Set.of( Void.class, String.class - ) + )) .enumValues(SetMaker.makeSet( "placed", "approved", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java index 54611f1d54e..07d44e8aafc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java @@ -35,7 +35,7 @@ protected StringEnumWithDefaultValue1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "placed", "approved", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java index 457a0e09a88..3b38f3cbf20 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java @@ -34,7 +34,7 @@ protected StringWithValidation1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(7) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java index fad42190bc1..11245c22e21 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/TriangleInterface.java @@ -41,7 +41,7 @@ protected ShapeType() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "Triangle" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java index 2057cad6362..20bee07d25c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/UUIDString.java @@ -35,7 +35,7 @@ protected UUIDString1() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("uuid") .minLength(1) ); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java index e9414770b94..cc92559980f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java @@ -73,7 +73,7 @@ protected ObjectWithNoDeclaredPropsNullable() { .type(Set.of( Void.class, FrozenMap.class - ) + )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java index 965d093bc28..f5b123d55b6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Whale.java @@ -39,7 +39,7 @@ protected ClassName() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "whale" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java index 656b8c9b356..f9e263e0977 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Zebra.java @@ -37,7 +37,7 @@ protected Type() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "plains", "mountain", @@ -90,7 +90,7 @@ protected ClassName() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "zebra" )) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java index ac6ab7b8ae3..982617a5c74 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/parameters/parameter1/Schema1.java @@ -29,7 +29,7 @@ protected Schema11() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "c", "d" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java index 5c3c4efe2c7..afe9ade19bf 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/parameters/parameter0/PathParamSchema0.java @@ -29,7 +29,7 @@ protected PathParamSchema01() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "a", "b" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java index ad1aff9a13f..02a3e6ef948 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter1/Schema1.java @@ -29,7 +29,7 @@ protected Schema11() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "true", "false" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java index 9b1155340d4..48c9d6b08a5 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/parameters/parameter4/Schema4.java @@ -29,7 +29,7 @@ protected Schema41() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "true", "false" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java index 7f95e9bc88e..cedfb6d5cb8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter0/Schema0.java @@ -31,7 +31,7 @@ protected Items0() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( ">", "$" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java index 11b7e6efbf8..3423b977191 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter1/Schema1.java @@ -29,7 +29,7 @@ protected Schema11() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "_abc", "-efg", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java index 704d220ff8e..000da1a2ed6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter2/Schema2.java @@ -31,7 +31,7 @@ protected Items2() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( ">", "$" diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java index 61ded728002..579c9c131ca 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter3/Schema3.java @@ -29,7 +29,7 @@ protected Schema31() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "_abc", "-efg", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java index 726d4469cb1..6edbe86c472 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter4/Schema4.java @@ -32,7 +32,7 @@ protected Schema41() { Long.class, Float.class, Double.class - ) + )) .format("int32") .enumValues(SetMaker.makeSet( 1, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java index a2525771858..506ce419cb0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/parameters/parameter5/Schema5.java @@ -32,7 +32,7 @@ protected Schema51() { Long.class, Float.class, Double.class - ) + )) .format("double") .enumValues(SetMaker.makeSet( 1.1, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java index b747ecd0108..01387341605 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/requestbody/content/applicationxwwwformurlencoded/Schema.java @@ -34,7 +34,7 @@ protected Items() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( ">", "$" @@ -169,7 +169,7 @@ protected EnumFormString() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "_abc", "-efg", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java index a0e1fa97fee..6132aef0de7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/Schema.java @@ -40,7 +40,7 @@ protected IntegerSchema() { Long.class, Float.class, Double.class - ) + )) .maximum(100) .minimum(10) ); @@ -109,7 +109,7 @@ protected Int32() { Long.class, Float.class, Double.class - ) + )) .format("int32") .maximum(200) .minimum(20) @@ -174,7 +174,7 @@ protected NumberSchema() { Long.class, Float.class, Double.class - ) + )) .maximum(543.2) .minimum(32.1) ); @@ -242,7 +242,7 @@ protected FloatSchema() { Long.class, Float.class, Double.class - ) + )) .format("float") .maximum(987.6) ); @@ -298,7 +298,7 @@ protected DoubleSchema() { Long.class, Float.class, Double.class - ) + )) .format("double") .maximum(123.4) .minimum(67.8) @@ -352,7 +352,7 @@ protected StringSchema() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .pattern(Pattern.compile( "[a-z]", Pattern.CASE_INSENSITIVE @@ -404,7 +404,7 @@ protected PatternWithoutDelimiter() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .pattern(Pattern.compile( "^[A-Z].*" )) @@ -466,7 +466,7 @@ protected DateTime() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("date-time") ); } @@ -515,7 +515,7 @@ protected Password() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .format("password") .maxLength(64) .minLength(10) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java index 0366d19ae20..4ec78519dca 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter0/Schema0.java @@ -38,7 +38,7 @@ protected Schema00() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(1) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java index f5518c254f3..d85e4d3330a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/parameters/parameter1/Schema1.java @@ -39,7 +39,7 @@ protected Schema01() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(1) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java index 69ea1b32f83..4e94ef4eefd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/applicationjson/Schema.java @@ -38,7 +38,7 @@ protected Schema0() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(1) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java index e32df90aae5..e452bc2bea2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/requestbody/content/multipartformdata/Schema.java @@ -39,7 +39,7 @@ protected Schema0() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(1) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java index 5d9bd0a24bc..ad4f220d288 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/applicationjson/Schema.java @@ -38,7 +38,7 @@ protected Schema0() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(1) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java index 6f60dfb6ea8..2fd7abbd19f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/responses/response200/content/multipartformdata/Schema.java @@ -39,7 +39,7 @@ protected Schema0() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .minLength(1) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java index 2f3ce490fe2..9aa79e59040 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/parameters/parameter0/Schema0.java @@ -31,7 +31,7 @@ protected Items0() { super(new JsonSchemaInfo() .type(Set.of( String.class - ) + )) .enumValues(SetMaker.makeSet( "available", "pending", diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java index a7bada5e6c9..74bd11d13b0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/parameters/parameter0/Schema0.java @@ -31,7 +31,7 @@ protected Schema01() { Long.class, Float.class, Double.class - ) + )) .format("int64") .maximum(5) .minimum(1) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java index d4b08683c94..7fdabe3b725 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java @@ -7,6 +7,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -31,7 +32,7 @@ public class AnyTypeJsonSchema extends JsonSchema implements SchemaNullValidator private static AnyTypeJsonSchema instance; protected AnyTypeJsonSchema() { - super(null); + super(new JsonSchemaInfo()); } public static AnyTypeJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java index ed45f884b9b..5c072caddcc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaBooleanValidator; @@ -23,9 +24,9 @@ public class BooleanJsonSchema extends JsonSchema implements SchemaBooleanValida private static BooleanJsonSchema instance; protected BooleanJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Boolean.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + ); } public static BooleanJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java index e26ac786940..6fba2c33485 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -25,10 +26,10 @@ public class DateJsonSchema extends JsonSchema implements SchemaStringValidator private static DateJsonSchema instance; protected DateJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("date")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date") + ); } public static DateJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java index 48cb11ae1d6..cad1e3696e4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -25,10 +26,10 @@ public class DateTimeJsonSchema extends JsonSchema implements SchemaStringValida private static DateTimeJsonSchema instance; protected DateTimeJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("date-time")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date-time") + ); } public static DateTimeJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java index 024dc806a9a..0df517cb39e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -24,10 +25,10 @@ public class DecimalJsonSchema extends JsonSchema implements SchemaStringValidat private static DecimalJsonSchema instance; protected DecimalJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("number")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("number") + ); } public static DecimalJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java index c783717d2ee..6dc59c4ef16 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; @@ -24,10 +25,10 @@ public class DoubleJsonSchema extends JsonSchema implements SchemaNumberValidato private static DoubleJsonSchema instance; protected DoubleJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Double.class))), - new KeywordEntry("format", new FormatValidator("double")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Double.class)) + .format("double") + ); } public static DoubleJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java index ab1b54e9b8d..7748038cb7a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNumberValidator; @@ -24,10 +25,10 @@ public class FloatJsonSchema extends JsonSchema implements SchemaNumberValidator private static FloatJsonSchema instance; protected FloatJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Float.class))), - new KeywordEntry("format", new FormatValidator("float")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Float.class)) + .format("float") + ); } public static FloatJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java index 96be726202c..c8aa532ce78 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,13 +25,13 @@ public class Int32JsonSchema extends JsonSchema implements SchemaNumberValidator private static Int32JsonSchema instance; protected Int32JsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Float.class - ))), - new KeywordEntry("format", new FormatValidator("int32")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Float.class + )) + .format("int32") + ); } public static Int32JsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java index 2c14e4bb9b2..963c5ad0bed 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,15 +25,15 @@ public class Int64JsonSchema extends JsonSchema implements SchemaNumberValidator private static Int64JsonSchema instance; protected Int64JsonSchema() { - super(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")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int64") + ); } public static Int64JsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java index ec55400d01b..98e3d648d5a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FormatValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,15 +25,15 @@ public class IntJsonSchema extends JsonSchema implements SchemaNumberValidator { private static IntJsonSchema instance; protected IntJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - ))), - new KeywordEntry("format", new FormatValidator("int")) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int") + ); } public static IntJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java index 90a27ce262a..2d6c4c6bfc5 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,9 +25,9 @@ public class ListJsonSchema extends JsonSchema implements SchemaListValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + ); } public static ListJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java index dd5730ad849..4406d66c12d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -24,9 +25,9 @@ public class MapJsonSchema extends JsonSchema implements SchemaMapValidator(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + ); } public static MapJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java index 5ba8a9e0939..57b8adcc354 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java @@ -7,6 +7,7 @@ import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.NotValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -31,9 +32,9 @@ public class NotAnyTypeJsonSchema extends JsonSchema implements SchemaNullValida private static NotAnyTypeJsonSchema instance; protected NotAnyTypeJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("not", new NotValidator(AnyTypeJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .not(AnyTypeJsonSchema.class) + ); } public static NotAnyTypeJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java index 2ed58d45ce9..4445d6ac8b7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java @@ -5,6 +5,7 @@ import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaNullValidator; @@ -23,9 +24,9 @@ public class NullJsonSchema extends JsonSchema implements SchemaNullValidator { private static NullJsonSchema instance; protected NullJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(Void.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(Void.class)) + ); } public static NullJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java index eed4f82f321..885adc6b92f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java @@ -3,6 +3,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -23,14 +24,14 @@ public class NumberJsonSchema extends JsonSchema implements SchemaNumberValidato private static NumberJsonSchema instance; protected NumberJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + ); } public static NumberJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java index 6f200a19485..6b7dbe2e7b2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java @@ -4,6 +4,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaStringValidator; @@ -26,9 +27,9 @@ public class StringJsonSchema extends JsonSchema implements SchemaStringValidato private static StringJsonSchema instance; protected StringJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); } public static StringJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java index 08094fc2a24..cc73e76b345 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java @@ -3,6 +3,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.exceptions.InvalidTypeException; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; @@ -25,10 +26,10 @@ public class UuidJsonSchema extends JsonSchema implements SchemaStringValidator private static UuidJsonSchema instance; protected UuidJsonSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))), - new KeywordEntry("format", new FormatValidator("uuid")) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("uuid") + ); } public static UuidJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java index 6133b7b3298..0d069ea2f99 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java @@ -123,7 +123,7 @@ public JsonSchemaInfo enumValues(Set enumValues) { return this; } public Pattern pattern; - public JsonSchemaInfo enumValues(Pattern pattern) { + public JsonSchemaInfo pattern(Pattern pattern) { this.pattern = pattern; return this; } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java index ae874e72ff4..cde604e8581 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java @@ -7,8 +7,8 @@ public class MultipleOfValidator implements KeywordValidator { public final BigDecimal multipleOf; - public MultipleOfValidator(Number multipleOf) { - this.multipleOf = getBigDecimal(multipleOf); + public MultipleOfValidator(BigDecimal multipleOf) { + this.multipleOf = multipleOf; } @Override diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java index 65e4b3eb833..8f5e4adc0bd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java @@ -17,7 +17,7 @@ public class UnsetAnyTypeJsonSchema extends JsonSchema implements SchemaNullVali private static UnsetAnyTypeJsonSchema instance; protected UnsetAnyTypeJsonSchema() { - super(null); + super(new JsonSchemaInfo()); } public static UnsetAnyTypeJsonSchema getInstance() { diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java index ae0d9705599..98be1a42413 100644 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java @@ -5,22 +5,18 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; -import org.openapijsonschematools.client.schemas.validation.ItemsValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.SchemaListValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; import java.util.ArrayList; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; @@ -28,17 +24,17 @@ public class ArrayTypeSchemaTest { static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone()); static final ValidationMetadata validationMetadata = new ValidationMetadata( List.of("args[0"), - configuration, - new PathToSchemasMap(), + configuration, + new PathToSchemasMap(), new LinkedHashSet<>() ); public static class ArrayWithItemsSchema extends JsonSchema implements SchemaListValidator> { public ArrayWithItemsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(StringJsonSchema.class) + ); } @Override @@ -94,10 +90,10 @@ public static ArrayWithOutputClsSchemaList of(List arg, SchemaConfigurat public static class ArrayWithOutputClsSchema extends JsonSchema implements SchemaListValidator { public ArrayWithOutputClsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenList.class))), - new KeywordEntry("items", new ItemsValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenList.class)) + .items(StringJsonSchema.class) + ); } diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java index c5513efe95a..178ee83c689 100644 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java @@ -5,15 +5,12 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidTypeException; -import org.openapijsonschematools.client.schemas.validation.AdditionalPropertiesValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.KeywordEntry; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertiesValidator; import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.SchemaMapValidator; -import org.openapijsonschematools.client.schemas.validation.TypeValidator; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; @@ -39,12 +36,12 @@ public class ObjectTypeSchemaTest { public static class ObjectWithPropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithPropsSchema instance; private ObjectWithPropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } @@ -89,10 +86,10 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class ObjectWithAddpropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithAddpropsSchema instance; private ObjectWithAddpropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(StringJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .additionalProperties(StringJsonSchema.class) + ); } public static ObjectWithAddpropsSchema getInstance() { @@ -146,13 +143,13 @@ public Object getNewInstance(Object arg, List pathToItem, PathToSchemasM public static class ObjectWithPropsAndAddpropsSchema extends JsonSchema implements SchemaMapValidator> { private static ObjectWithPropsAndAddpropsSchema instance; private ObjectWithPropsAndAddpropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))), - new KeywordEntry("additionalProperties", new AdditionalPropertiesValidator(BooleanJsonSchema.class)) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + .additionalProperties(BooleanJsonSchema.class) + ); } public static ObjectWithPropsAndAddpropsSchema getInstance() { @@ -207,12 +204,12 @@ public static ObjectWithOutputTypeSchemaMap of(Map arg, SchemaCo public static class ObjectWithOutputTypeSchema extends JsonSchema implements SchemaMapValidator { private static ObjectWithOutputTypeSchema instance; public ObjectWithOutputTypeSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } public static ObjectWithOutputTypeSchema getInstance() { diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java index 2145de63899..01f2d0fcd18 100644 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java @@ -21,12 +21,12 @@ public class AdditionalPropertiesValidatorTest { public static class ObjectWithPropsSchema extends JsonSchema { private static ObjectWithPropsSchema instance; private ObjectWithPropsSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(FrozenMap.class))), - new KeywordEntry("properties", new PropertiesValidator(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.class) - ))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.class) + )) + ); } @@ -41,7 +41,7 @@ public static ObjectWithPropsSchema getInstance() { public Object getNewInstance(Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { if (arg instanceof FrozenMap) { @SuppressWarnings("unchecked") FrozenMap castArg = (FrozenMap) arg; - return arg; + return castArg; } throw new InvalidTypeException("Invalid input type="+arg.getClass()+". It can't be instantiated by this schema"); } diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java index eea333e56ae..73b11d7c6a2 100644 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java @@ -16,9 +16,9 @@ class SomeSchema extends JsonSchema { private static SomeSchema instance; protected SomeSchema() { - super(new LinkedHashMap<>(Map.ofEntries( - new KeywordEntry("type", new TypeValidator(Set.of(String.class))) - ))); + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); } public static SomeSchema getInstance() { From f468f1e4048e5099f5b148e8ddf78ef66c973af3 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 15 Dec 2023 11:28:00 -0800 Subject: [PATCH 12/12] Samples regen, keywordToValidator made private --- .../java/.openapi-generator/FILES | 87 ----------- .../AdditionalPropertiesValidator.java | 7 +- .../client/schemas/validation/JsonSchema.java | 2 +- .../petstore/java/.openapi-generator/FILES | 139 ------------------ .../AdditionalPropertiesValidator.java | 7 +- .../client/schemas/validation/JsonSchema.java | 2 +- .../AdditionalPropertiesValidator.hbs | 7 +- .../schemas/validation/JsonSchema.hbs | 2 +- 8 files changed, 9 insertions(+), 244 deletions(-) diff --git a/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES b/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES index eafdbc0572f..f9577b3c188 100644 --- a/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES +++ b/samples/client/3_0_3_unit_test/java/.openapi-generator/FILES @@ -244,93 +244,6 @@ src/main/java/org/openapijsonschematools/client/schemas/validation/TypeValidator src/main/java/org/openapijsonschematools/client/schemas/validation/UniqueItemsValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationMetadata.java -src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidateTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItselfTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicatorsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneofTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemasTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnyofTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArraysTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTypeMatchesBooleansTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ByIntTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ByNumberTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BySmallNumberTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DateTimeFormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EmailFormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalseTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrueTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharactersTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0Test.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1Test.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumsInPropertiesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ForbiddenPropertyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/HostnameFormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/IntegerTypeMatchesIntegersTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/InvalidStringValueForDefaultTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/Ipv4FormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/Ipv6FormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MaximumValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedIntegerTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MinimumValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedIntegerTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MinitemsValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MinlengthValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemanticsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NestedItemsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemanticsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NotTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStringsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NumberTypeMatchesNumbersTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectTypeMatchesObjectsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/OneofTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/OneofWithRequiredTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchoredTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PatternValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharactersTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefInAdditionalpropertiesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefInAllofTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefInAnyofTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefInItemsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefInNotTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefInOneofTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefInPropertyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RequiredValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArrayTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharactersTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/StringTypeMatchesStringsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/UriFormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormatTest.java src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java src/test/java/org/openapijsonschematools/client/schemas/AnyTypeSchemaTest.java src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java index c869340d09f..5eaea40b69e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java @@ -26,11 +26,8 @@ public PathToSchemasMap validate(JsonSchema schema, Object arg, ValidationMetada } Map castArg = (Map) arg; Set presentAdditionalProperties = new LinkedHashSet<>(castArg.keySet()); - if (schema.keywordToValidator != null) { - KeywordValidator propertiesValidator = schema.keywordToValidator.get("properties"); - if (propertiesValidator instanceof PropertiesValidator) { - presentAdditionalProperties.removeAll(((PropertiesValidator) propertiesValidator).properties.keySet()); - } + if (schema.properties != null) { + presentAdditionalProperties.removeAll(schema.properties.keySet()); } PathToSchemasMap pathToSchemas = new PathToSchemasMap(); // todo add handling for validatedPatternProperties diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java index 187d28b6d01..a5cfa192d62 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java @@ -40,7 +40,7 @@ public abstract class JsonSchema { public final Boolean uniqueItems; public final Set enumValues; public final Pattern pattern; - public final LinkedHashMap keywordToValidator; + private final LinkedHashMap keywordToValidator; protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { LinkedHashMap keywordToValidator = new LinkedHashMap<>(); diff --git a/samples/client/petstore/java/.openapi-generator/FILES b/samples/client/petstore/java/.openapi-generator/FILES index 9443f16fdca..8af22dcbc3c 100644 --- a/samples/client/petstore/java/.openapi-generator/FILES +++ b/samples/client/petstore/java/.openapi-generator/FILES @@ -710,145 +710,6 @@ src/main/java/org/openapijsonschematools/client/schemas/validation/TypeValidator src/main/java/org/openapijsonschematools/client/schemas/validation/UniqueItemsValidator.java src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationMetadata.java -src/test/java/org/openapijsonschematools/client/components/schemas/AbstractStepMessageTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesClassTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesWithArrayOfEnumsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AddressTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnimalFarmTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnimalTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotStringTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AppleReqTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/AppleTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyTypeTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ArrayOfArrayOfNumberOnlyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ArrayOfEnumsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ArrayOfNumberOnlyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ArrayTestTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ArrayWithValidationsInItemsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BananaReqTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BananaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BarTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BasquePigTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BooleanEnumTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/BooleanSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/CapitalizationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/CatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/CategoryTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ChildCatTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ClassModelTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ClientTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateralTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidationsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedArrayTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedBoolTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedNoneTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedNumberTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedObjectTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ComposedStringTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/CurrencyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DanishPigTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DateTimeTestTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DateTimeWithValidationsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DateWithValidationsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DecimalPayloadTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DogTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/DrawingTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumArraysTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumClassTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EnumTestTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangleTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/FileSchemaTestClassTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/FileTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/FooTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/FormatTestTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/FromSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/FruitReqTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/FruitTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/GmFruitTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/GrandparentAnimalTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/HasOnlyReadOnlyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/HealthCheckResultTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumBigTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumOneValueTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/IntegerEnumWithDefaultValueTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/IntegerMax10Test.java -src/test/java/org/openapijsonschematools/client/components/schemas/IntegerMin15Test.java -src/test/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangleTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ItemsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTestTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemoveTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MammalTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MapTestTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClassTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MoneyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/MyObjectDtoTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NameTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NoAdditionalPropertiesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NullableClassTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NullableShapeTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NullableStringTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NumberOnlyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NumberSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMaxTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/NumberWithValidationsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsBaseTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredPropsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectInterfaceTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithArgAndArgsPropertiesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefPropsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddPropTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithCollidingPropertiesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithDecimalPropertiesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithDifficultlyNamedPropsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithInlineCompositionPropertyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithInvalidNamedRefedPropertiesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithNonIntersectingValuesTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalPropsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithOptionalTestPropTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ObjectWithValidationsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/OrderTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDtoTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ParentPetTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PetTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PigTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PlayerTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/PublicKeyTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/QuadrilateralInterfaceTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/QuadrilateralTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ReadOnlyFirstTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/RefPetTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddPropsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddPropsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddPropsTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ReturnSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangleTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/Schema200ResponseTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModelTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/SelfReferencingObjectModelTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ShapeOrNullTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ShapeTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateralTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/SomeObjectTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/SpecialModelnameTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/StringBooleanMapTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/StringEnumTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValueTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/StringSchemaTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/StringWithValidationTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/TagTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/TriangleInterfaceTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/TriangleTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/UUIDStringTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/UserTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/WhaleTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ZebraTest.java src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java src/test/java/org/openapijsonschematools/client/schemas/AnyTypeSchemaTest.java src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java index c869340d09f..5eaea40b69e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java @@ -26,11 +26,8 @@ public PathToSchemasMap validate(JsonSchema schema, Object arg, ValidationMetada } Map castArg = (Map) arg; Set presentAdditionalProperties = new LinkedHashSet<>(castArg.keySet()); - if (schema.keywordToValidator != null) { - KeywordValidator propertiesValidator = schema.keywordToValidator.get("properties"); - if (propertiesValidator instanceof PropertiesValidator) { - presentAdditionalProperties.removeAll(((PropertiesValidator) propertiesValidator).properties.keySet()); - } + if (schema.properties != null) { + presentAdditionalProperties.removeAll(schema.properties.keySet()); } PathToSchemasMap pathToSchemas = new PathToSchemasMap(); // todo add handling for validatedPatternProperties diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java index 187d28b6d01..a5cfa192d62 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java @@ -40,7 +40,7 @@ public abstract class JsonSchema { public final Boolean uniqueItems; public final Set enumValues; public final Pattern pattern; - public final LinkedHashMap keywordToValidator; + private final LinkedHashMap keywordToValidator; protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { LinkedHashMap keywordToValidator = new LinkedHashMap<>(); diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/AdditionalPropertiesValidator.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/AdditionalPropertiesValidator.hbs index 4b6227410b5..683c58a2883 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/validation/AdditionalPropertiesValidator.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/AdditionalPropertiesValidator.hbs @@ -26,11 +26,8 @@ public class AdditionalPropertiesValidator implements KeywordValidator { } Map castArg = (Map) arg; Set presentAdditionalProperties = new LinkedHashSet<>(castArg.keySet()); - if (schema.keywordToValidator != null) { - KeywordValidator propertiesValidator = schema.keywordToValidator.get("properties"); - if (propertiesValidator instanceof PropertiesValidator) { - presentAdditionalProperties.removeAll(((PropertiesValidator) propertiesValidator).properties.keySet()); - } + if (schema.properties != null) { + presentAdditionalProperties.removeAll(schema.properties.keySet()); } PathToSchemasMap pathToSchemas = new PathToSchemasMap(); // todo add handling for validatedPatternProperties diff --git a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs index b02da82b477..3a1a9e5c2f2 100644 --- a/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs +++ b/src/main/resources/java/src/main/java/packagename/schemas/validation/JsonSchema.hbs @@ -40,7 +40,7 @@ public abstract class JsonSchema { public final Boolean uniqueItems; public final Set enumValues; public final Pattern pattern; - public final LinkedHashMap keywordToValidator; + private final LinkedHashMap keywordToValidator; protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { LinkedHashMap keywordToValidator = new LinkedHashMap<>();