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

Commit bfb8df4

Browse files
committed
Samples regen
1 parent cc176d1 commit bfb8df4

File tree

19 files changed

+2065
-2
lines changed

19 files changed

+2065
-2
lines changed

samples/client/petstore/java/.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ docs/components/schemas/IntegerMax10.md
112112
docs/components/schemas/IntegerMin15.md
113113
docs/components/schemas/IsoscelesTriangle.md
114114
docs/components/schemas/Items.md
115+
docs/components/schemas/ItemsSchema.md
115116
docs/components/schemas/JSONPatchRequest.md
116117
docs/components/schemas/JSONPatchRequestAddReplaceTest.md
117118
docs/components/schemas/JSONPatchRequestMoveCopy.md
@@ -120,6 +121,7 @@ docs/components/schemas/Mammal.md
120121
docs/components/schemas/MapTest.md
121122
docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md
122123
docs/components/schemas/Money.md
124+
docs/components/schemas/MultiPropertiesSchema.md
123125
docs/components/schemas/MyObjectDto.md
124126
docs/components/schemas/Name.md
125127
docs/components/schemas/NoAdditionalProperties.md
@@ -811,6 +813,7 @@ src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMax10.
811813
src/main/java/org/openapijsonschematools/client/components/schemas/IntegerMin15.java
812814
src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java
813815
src/main/java/org/openapijsonschematools/client/components/schemas/Items.java
816+
src/main/java/org/openapijsonschematools/client/components/schemas/ItemsSchema.java
814817
src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequest.java
815818
src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestAddReplaceTest.java
816819
src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java
@@ -819,6 +822,7 @@ src/main/java/org/openapijsonschematools/client/components/schemas/Mammal.java
819822
src/main/java/org/openapijsonschematools/client/components/schemas/MapTest.java
820823
src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java
821824
src/main/java/org/openapijsonschematools/client/components/schemas/Money.java
825+
src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java
822826
src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java
823827
src/main/java/org/openapijsonschematools/client/components/schemas/Name.java
824828
src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java
@@ -1695,6 +1699,8 @@ src/main/java/org/openapijsonschematools/client/servers/ServerWithVariables.java
16951699
src/main/java/org/openapijsonschematools/client/servers/ServerWithoutVariables.java
16961700
src/main/java/org/openapijsonschematools/client/servers/server0/Variables.java
16971701
src/main/java/org/openapijsonschematools/client/servers/server1/Variables.java
1702+
src/test/java/org/openapijsonschematools/client/components/schemas/ItemsSchemaTest.java
1703+
src/test/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchemaTest.java
16981704
src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java
16991705
src/test/java/org/openapijsonschematools/client/header/ContentHeaderTest.java
17001706
src/test/java/org/openapijsonschematools/client/header/SchemaHeaderTest.java

