Commit d7355ec
committed
fix: sttp4 json4s JsonSupport uses sealed trait serializers instead of Enumeration-based EnumNameSerializer
The json4s variant of JsonSupport.scala used EnumNameSerializer which
expects Scala Enumeration types, but sttp4 model templates generate
sealed traits with case objects for enums. This caused compilation
errors since the types are incompatible.
Replace EnumNameSerializer with direct references to the implicit
Serializer objects already defined in each enum's companion object.1 parent cabdbe6 commit d7355ec
2 files changed
Lines changed: 4 additions & 50 deletions
File tree
- modules/openapi-generator/src/main/resources/scala-sttp4
- samples/client/petstore/scala-sttp4/src/main/scala/org/openapitools/client/core
Lines changed: 2 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 13 | + | |
| 14 | + | |
38 | 15 | | |
39 | 16 | | |
40 | 17 | | |
| |||
Lines changed: 2 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 20 | + | |
| 21 | + | |
45 | 22 | | |
46 | 23 | | |
47 | 24 | | |
| |||
0 commit comments