This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Commit eed49d8
committed
v3 adds enum literal input and output type hints (#186)
* Fixes java warnings
* Adds exception throw if enum values types are not allowed
* Adds and uses enumInfo
* Adds typeToValues enumInfo
* Addsstring literal output for single schema validate with enums
* Adds validate method writing for simple schema classes with enums
* Adds string and int enum type hints to return type of validate
* Adds string literal output type for single type, per literal input string
* Removes are type in validate for enum classes of type int, str, bool
* Fixes overload signatures for int/bool/str with enums
* Adds bol and int enum to object output properties
* object properties of type string with enum now have literal output types
* Adds _helper_validate_str_overload template
* Uses string overload template for multiple types
* Adds and uses bool overload template
* Adds and uses int validate overload template
* Handles int enum value for number use case, java tests fixed, samples regen1 parent c54b632 commit eed49d8
File tree
95 files changed
+2921
-303
lines changed- modules/openapi-json-schema-generator/src
- main
- java/org/openapijsonschematools/codegen
- languages
- model
- resources/python
- components/schemas
- schemas
- test/java/org/openapijsonschematools/codegen
- python
- samples/openapi3/client
- 3_0_3_unit_test/python/src/unit_test_api
- components/schema
- paths
- request_body_post_enum_with_escaped_characters_request_body/post
- request_body_post_enum_with_false_does_not_match0_request_body/post
- request_body_post_enum_with_true_does_not_match1_request_body/post
- request_body_post_nul_characters_in_strings_request_body/post
- response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200
- response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200
- response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200
- response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200
- schemas
- features
- nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas
- security/python/src/this_package/schemas
- petstore/python
- src/petstore_api
- components/schema
- paths
- fake_refs_enum/post
- responses/response_200
- fake
- delete
- parameters
- parameter_1
- parameter_4
- get
- parameters
- parameter_0
- parameter_1
- parameter_2
- parameter_3
- parameter_4
- parameter_5
- request_body/content/application_x_www_form_urlencoded
- foo/get/servers
- pet_find_by_status
- get/parameters/parameter_0
- servers
- schemas
- servers
- tests_manual
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
95 files changed
+2921
-303
lines changedLines changed: 67 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
2282 | 2283 | | |
2283 | 2284 | | |
2284 | 2285 | | |
2285 | | - | |
| 2286 | + | |
2286 | 2287 | | |
2287 | 2288 | | |
2288 | 2289 | | |
| |||
2299 | 2300 | | |
2300 | 2301 | | |
2301 | 2302 | | |
2302 | | - | |
2303 | | - | |
2304 | | - | |
2305 | | - | |
2306 | | - | |
2307 | | - | |
2308 | | - | |
2309 | | - | |
2310 | | - | |
2311 | | - | |
2312 | | - | |
2313 | | - | |
2314 | | - | |
2315 | | - | |
2316 | | - | |
2317 | | - | |
2318 | | - | |
2319 | | - | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
2320 | 2333 | | |
2321 | 2334 | | |
2322 | 2335 | | |
| |||
3479 | 3492 | | |
3480 | 3493 | | |
3481 | 3494 | | |
3482 | | - | |
3483 | | - | |
3484 | | - | |
3485 | | - | |
3486 | | - | |
3487 | | - | |
3488 | | - | |
3489 | | - | |
3490 | | - | |
3491 | | - | |
3492 | | - | |
3493 | | - | |
3494 | | - | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
3495 | 3511 | | |
3496 | 3512 | | |
3497 | 3513 | | |
| |||
3946 | 3962 | | |
3947 | 3963 | | |
3948 | 3964 | | |
3949 | | - | |
| 3965 | + | |
3950 | 3966 | | |
3951 | 3967 | | |
3952 | 3968 | | |
3953 | 3969 | | |
3954 | 3970 | | |
3955 | 3971 | | |
| 3972 | + | |
3956 | 3973 | | |
3957 | 3974 | | |
3958 | 3975 | | |
| |||
4014 | 4031 | | |
4015 | 4032 | | |
4016 | 4033 | | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
4017 | 4039 | | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
| 4048 | + | |
| 4049 | + | |
4018 | 4050 | | |
4019 | 4051 | | |
4020 | 4052 | | |
| |||
4033 | 4065 | | |
4034 | 4066 | | |
4035 | 4067 | | |
4036 | | - | |
| 4068 | + | |
4037 | 4069 | | |
4038 | 4070 | | |
4039 | 4071 | | |
| |||
4367 | 4399 | | |
4368 | 4400 | | |
4369 | 4401 | | |
4370 | | - | |
4371 | | - | |
| 4402 | + | |
4372 | 4403 | | |
4373 | 4404 | | |
4374 | 4405 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
991 | | - | |
| 991 | + | |
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
| 725 | + | |
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments