-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JsonSchema still breaking checker framework
- Loading branch information
Showing
117 changed files
with
7,956 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
samples/client/3_0_3_unit_test/java_simplified/.openapi-generator-ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
264 changes: 264 additions & 0 deletions
264
samples/client/3_0_3_unit_test/java_simplified/.openapi-generator/FILES
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
samples/client/3_0_3_unit_test/java_simplified/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
unset |
245 changes: 245 additions & 0 deletions
245
samples/client/3_0_3_unit_test/java_simplified/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
121 changes: 121 additions & 0 deletions
121
...docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# AdditionalpropertiesAllowsASchemaWhichShouldValidate | ||
org.openapijsonschematools.client.components.schemas.AdditionalpropertiesAllowsASchemaWhichShouldValidate.java | ||
public class AdditionalpropertiesAllowsASchemaWhichShouldValidate | ||
|
||
A class that contains necessary nested | ||
- schema classes (which validate payloads), extends JsonSchema | ||
- classes to store validated list payloads, extends FrozenList | ||
- classes to store validated map payloads, extends FrozenMap | ||
- classes to build inputs for list payloads | ||
- classes to build inputs for map payloads | ||
|
||
## Nested Class Summary | ||
| Modifier and Type | Class and Description | | ||
| ----------------- | ---------------------- | | ||
| static class | [AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsASchemaWhichShouldValidate1](#additionalpropertiesallowsaschemawhichshouldvalidate1)<br> schema class | | ||
| static class | [AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsASchemaWhichShouldValidateMapInput](#additionalpropertiesallowsaschemawhichshouldvalidatemapinput)<br> builder for Map payloads | | ||
| static class | [AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsASchemaWhichShouldValidateMap](#additionalpropertiesallowsaschemawhichshouldvalidatemap)<br> output class for Map payloads | | ||
| static class | [AdditionalpropertiesAllowsASchemaWhichShouldValidate.Bar](#bar)<br> schema class | | ||
| static class | [AdditionalpropertiesAllowsASchemaWhichShouldValidate.Foo](#foo)<br> schema class | | ||
| static class | [AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalProperties](#additionalproperties)<br> schema class | | ||
|
||
## AdditionalpropertiesAllowsASchemaWhichShouldValidate1 | ||
public static class AdditionalpropertiesAllowsASchemaWhichShouldValidate1<br> | ||
extends JsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
### Code Sample | ||
``` | ||
import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; | ||
import org.openapijsonschematools.client.configurations.SchemaConfiguration; | ||
import org.openapijsonschematools.client.exceptions.ValidationException; | ||
import org.openapijsonschematools.client.schemas.MapMaker; | ||
import org.openapijsonschematools.client.schemas.validation.FrozenList; | ||
import org.openapijsonschematools.client.schemas.validation.FrozenMap; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.AbstractMap; | ||
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone()); | ||
// Map validation | ||
AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsASchemaWhichShouldValidateMap validatedPayload = | ||
AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsASchemaWhichShouldValidate1.validate( | ||
MapMaker.makeMap( | ||
), | ||
configuration | ||
); | ||
``` | ||
|
||
### Field Summary | ||
| Modifier and Type | Field and Description | | ||
| ----------------- | ---------------------- | | ||
| Set<Class<?>> | type = Set.of(Map.class)<br/> | | ||
| Map<String, Class<? extends JsonSchema>> | properties = Map.ofEntries(<br> new PropertyEntry("foo", [Foo.class](#foo))),<br> new PropertyEntry("bar", [Bar.class](#bar)))<br> )<br> | | ||
| Class<? extends JsonSchema> | additionalProperties = [AdditionalProperties.class](#additionalproperties)<br> | | ||
|
||
### Method Summary | ||
| Modifier and Type | Method and Description | | ||
| ----------------- | ---------------------- | | ||
| static [AdditionalpropertiesAllowsASchemaWhichShouldValidateMap](#additionalpropertiesallowsaschemawhichshouldvalidatemap) | validate([Map<String, Object>](#additionalpropertiesallowsaschemawhichshouldvalidatemapinput) arg, SchemaConfiguration configuration) | | ||
|
||
## AdditionalpropertiesAllowsASchemaWhichShouldValidateMapInput | ||
public class AdditionalpropertiesAllowsASchemaWhichShouldValidateMapInput<br> | ||
builder for `Map<String, Object>` | ||
|
||
A class that builds the Map input type | ||
|
||
## Input Map Keys | ||
| Key | Type | Description | Notes | | ||
| --- | ---- | ------------ | ----- | | ||
| **foo** | Object | | [optional] | | ||
| **bar** | Object | | [optional] | | ||
| **anyStringName** | boolean | any string name can be used but the value must be the correct type | [optional] | | ||
|
||
## AdditionalpropertiesAllowsASchemaWhichShouldValidateMap | ||
public static class AdditionalpropertiesAllowsASchemaWhichShouldValidateMap<br> | ||
extends FrozenMap<String, Object> | ||
|
||
A class to store validated Map payloads | ||
|
||
### Method Summary | ||
| Modifier and Type | Method and Description | | ||
| ----------------- | ---------------------- | | ||
| static [AdditionalpropertiesAllowsASchemaWhichShouldValidateMap](#additionalpropertiesallowsaschemawhichshouldvalidatemap) | of([Map<String, Object>](#additionalpropertiesallowsaschemawhichshouldvalidatemapinput) arg, SchemaConfiguration configuration) | | ||
| Object | foo()<br>[optional] | | ||
| Object | bar()<br>[optional] | | ||
| boolean | getAdditionalProperty(String name)<br>provides type safety for additional properties | | ||
|
||
## Bar | ||
public static class Bar<br> | ||
extends AnyTypeJsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema | | ||
| ------------------------------------------------------------------ | | ||
| validate | | ||
|
||
## Foo | ||
public static class Foo<br> | ||
extends AnyTypeJsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema | | ||
| ------------------------------------------------------------------ | | ||
| validate | | ||
|
||
## AdditionalProperties | ||
public static class AdditionalProperties<br> | ||
extends BooleanJsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema | | ||
| ------------------------------------------------------------------ | | ||
| validate | | ||
|
||
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) |
92 changes: 92 additions & 0 deletions
92
...a_simplified/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# AdditionalpropertiesAreAllowedByDefault | ||
org.openapijsonschematools.client.components.schemas.AdditionalpropertiesAreAllowedByDefault.java | ||
public class AdditionalpropertiesAreAllowedByDefault | ||
|
||
A class that contains necessary nested | ||
- schema classes (which validate payloads), extends JsonSchema | ||
- classes to store validated list payloads, extends FrozenList | ||
- classes to store validated map payloads, extends FrozenMap | ||
- classes to build inputs for list payloads | ||
- classes to build inputs for map payloads | ||
|
||
## Nested Class Summary | ||
| Modifier and Type | Class and Description | | ||
| ----------------- | ---------------------- | | ||
| static class | [AdditionalpropertiesAreAllowedByDefault.AdditionalpropertiesAreAllowedByDefault1](#additionalpropertiesareallowedbydefault1)<br> schema class | | ||
| static class | [AdditionalpropertiesAreAllowedByDefault.AdditionalpropertiesAreAllowedByDefaultMapInput](#additionalpropertiesareallowedbydefaultmapinput)<br> builder for Map payloads | | ||
| static class | [AdditionalpropertiesAreAllowedByDefault.AdditionalpropertiesAreAllowedByDefaultMap](#additionalpropertiesareallowedbydefaultmap)<br> output class for Map payloads | | ||
| static class | [AdditionalpropertiesAreAllowedByDefault.Bar](#bar)<br> schema class | | ||
| static class | [AdditionalpropertiesAreAllowedByDefault.Foo](#foo)<br> schema class | | ||
|
||
## AdditionalpropertiesAreAllowedByDefault1 | ||
public static class AdditionalpropertiesAreAllowedByDefault1<br> | ||
extends JsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
### Field Summary | ||
| Modifier and Type | Field and Description | | ||
| ----------------- | ---------------------- | | ||
| Map<String, Class<? extends JsonSchema>> | properties = Map.ofEntries(<br> new PropertyEntry("foo", [Foo.class](#foo))),<br> new PropertyEntry("bar", [Bar.class](#bar)))<br> )<br> | | ||
|
||
### Method Summary | ||
| Modifier and Type | Method and Description | | ||
| ----------------- | ---------------------- | | ||
| static String | validate(String arg, SchemaConfiguration configuration) | | ||
| static Void | validate(Void arg, SchemaConfiguration configuration) | | ||
| static int | validate(int arg, SchemaConfiguration configuration) | | ||
| static long | validate(long arg, SchemaConfiguration configuration) | | ||
| static float | validate(float arg, SchemaConfiguration configuration) | | ||
| static double | validate(double arg, SchemaConfiguration configuration) | | ||
| static boolean | validate(boolean arg, SchemaConfiguration configuration) | | ||
| static [AdditionalpropertiesAreAllowedByDefaultMap](#additionalpropertiesareallowedbydefaultmap) | validate([Map<String, Object>](#additionalpropertiesareallowedbydefaultmapinput) arg, SchemaConfiguration configuration) | | ||
| FrozenList<Object> | validate(List<Object> arg, SchemaConfiguration configuration) | | ||
|
||
## AdditionalpropertiesAreAllowedByDefaultMapInput | ||
public class AdditionalpropertiesAreAllowedByDefaultMapInput<br> | ||
builder for `Map<String, Object>` | ||
|
||
A class that builds the Map input type | ||
|
||
## Input Map Keys | ||
| Key | Type | Description | Notes | | ||
| --- | ---- | ------------ | ----- | | ||
| **foo** | Object | | [optional] | | ||
| **bar** | Object | | [optional] | | ||
| **anyStringName** | Object | any string name can be used but the value must be the correct type | [optional] | | ||
|
||
## AdditionalpropertiesAreAllowedByDefaultMap | ||
public static class AdditionalpropertiesAreAllowedByDefaultMap<br> | ||
extends FrozenMap<String, Object> | ||
|
||
A class to store validated Map payloads | ||
|
||
### Method Summary | ||
| Modifier and Type | Method and Description | | ||
| ----------------- | ---------------------- | | ||
| static [AdditionalpropertiesAreAllowedByDefaultMap](#additionalpropertiesareallowedbydefaultmap) | of([Map<String, Object>](#additionalpropertiesareallowedbydefaultmapinput) arg, SchemaConfiguration configuration) | | ||
| Object | foo()<br>[optional] | | ||
| Object | bar()<br>[optional] | | ||
| Object | getAdditionalProperty(String name)<br>provides type safety for additional properties | | ||
|
||
## Bar | ||
public static class Bar<br> | ||
extends AnyTypeJsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema | | ||
| ------------------------------------------------------------------ | | ||
| validate | | ||
|
||
## Foo | ||
public static class Foo<br> | ||
extends AnyTypeJsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema | | ||
| ------------------------------------------------------------------ | | ||
| validate | | ||
|
||
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) |
94 changes: 94 additions & 0 deletions
94
...java_simplified/docs/components/schemas/AdditionalpropertiesCanExistByItself.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# AdditionalpropertiesCanExistByItself | ||
org.openapijsonschematools.client.components.schemas.AdditionalpropertiesCanExistByItself.java | ||
public class AdditionalpropertiesCanExistByItself | ||
|
||
A class that contains necessary nested | ||
- schema classes (which validate payloads), extends JsonSchema | ||
- classes to store validated list payloads, extends FrozenList | ||
- classes to store validated map payloads, extends FrozenMap | ||
- classes to build inputs for list payloads | ||
- classes to build inputs for map payloads | ||
|
||
## Nested Class Summary | ||
| Modifier and Type | Class and Description | | ||
| ----------------- | ---------------------- | | ||
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1](#additionalpropertiescanexistbyitself1)<br> schema class | | ||
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMapInput](#additionalpropertiescanexistbyitselfmapinput)<br> builder for Map payloads | | ||
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap)<br> output class for Map payloads | | ||
| static class | [AdditionalpropertiesCanExistByItself.AdditionalProperties](#additionalproperties)<br> schema class | | ||
|
||
## AdditionalpropertiesCanExistByItself1 | ||
public static class AdditionalpropertiesCanExistByItself1<br> | ||
extends JsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
### Code Sample | ||
``` | ||
import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; | ||
import org.openapijsonschematools.client.configurations.SchemaConfiguration; | ||
import org.openapijsonschematools.client.exceptions.ValidationException; | ||
import org.openapijsonschematools.client.schemas.MapMaker; | ||
import org.openapijsonschematools.client.schemas.validation.FrozenList; | ||
import org.openapijsonschematools.client.schemas.validation.FrozenMap; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.AbstractMap; | ||
static final SchemaConfiguration configuration = new SchemaConfiguration(JsonSchemaKeywordFlags.ofNone()); | ||
// Map validation | ||
AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap validatedPayload = | ||
AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1.validate( | ||
MapMaker.makeMap( | ||
), | ||
configuration | ||
); | ||
``` | ||
|
||
### Field Summary | ||
| Modifier and Type | Field and Description | | ||
| ----------------- | ---------------------- | | ||
| Set<Class<?>> | type = Set.of(Map.class)<br/> | | ||
| Class<? extends JsonSchema> | additionalProperties = [AdditionalProperties.class](#additionalproperties)<br> | | ||
|
||
### Method Summary | ||
| Modifier and Type | Method and Description | | ||
| ----------------- | ---------------------- | | ||
| static [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | validate([Map<String, Boolean>](#additionalpropertiescanexistbyitselfmapinput) arg, SchemaConfiguration configuration) | | ||
|
||
## AdditionalpropertiesCanExistByItselfMapInput | ||
public class AdditionalpropertiesCanExistByItselfMapInput<br> | ||
builder for `Map<String, Boolean>` | ||
|
||
A class that builds the Map input type | ||
|
||
## Input Map Keys | ||
| Key | Type | Description | Notes | | ||
| --- | ---- | ------------ | ----- | | ||
| **anyStringName** | boolean | any string name can be used but the value must be the correct type | [optional] | | ||
|
||
## AdditionalpropertiesCanExistByItselfMap | ||
public static class AdditionalpropertiesCanExistByItselfMap<br> | ||
extends FrozenMap<String, Boolean> | ||
|
||
A class to store validated Map payloads | ||
|
||
### Method Summary | ||
| Modifier and Type | Method and Description | | ||
| ----------------- | ---------------------- | | ||
| static [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | of([Map<String, Boolean>](#additionalpropertiescanexistbyitselfmapinput) arg, SchemaConfiguration configuration) | | ||
| boolean | getAdditionalProperty(String name)<br>provides type safety for additional properties | | ||
|
||
## AdditionalProperties | ||
public static class AdditionalProperties<br> | ||
extends BooleanJsonSchema | ||
|
||
A schema class that validates payloads | ||
|
||
| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema | | ||
| ------------------------------------------------------------------ | | ||
| validate | | ||
|
||
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) |
Oops, something went wrong.