This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Commit 8318ab9
authored
Adds 3.1.0 const feature (#210)
* Adds generation of const enum class and storage of const values in schema
* Writes const info in schema class when a type is defined
* Adds const validator and disableable keyword
* Adds const to the generator docs
* Fixes validation writing for str schema
* Handles constInfo in boolean/string/integer validate overloads
* Fixes validate else conditions
* Another fix to the validate template for enums
* Fixes literal casting using constInfo in validate
* Stops using type in validate method, uses types instead
* Refactors enumInfo for validate return type to be simpler
* Fixes validate templete for constInfo
* Sequence fixes in schema.py and schemas.py
* Adds and uses SequenceNotStr
* Fixes typo
* Adds tests of const
* Samples regen
* Samples regenerated1 parent 8ff6b0e commit 8318ab9
File tree
90 files changed
+947
-261
lines changed- docs/generators
- samples/client
- 3_0_3_unit_test/python/src/unit_test_api
- components/schema
- configurations
- schemas
- 3_1_0_json_schema/python
- .openapi-generator
- docs/components/schema
- src/json_schema_api
- components
- schemas
- schema
- configurations
- schemas
- test/components/schema
- openapi_features
- nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package
- configurations
- schemas
- security/python/src/this_package
- configurations
- schemas
- petstore/python/src/petstore_api
- components/schema
- configurations
- paths
- fake
- delete/parameters
- parameter_1
- parameter_4
- get
- parameters
- parameter_0
- parameter_1
- parameter_2
- parameter_3
- request_body/content/application_x_www_form_urlencoded
- foo/get/servers
- pet_find_by_status
- get/parameters/parameter_0
- servers
- schemas
- servers
- src
- main
- java/org/openapijsonschematools/codegen/generators
- generatormetadata/features
- openapimodels
- resources/python
- components/schemas/schema_cls
- validate
- configurations
- schemas
- test/resources/3_1
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
90 files changed
+947
-261
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
Lines changed: 45 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
17 | 41 | | |
18 | 42 | | |
19 | | - | |
| 43 | + | |
20 | 44 | | |
21 | 45 | | |
22 | 46 | | |
| |||
439 | 463 | | |
440 | 464 | | |
441 | 465 | | |
442 | | - | |
| 466 | + | |
443 | 467 | | |
444 | 468 | | |
445 | 469 | | |
446 | 470 | | |
447 | 471 | | |
448 | 472 | | |
449 | 473 | | |
450 | | - | |
| 474 | + | |
451 | 475 | | |
452 | 476 | | |
453 | 477 | | |
| |||
486 | 510 | | |
487 | 511 | | |
488 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
489 | 521 | | |
490 | 522 | | |
491 | 523 | | |
| |||
614 | 646 | | |
615 | 647 | | |
616 | 648 | | |
617 | | - | |
| 649 | + | |
618 | 650 | | |
619 | 651 | | |
620 | 652 | | |
621 | 653 | | |
622 | 654 | | |
623 | 655 | | |
624 | 656 | | |
625 | | - | |
| 657 | + | |
626 | 658 | | |
627 | 659 | | |
628 | 660 | | |
| |||
653 | 685 | | |
654 | 686 | | |
655 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
656 | 696 | | |
657 | 697 | | |
658 | 698 | | |
| |||
668 | 708 | | |
669 | 709 | | |
670 | 710 | | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | 711 | | |
686 | 712 | | |
687 | 713 | | |
| |||
0 commit comments