This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Commit 71360ef
authored
v2 consolidates validation (#98)
* Validators made for all but 7 keywords
* Adds validate_required
* Fixes validator values and comparisons
* Adds validate_items
* Adds validate_properties
* Adds validate_additional_properties
* Updates schemas template file
* Adds JsonSchemaValidator as a base class to all MetaOapg
* More typo and bugfixes
* Embeds oneOf anyOf and allOf classes in subclesses like properties does
* Sample regenerated with composition class wrapper fix
* Fixes some validate tests
* Adds validate_one_of
* Adds anyOf validation
* Adds validate_all_of
* Fixes validate_additional_properties
* Speeds up Configuration property access
* Removes from_server info from ValidationMetadata
* Ensures that configuration is present in ValidationMetadata
* Fixes disabled_json_schema_keywords, updates configuration
* Fixes configuration test
* Fixes tests in test_any_type_schema
* Adds validate_not
* Fixes BinarySchema one_of definition
* Fixes int checking with no format
* Adds path_to_type dict
* Mfgs classes for unvalidated paths
* Fixes generation of bool and none classes on unvalidated paths
* Fixes more tests
* Fixes test_dict_validate
* Removes unest type checking
* Adds validate_discriminator
* Sample regen
* Fixes 3 tests
* Adds self handling for oneOf/anyOf/allOf validation, fixes last test
* Samples regenerated
* Fixes integer validation
* Removes Discriminable
* Removes ComposedBase + BinaryBase
* Removes Int32Base/Int64Base/Float32Base/Float64Base
* Adds int format for integers
* Removes EnumBase
* Replaces ComposedSchema with AnyTypeSchema, fixes two tests
* Fixes two tests, handles AnyType + InheritorOfAnyType + XSchema use case
* Adds template changes that allow nonCompliantUseDiscriminatorIfCompositionFails to work
* Sample regen
* Fixes test for nonCompliantUseDiscriminatorIfCompositionFails feature sample
* Samples regenerated
* Samples regenerate with UnsetAnyTypeSchema exclusion in cast_to_allowed..1 parent dd0036c commit 71360ef
320 files changed
Lines changed: 9224 additions & 10426 deletions
File tree
- modules/openapi-json-schema-generator/src/main
- java/org/openapitools/codegen/languages
- resources/python
- model_templates
- samples/openapi3/client
- 3_0_3_unit_test/python/unit_test_api
- components/schema
- features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package
- components/schema
- petstore/python
- petstore_api
- components/schema
- paths
- fake_inline_composition/post
- response_for_200
- fake
- delete
- get
- post
- pet_find_by_status/get
- tests_manual
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
843 | | - | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
844 | 849 | | |
845 | 850 | | |
846 | 851 | | |
| |||
1275 | 1280 | | |
1276 | 1281 | | |
1277 | 1282 | | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
1278 | 1289 | | |
1279 | 1290 | | |
1280 | 1291 | | |
| |||
Lines changed: 63 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
22 | 46 | | |
23 | 47 | | |
24 | 48 | | |
| |||
37 | 61 | | |
38 | 62 | | |
39 | 63 | | |
40 | | - | |
| 64 | + | |
41 | 65 | | |
42 | 66 | | |
43 | 67 | | |
| |||
46 | 70 | | |
47 | 71 | | |
48 | 72 | | |
49 | | - | |
| 73 | + | |
50 | 74 | | |
51 | 75 | | |
52 | 76 | | |
| |||
162 | 186 | | |
163 | 187 | | |
164 | 188 | | |
165 | | - | |
| 189 | + | |
166 | 190 | | |
167 | 191 | | |
168 | 192 | | |
| |||
214 | 238 | | |
215 | 239 | | |
216 | 240 | | |
217 | | - | |
| 241 | + | |
218 | 242 | | |
219 | | - | |
220 | | - | |
221 | 243 | | |
222 | 244 | | |
223 | 245 | | |
| |||
314 | 336 | | |
315 | 337 | | |
316 | 338 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
326 | 359 | | |
327 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
328 | 368 | | |
329 | 369 | | |
330 | 370 | | |
| 371 | + | |
331 | 372 | | |
332 | 373 | | |
333 | 374 | | |
| |||
Lines changed: 38 additions & 64 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
15 | 13 | | |
16 | 14 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 15 | + | |
32 | 16 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 17 | | |
37 | | - | |
| 18 | + | |
38 | 19 | | |
39 | | - | |
| 20 | + | |
40 | 21 | | |
41 | | - | |
42 | 22 | | |
43 | 23 | | |
44 | 24 | | |
45 | 25 | | |
46 | 26 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 27 | + | |
58 | 28 | | |
59 | | - | |
60 | | - | |
| 29 | + | |
| 30 | + | |
61 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
62 | 40 | | |
63 | | - | |
| 41 | + | |
64 | 42 | | |
65 | | - | |
| 43 | + | |
66 | 44 | | |
67 | | - | |
68 | 45 | | |
69 | 46 | | |
70 | 47 | | |
71 | 48 | | |
72 | 49 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 50 | + | |
84 | 51 | | |
85 | | - | |
86 | | - | |
| 52 | + | |
| 53 | + | |
87 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
88 | 63 | | |
89 | | - | |
| 64 | + | |
90 | 65 | | |
91 | | - | |
| 66 | + | |
92 | 67 | | |
93 | | - | |
94 | 68 | | |
95 | 69 | | |
96 | 70 | | |
| |||
Lines changed: 0 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 12 | | |
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 8 | | |
12 | | - | |
13 | 9 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 10 | | |
21 | 11 | | |
22 | 12 | | |
| |||
34 | 24 | | |
35 | 25 | | |
36 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
37 | 30 | | |
38 | 31 | | |
39 | 32 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
4 | 2 | | |
5 | | - | |
6 | 3 | | |
7 | 4 | | |
8 | 5 | | |
| |||
26 | 23 | | |
27 | 24 | | |
28 | 25 | | |
29 | | - | |
30 | 26 | | |
31 | 27 | | |
0 commit comments