Commit 481c690
authored
[Rust] Fix enum variant name generation (#20689)
* Regression test for enum Name generation in oneOf
where variants would end up having the same name.
* Fix enum variant name generation
Datatypes like `Vec<foo::bar::Baz>` would end up as `Baz` instead of `VecOfBaz`1 parent 57b1c91 commit 481c690
3 files changed
Lines changed: 58 additions & 3 deletions
File tree
- modules/openapi-generator/src
- main/java/org/openapitools/codegen/languages
- test/resources/3_0/rust-axum
- samples/server/petstore/rust-axum/output/rust-axum-oneof/src
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
618 | | - | |
619 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
620 | 621 | | |
621 | 622 | | |
622 | 623 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
| 935 | + | |
935 | 936 | | |
936 | 937 | | |
937 | 938 | | |
| |||
940 | 941 | | |
941 | 942 | | |
942 | 943 | | |
| 944 | + | |
943 | 945 | | |
944 | 946 | | |
945 | 947 | | |
| |||
953 | 955 | | |
954 | 956 | | |
955 | 957 | | |
| 958 | + | |
956 | 959 | | |
957 | 960 | | |
958 | 961 | | |
| |||
972 | 975 | | |
973 | 976 | | |
974 | 977 | | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
975 | 983 | | |
976 | 984 | | |
977 | 985 | | |
| |||
983 | 991 | | |
984 | 992 | | |
985 | 993 | | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
0 commit comments