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

Java, adds list builder #346

Merged
merged 24 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bac7432
Adds builder suffix to list and map builder classes
spacether Dec 28, 2023
453fdd5
Array input docs separated into separate template
spacether Dec 28, 2023
a2dfe83
Adds list builder constructors and build method
spacether Dec 28, 2023
68474de
Adds unset type add methods in list builder
spacether Dec 28, 2023
62b6253
Adds numeric types to listbuilder add
spacether Dec 28, 2023
46fae14
Petstore regen
spacether Dec 28, 2023
47205e6
integer and number input types changed to Number
spacether Dec 28, 2023
169cfd4
Adds map input to list builder
spacether Dec 28, 2023
3fc8283
Handles self references in list builder
spacether Dec 28, 2023
046fc20
Separates template for listInput add items
spacether Dec 28, 2023
ae693db
Handles ref type when building array
spacether Dec 28, 2023
3df41ba
303 sample regen
spacether Dec 28, 2023
2a32bce
Uses array builder for 303 tests
spacether Dec 28, 2023
df8bfb4
Changes integer/number output types to Number
spacether Dec 29, 2023
53d4b3e
list builder add methods added to schema docs
spacether Dec 29, 2023
adbf6bf
Removes Input List Items section
spacether Dec 29, 2023
623c989
Adds enum add methods to list builder
spacether Dec 29, 2023
fb44097
Petstore regenerated
spacether Dec 29, 2023
7cca413
Fixes handling of refed enums in listbuilder add
spacether Dec 30, 2023
e315435
Adds ListBuilderTest
spacether Dec 30, 2023
7e9c939
Petstore regen w/ listbuilder add links to enum classes
spacether Dec 30, 2023
432bb47
Turns on useContainter for schema docs in petstore
spacether Dec 30, 2023
023e687
Sample regen so docs can show correct type for list builder and build…
spacether Dec 30, 2023
d9b488b
Samples regen
spacether Dec 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeyword
src/test/java/org/openapijsonschematools/client/schemas/AnyTypeSchemaTest.java
src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java
src/test/java/org/openapijsonschematools/client/schemas/BooleanSchemaTest.java
src/test/java/org/openapijsonschematools/client/schemas/ListBuilderTest.java
src/test/java/org/openapijsonschematools/client/schemas/ListSchemaTest.java
src/test/java/org/openapijsonschematools/client/schemas/MapSchemaTest.java
src/test/java/org/openapijsonschematools/client/schemas/NullSchemaTest.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A class that contains necessary nested
| 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.AdditionalpropertiesAllowsASchemaWhichShouldValidateMapBuilder](#additionalpropertiesallowsaschemawhichshouldvalidatemapbuilder)<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 |
Expand Down Expand Up @@ -57,10 +57,10 @@ AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsA
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| [AdditionalpropertiesAllowsASchemaWhichShouldValidateMap](#additionalpropertiesallowsaschemawhichshouldvalidatemap) | validate([Map<?, ?>](#additionalpropertiesallowsaschemawhichshouldvalidatemapinput) arg, SchemaConfiguration configuration) |
| [AdditionalpropertiesAllowsASchemaWhichShouldValidateMap](#additionalpropertiesallowsaschemawhichshouldvalidatemap) | validate([Map<?, ?>](#additionalpropertiesallowsaschemawhichshouldvalidatemapbuilder) arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## AdditionalpropertiesAllowsASchemaWhichShouldValidateMapInput
public class AdditionalpropertiesAllowsASchemaWhichShouldValidateMapInput<br>
## AdditionalpropertiesAllowsASchemaWhichShouldValidateMapBuilder
public class AdditionalpropertiesAllowsASchemaWhichShouldValidateMapBuilder<br>
builder for `Map<String, ? extends @Nullable Object>`

A class that builds the Map input type
Expand All @@ -81,7 +81,7 @@ A class to store validated Map payloads
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [AdditionalpropertiesAllowsASchemaWhichShouldValidateMap](#additionalpropertiesallowsaschemawhichshouldvalidatemap) | of([Map<String, ? extends @Nullable Object>](#additionalpropertiesallowsaschemawhichshouldvalidatemapinput) arg, SchemaConfiguration configuration) |
| static [AdditionalpropertiesAllowsASchemaWhichShouldValidateMap](#additionalpropertiesallowsaschemawhichshouldvalidatemap) | of([Map<String, ? extends @Nullable Object>](#additionalpropertiesallowsaschemawhichshouldvalidatemapbuilder) arg, SchemaConfiguration configuration) |
| @Nullable Object | foo()<br>[optional] |
| @Nullable Object | bar()<br>[optional] |
| boolean | getAdditionalProperty(String name)<br>provides type safety for additional properties |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A class that contains necessary nested
| 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.AdditionalpropertiesAreAllowedByDefaultMapBuilder](#additionalpropertiesareallowedbydefaultmapbuilder)<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 |
Expand All @@ -37,11 +37,11 @@ A schema class that validates payloads
| float | validate(float arg, SchemaConfiguration configuration) |
| double | validate(double arg, SchemaConfiguration configuration) |
| boolean | validate(boolean arg, SchemaConfiguration configuration) |
| [AdditionalpropertiesAreAllowedByDefaultMap](#additionalpropertiesareallowedbydefaultmap) | validate([Map<?, ?>](#additionalpropertiesareallowedbydefaultmapinput) arg, SchemaConfiguration configuration) |
| [AdditionalpropertiesAreAllowedByDefaultMap](#additionalpropertiesareallowedbydefaultmap) | validate([Map<?, ?>](#additionalpropertiesareallowedbydefaultmapbuilder) arg, SchemaConfiguration configuration) |
| FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## AdditionalpropertiesAreAllowedByDefaultMapInput
public class AdditionalpropertiesAreAllowedByDefaultMapInput<br>
## AdditionalpropertiesAreAllowedByDefaultMapBuilder
public class AdditionalpropertiesAreAllowedByDefaultMapBuilder<br>
builder for `Map<String, ? extends @Nullable Object>`

A class that builds the Map input type
Expand All @@ -62,7 +62,7 @@ A class to store validated Map payloads
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [AdditionalpropertiesAreAllowedByDefaultMap](#additionalpropertiesareallowedbydefaultmap) | of([Map<String, ? extends @Nullable Object>](#additionalpropertiesareallowedbydefaultmapinput) arg, SchemaConfiguration configuration) |
| static [AdditionalpropertiesAreAllowedByDefaultMap](#additionalpropertiesareallowedbydefaultmap) | of([Map<String, ? extends @Nullable Object>](#additionalpropertiesareallowedbydefaultmapbuilder) arg, SchemaConfiguration configuration) |
| @Nullable Object | foo()<br>[optional] |
| @Nullable Object | bar()<br>[optional] |
| Object | getAdditionalProperty(String name)<br>provides type safety for additional properties |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A class that contains necessary nested
| 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.AdditionalpropertiesCanExistByItselfMapBuilder](#additionalpropertiescanexistbyitselfmapbuilder)<br> builder for Map payloads |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap)<br> output class for Map payloads |
| static class | [AdditionalpropertiesCanExistByItself.AdditionalProperties](#additionalproperties)<br> schema class |

Expand Down Expand Up @@ -54,10 +54,10 @@ AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItselfMap val
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | validate([Map<?, ?>](#additionalpropertiescanexistbyitselfmapinput) arg, SchemaConfiguration configuration) |
| [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | validate([Map<?, ?>](#additionalpropertiescanexistbyitselfmapbuilder) arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## AdditionalpropertiesCanExistByItselfMapInput
public class AdditionalpropertiesCanExistByItselfMapInput<br>
## AdditionalpropertiesCanExistByItselfMapBuilder
public class AdditionalpropertiesCanExistByItselfMapBuilder<br>
builder for `Map<String, Boolean>`

A class that builds the Map input type
Expand All @@ -76,7 +76,7 @@ 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) |
| static [AdditionalpropertiesCanExistByItselfMap](#additionalpropertiescanexistbyitselfmap) | of([Map<String, Boolean>](#additionalpropertiescanexistbyitselfmapbuilder) arg, SchemaConfiguration configuration) |
| boolean | getAdditionalProperty(String name)<br>provides type safety for additional properties |

## AdditionalProperties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ A class that contains necessary nested
| Modifier and Type | Class and Description |
| ----------------- | ---------------------- |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.AdditionalpropertiesShouldNotLookInApplicators1](#additionalpropertiesshouldnotlookinapplicators1)<br> schema class |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.AdditionalpropertiesShouldNotLookInApplicatorsMapInput](#additionalpropertiesshouldnotlookinapplicatorsmapinput)<br> builder for Map payloads |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.AdditionalpropertiesShouldNotLookInApplicatorsMapBuilder](#additionalpropertiesshouldnotlookinapplicatorsmapbuilder)<br> builder for Map payloads |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.AdditionalpropertiesShouldNotLookInApplicatorsMap](#additionalpropertiesshouldnotlookinapplicatorsmap)<br> output class for Map payloads |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.Schema0](#schema0)<br> schema class |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.Schema0MapInput](#schema0mapinput)<br> builder for Map payloads |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.Schema0MapBuilder](#schema0mapbuilder)<br> builder for Map payloads |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.Schema0Map](#schema0map)<br> output class for Map payloads |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.Foo](#foo)<br> schema class |
| static class | [AdditionalpropertiesShouldNotLookInApplicators.AdditionalProperties](#additionalproperties)<br> schema class |
Expand All @@ -41,11 +41,11 @@ A schema class that validates payloads
| float | validate(float arg, SchemaConfiguration configuration) |
| double | validate(double arg, SchemaConfiguration configuration) |
| boolean | validate(boolean arg, SchemaConfiguration configuration) |
| [AdditionalpropertiesShouldNotLookInApplicatorsMap](#additionalpropertiesshouldnotlookinapplicatorsmap) | validate([Map<?, ?>](#additionalpropertiesshouldnotlookinapplicatorsmapinput) arg, SchemaConfiguration configuration) |
| [AdditionalpropertiesShouldNotLookInApplicatorsMap](#additionalpropertiesshouldnotlookinapplicatorsmap) | validate([Map<?, ?>](#additionalpropertiesshouldnotlookinapplicatorsmapbuilder) arg, SchemaConfiguration configuration) |
| FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## AdditionalpropertiesShouldNotLookInApplicatorsMapInput
public class AdditionalpropertiesShouldNotLookInApplicatorsMapInput<br>
## AdditionalpropertiesShouldNotLookInApplicatorsMapBuilder
public class AdditionalpropertiesShouldNotLookInApplicatorsMapBuilder<br>
builder for `Map<String, Boolean>`

A class that builds the Map input type
Expand All @@ -64,7 +64,7 @@ A class to store validated Map payloads
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [AdditionalpropertiesShouldNotLookInApplicatorsMap](#additionalpropertiesshouldnotlookinapplicatorsmap) | of([Map<String, Boolean>](#additionalpropertiesshouldnotlookinapplicatorsmapinput) arg, SchemaConfiguration configuration) |
| static [AdditionalpropertiesShouldNotLookInApplicatorsMap](#additionalpropertiesshouldnotlookinapplicatorsmap) | of([Map<String, Boolean>](#additionalpropertiesshouldnotlookinapplicatorsmapbuilder) arg, SchemaConfiguration configuration) |
| boolean | getAdditionalProperty(String name)<br>provides type safety for additional properties |

## Schema0
Expand All @@ -88,11 +88,11 @@ A schema class that validates payloads
| float | validate(float arg, SchemaConfiguration configuration) |
| double | validate(double arg, SchemaConfiguration configuration) |
| boolean | validate(boolean arg, SchemaConfiguration configuration) |
| [Schema0Map](#schema0map) | validate([Map<?, ?>](#schema0mapinput) arg, SchemaConfiguration configuration) |
| [Schema0Map](#schema0map) | validate([Map<?, ?>](#schema0mapbuilder) arg, SchemaConfiguration configuration) |
| FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## Schema0MapInput
public class Schema0MapInput<br>
## Schema0MapBuilder
public class Schema0MapBuilder<br>
builder for `Map<String, ? extends @Nullable Object>`

A class that builds the Map input type
Expand All @@ -112,7 +112,7 @@ A class to store validated Map payloads
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [Schema0Map](#schema0map) | of([Map<String, ? extends @Nullable Object>](#schema0mapinput) arg, SchemaConfiguration configuration) |
| static [Schema0Map](#schema0map) | of([Map<String, ? extends @Nullable Object>](#schema0mapbuilder) arg, SchemaConfiguration configuration) |
| @Nullable Object | foo()<br>[optional] |
| Object | getAdditionalProperty(String name)<br>provides type safety for additional properties |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ A class that contains necessary nested
| ----------------- | ---------------------- |
| static class | [Allof.Allof1](#allof1)<br> schema class |
| static class | [Allof.Schema1](#schema1)<br> schema class |
| static class | [Allof.Schema1MapInput](#schema1mapinput)<br> builder for Map payloads |
| static class | [Allof.Schema1MapBuilder](#schema1mapbuilder)<br> builder for Map payloads |
| static class | [Allof.Schema1Map](#schema1map)<br> output class for Map payloads |
| static class | [Allof.Foo](#foo)<br> schema class |
| static class | [Allof.Schema0](#schema0)<br> schema class |
| static class | [Allof.Schema0MapInput](#schema0mapinput)<br> builder for Map payloads |
| static class | [Allof.Schema0MapBuilder](#schema0mapbuilder)<br> builder for Map payloads |
| static class | [Allof.Schema0Map](#schema0map)<br> output class for Map payloads |
| static class | [Allof.Bar](#bar)<br> schema class |

Expand Down Expand Up @@ -66,11 +66,11 @@ A schema class that validates payloads
| float | validate(float arg, SchemaConfiguration configuration) |
| double | validate(double arg, SchemaConfiguration configuration) |
| boolean | validate(boolean arg, SchemaConfiguration configuration) |
| [Schema1Map](#schema1map) | validate([Map<?, ?>](#schema1mapinput) arg, SchemaConfiguration configuration) |
| [Schema1Map](#schema1map) | validate([Map<?, ?>](#schema1mapbuilder) arg, SchemaConfiguration configuration) |
| FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## Schema1MapInput
public class Schema1MapInput<br>
## Schema1MapBuilder
public class Schema1MapBuilder<br>
builder for `Map<String, ? extends @Nullable Object>`

A class that builds the Map input type
Expand All @@ -90,7 +90,7 @@ A class to store validated Map payloads
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [Schema1Map](#schema1map) | of([Map<String, ? extends @Nullable Object>](#schema1mapinput) arg, SchemaConfiguration configuration) |
| static [Schema1Map](#schema1map) | of([Map<String, ? extends @Nullable Object>](#schema1mapbuilder) arg, SchemaConfiguration configuration) |
| String | foo()<br> |
| Object | getAdditionalProperty(String name)<br>provides type safety for additional properties |

Expand Down Expand Up @@ -126,19 +126,19 @@ A schema class that validates payloads
| float | validate(float arg, SchemaConfiguration configuration) |
| double | validate(double arg, SchemaConfiguration configuration) |
| boolean | validate(boolean arg, SchemaConfiguration configuration) |
| [Schema0Map](#schema0map) | validate([Map<?, ?>](#schema0mapinput) arg, SchemaConfiguration configuration) |
| [Schema0Map](#schema0map) | validate([Map<?, ?>](#schema0mapbuilder) arg, SchemaConfiguration configuration) |
| FrozenList<@Nullable Object> | validate(List<?> arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
## Schema0MapInput
public class Schema0MapInput<br>
## Schema0MapBuilder
public class Schema0MapBuilder<br>
builder for `Map<String, ? extends @Nullable Object>`

A class that builds the Map input type

## Input Map Keys
| Key | Type | Description | Notes |
| --- | ---- | ------------ | ----- |
| **bar** | long | | |
| **bar** | Number | | |
| **anyStringName** | Object | any string name can be used but the value must be the correct type | [optional] |

## Schema0Map
Expand All @@ -150,8 +150,8 @@ A class to store validated Map payloads
### Method Summary
| Modifier and Type | Method and Description |
| ----------------- | ---------------------- |
| static [Schema0Map](#schema0map) | of([Map<String, ? extends @Nullable Object>](#schema0mapinput) arg, SchemaConfiguration configuration) |
| long | bar()<br> |
| static [Schema0Map](#schema0map) | of([Map<String, ? extends @Nullable Object>](#schema0mapbuilder) arg, SchemaConfiguration configuration) |
| Number | bar()<br> |
| Object | getAdditionalProperty(String name)<br>provides type safety for additional properties |

## Bar
Expand Down
Loading