samples/client/petstore/java/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,15 @@ allowed input and output types.
222222
| [IntegerMin15.IntegerMin151](docs/components/schemas/IntegerMin15.md#integermin151) | |
223223
| [IsoscelesTriangle.IsoscelesTriangle1](docs/components/schemas/IsoscelesTriangle.md#isoscelestriangle1) | |
224224
| [Items.Items1](docs/components/schemas/Items.md#items1) | component's name collides with the inner schema name |
225+
| [ItemsSchema.ItemsSchema1](docs/components/schemas/ItemsSchema.md#itemsschema1) | |
225226
| [JSONPatchRequest.JSONPatchRequest1](docs/components/schemas/JSONPatchRequest.md#jsonpatchrequest1) | |
226227
| [JSONPatchRequestAddReplaceTest.JSONPatchRequestAddReplaceTest1](docs/components/schemas/JSONPatchRequestAddReplaceTest.md#jsonpatchrequestaddreplacetest1) | |
227228
| [JSONPatchRequestMoveCopy.JSONPatchRequestMoveCopy1](docs/components/schemas/JSONPatchRequestMoveCopy.md#jsonpatchrequestmovecopy1) | |
228229
| [JSONPatchRequestRemove.JSONPatchRequestRemove1](docs/components/schemas/JSONPatchRequestRemove.md#jsonpatchrequestremove1) | |
229230
| [MapTest.MapTest1](docs/components/schemas/MapTest.md#maptest1) | |
230231
| [MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClass1](docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md#mixedpropertiesandadditionalpropertiesclass1) | |
231232
| [Money.Money1](docs/components/schemas/Money.md#money1) | |
233+
| [MultiPropertiesSchema.MultiPropertiesSchema1](docs/components/schemas/MultiPropertiesSchema.md#multipropertiesschema1) | |
232234
| [MyObjectDto.MyObjectDto1](docs/components/schemas/MyObjectDto.md#myobjectdto1) | |
233235
| [Name.Name1](docs/components/schemas/Name.md#name1) | Model for testing model name same as property name |
234236
| [NoAdditionalProperties.NoAdditionalProperties1](docs/components/schemas/NoAdditionalProperties.md#noadditionalproperties1) | |
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
# ItemsSchema
2+
org.openapijsonschematools.client.components.schemas.ItemsSchema.java
3+
public class ItemsSchema<br>
4+
5+
A class that contains necessary nested
6+
- schema classes (which validate payloads), extends JsonSchema
7+
- sealed interfaces which store validated payloads, java version of a sum type
8+
- boxed classes which store validated payloads, sealed permits class implementations
9+
- classes to store validated map payloads, extends FrozenMap
10+
- classes to build inputs for map payloads
11+
12+
## Nested Class Summary
13+
| Modifier and Type | Class and Description |
14+
| ----------------- | ---------------------- |
15+
| sealed interface | [ItemsSchema.ItemsSchema1Boxed](#itemsschema1boxed)<br> sealed interface for validated payloads |
16+
| record | [ItemsSchema.ItemsSchema1BoxedMap](#itemsschema1boxedmap)<br> boxed class to store validated Map payloads |
17+
| static class | [ItemsSchema.ItemsSchema1](#itemsschema1)<br> schema class |
18+
| static class | [ItemsSchema.ItemsSchemaMapBuilder](#itemsschemamapbuilder)<br> builder for Map payloads |
19+
| static class | [ItemsSchema.ItemsSchemaMap](#itemsschemamap)<br> output class for Map payloads |
20+
| sealed interface | [ItemsSchema.SecondAdditionalPropertyBoxed](#secondadditionalpropertyboxed)<br> sealed interface for validated payloads |
21+
| record | [ItemsSchema.SecondAdditionalPropertyBoxedString](#secondadditionalpropertyboxedstring)<br> boxed class to store validated String payloads |
22+
| static class | [ItemsSchema.SecondAdditionalProperty](#secondadditionalproperty)<br> schema class |
23+
| sealed interface | [ItemsSchema.AdditionalPropertyBoxed](#additionalpropertyboxed)<br> sealed interface for validated payloads |
24+
| record | [ItemsSchema.AdditionalPropertyBoxedString](#additionalpropertyboxedstring)<br> boxed class to store validated String payloads |
25+
| static class | [ItemsSchema.AdditionalProperty](#additionalproperty)<br> schema class |
26+
| sealed interface | [ItemsSchema.NameBoxed](#nameboxed)<br> sealed interface for validated payloads |
27+
| record | [ItemsSchema.NameBoxedString](#nameboxedstring)<br> boxed class to store validated String payloads |
28+
| static class | [ItemsSchema.Name](#name)<br> schema class |
29+
30+
## ItemsSchema1Boxed
31+
public sealed interface ItemsSchema1Boxed<br>
32+
permits<br>
33+
[ItemsSchema1BoxedMap](#itemsschema1boxedmap)
34+
35+
sealed interface that stores validated payloads using boxed classes
36+
37+
## ItemsSchema1BoxedMap
38+
public record ItemsSchema1BoxedMap<br>
39+
implements [ItemsSchema1Boxed](#itemsschema1boxed)
40+
41+
record that stores validated Map payloads, sealed permits implementation
42+
43+
### Constructor Summary
44+
| Constructor and Description |
45+
| --------------------------- |
46+
| ItemsSchema1BoxedMap([ItemsSchemaMap](#itemsschemamap) data)<br>Creates an instance, private visibility |
47+
48+
### Method Summary
49+
| Modifier and Type | Method and Description |
50+
| ----------------- | ---------------------- |
51+
| [ItemsSchemaMap](#itemsschemamap) | data()<br>validated payload |
52+
| @Nullable Object | getData()<br>validated payload |
53+
54+
## ItemsSchema1
55+
public static class ItemsSchema1<br>
56+
extends JsonSchema
57+
58+
A schema class that validates payloads
59+
60+
### Code Sample
61+
```
62+
import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags;
63+
import org.openapijsonschematools.client.configurations.SchemaConfiguration;
64+
import org.openapijsonschematools.client.exceptions.ValidationException;
65+
import org.openapijsonschematools.client.schemas.validation.MapUtils;
66+
import org.openapijsonschematools.client.schemas.validation.FrozenList;
67+
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
68+
import org.openapijsonschematools.client.components.schemas.ItemsSchema;
69+
70+
import java.util.Arrays;
71+
import java.util.List;
72+
import java.util.AbstractMap;
73+
74+
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
75+
76+
// Map validation
77+
ItemsSchema.ItemsSchemaMap validatedPayload =
78+
ItemsSchema.ItemsSchema1.validate(
79+
new ItemsSchema.ItemsSchemaMapBuilder()
80+
.name("a")
81+
82+
.additionalProperty("a")
83+
84+
.secondAdditionalProperty("a")
85+
86+
.build(),
87+
configuration
88+
);
89+
```
90+
91+
### Field Summary
92+
| Modifier and Type | Field and Description |
93+
| ----------------- | ---------------------- |
94+
| Set<Class<?>> | type = Set.of(Map.class) |
95+
| Map<String, Class<? extends JsonSchema>> | properties = Map.ofEntries(<br>&nbsp;&nbsp;&nbsp;&nbsp;new PropertyEntry("name", [Name.class](#name))),<br>&nbsp;&nbsp;&nbsp;&nbsp;new PropertyEntry("additionalProperty", [AdditionalProperty.class](#additionalproperty))),<br>&nbsp;&nbsp;&nbsp;&nbsp;new PropertyEntry("secondAdditionalProperty", [SecondAdditionalProperty.class](#secondadditionalproperty)))<br>)<br> |
96+
97+
### Method Summary
98+
| Modifier and Type | Method and Description |
99+
| ----------------- | ---------------------- |
100+
| [ItemsSchemaMap](#itemsschemamap) | validate([Map&lt;?, ?&gt;](#itemsschemamapbuilder) arg, SchemaConfiguration configuration) |
101+
| [ItemsSchema1BoxedMap](#itemsschema1boxedmap) | validateAndBox([Map&lt;?, ?&gt;](#itemsschemamapbuilder) arg, SchemaConfiguration configuration) |
102+
| [ItemsSchema1Boxed](#itemsschema1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
103+
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
104+
105+
## ItemsSchemaMapBuilder
106+
public class ItemsSchemaMapBuilder<br>
107+
builder for `Map<String, @Nullable Object>`
108+
109+
A class that builds the Map input type
110+
111+
### Constructor Summary
112+
| Constructor and Description |
113+
| --------------------------- |
114+
| ItemsSchemaMapBuilder()<br>Creates a builder that contains an empty map |
115+
116+
### Method Summary
117+
| Modifier and Type | Method and Description |
118+
| ----------------- | ---------------------- |
119+
| Map<String, @Nullable Object> | build()<br>Returns map input that should be used with Schema.validate |
120+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | name(String value) |
121+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String value) |
122+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | secondAdditionalProperty(String value) |
123+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, Void value) |
124+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, boolean value) |
125+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, String value) |
126+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, int value) |
127+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, float value) |
128+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, long value) |
129+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, double value) |
130+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, List<?> value) |
131+
| [ItemsSchemaMapBuilder](#itemsschemamapbuilder) | additionalProperty(String key, Map<String, ?> value) |
132+
133+
## ItemsSchemaMap
134+
public static class ItemsSchemaMap<br>
135+
extends FrozenMap<String, @Nullable Object>
136+
137+
A class to store validated Map payloads
138+
139+
### Method Summary
140+
| Modifier and Type | Method and Description |
141+
| ----------------- | ---------------------- |
142+
| static [ItemsSchemaMap](#itemsschemamap) | of([Map<String, ? extends @Nullable Object>](#itemsschemamapbuilder) arg, SchemaConfiguration configuration) |
143+
| String | name()<br>[optional] |
144+
| String | additionalProperty()<br>[optional] |
145+
| String | secondAdditionalProperty()<br>[optional] |
146+
| @Nullable Object | getAdditionalProperty(String name)<br>provides type safety for additional properties |
147+
148+
## SecondAdditionalPropertyBoxed
149+
public sealed interface SecondAdditionalPropertyBoxed<br>
150+
permits<br>
151+
[SecondAdditionalPropertyBoxedString](#secondadditionalpropertyboxedstring)
152+
153+
sealed interface that stores validated payloads using boxed classes
154+
155+
## SecondAdditionalPropertyBoxedString
156+
public record SecondAdditionalPropertyBoxedString<br>
157+
implements [SecondAdditionalPropertyBoxed](#secondadditionalpropertyboxed)
158+
159+
record that stores validated String payloads, sealed permits implementation
160+
161+
### Constructor Summary
162+
| Constructor and Description |
163+
| --------------------------- |
164+
| SecondAdditionalPropertyBoxedString(String data)<br>Creates an instance, private visibility |
165+
166+
### Method Summary
167+
| Modifier and Type | Method and Description |
168+
| ----------------- | ---------------------- |
169+
| String | data()<br>validated payload |
170+
| @Nullable Object | getData()<br>validated payload |
171+
172+
## SecondAdditionalProperty
173+
public static class SecondAdditionalProperty<br>
174+
extends StringJsonSchema.StringJsonSchema1
175+
176+
A schema class that validates payloads
177+
178+
| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 |
179+
| ------------------------------------------------------------------ |
180+
| validate |
181+
| validateAndBox |
182+
183+
## AdditionalPropertyBoxed
184+
public sealed interface AdditionalPropertyBoxed<br>
185+
permits<br>
186+
[AdditionalPropertyBoxedString](#additionalpropertyboxedstring)
187+
188+
sealed interface that stores validated payloads using boxed classes
189+
190+
## AdditionalPropertyBoxedString
191+
public record AdditionalPropertyBoxedString<br>
192+
implements [AdditionalPropertyBoxed](#additionalpropertyboxed)
193+
194+
record that stores validated String payloads, sealed permits implementation
195+
196+
### Constructor Summary
197+
| Constructor and Description |
198+
| --------------------------- |
199+
| AdditionalPropertyBoxedString(String data)<br>Creates an instance, private visibility |
200+
201+
### Method Summary
202+
| Modifier and Type | Method and Description |
203+
| ----------------- | ---------------------- |
204+
| String | data()<br>validated payload |
205+
| @Nullable Object | getData()<br>validated payload |
206+
207+
## AdditionalProperty
208+
public static class AdditionalProperty<br>
209+
extends StringJsonSchema.StringJsonSchema1
210+
211+
A schema class that validates payloads
212+
213+
| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 |
214+
| ------------------------------------------------------------------ |
215+
| validate |
216+
| validateAndBox |
217+
218+
## NameBoxed
219+
public sealed interface NameBoxed<br>
220+
permits<br>
221+
[NameBoxedString](#nameboxedstring)
222+
223+
sealed interface that stores validated payloads using boxed classes
224+
225+
## NameBoxedString
226+
public record NameBoxedString<br>
227+
implements [NameBoxed](#nameboxed)
228+
229+
record that stores validated String payloads, sealed permits implementation
230+
231+
### Constructor Summary
232+
| Constructor and Description |
233+
| --------------------------- |
234+
| NameBoxedString(String data)<br>Creates an instance, private visibility |
235+
236+
### Method Summary
237+
| Modifier and Type | Method and Description |
238+
| ----------------- | ---------------------- |
239+
| String | data()<br>validated payload |
240+
| @Nullable Object | getData()<br>validated payload |
241+
242+
## Name
243+
public static class Name<br>
244+
extends StringJsonSchema.StringJsonSchema1
245+
246+
A schema class that validates payloads
247+
248+
| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 |
249+
| ------------------------------------------------------------------ |
250+
| validate |
251+
| validateAndBox |
252+
253+
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)

0 commit comments

Comments
 (0)