Commit b634273
authored
OneOfImplementorAdditionalData.addToImplementor used putIfAbsent + List.add
on the model's x-implements vendor extension. When a oneOf member schema
already declares x-implements in the spec, the parsed value is a scalar
string or an immutable list, so appending the oneOf interface threw
java.lang.UnsupportedOperationException during model post-processing.
Normalize the existing value into a fresh mutable list (preserving any
user-supplied interfaces) before appending. No behavior change for models
without a pre-existing x-implements.
1 parent c7d1e10 commit b634273
2 files changed
Lines changed: 24 additions & 2 deletions
File tree
- modules/openapi-generator/src
- main/java/org/openapitools/codegen/utils
- test/java/org/openapitools/codegen/java/spring
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
110 | | - | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7995 | 7995 | | |
7996 | 7996 | | |
7997 | 7997 | | |
| 7998 | + | |
| 7999 | + | |
| 8000 | + | |
| 8001 | + | |
| 8002 | + | |
| 8003 | + | |
| 8004 | + | |
| 8005 | + | |
| 8006 | + | |
| 8007 | + | |
| 8008 | + | |
| 8009 | + | |
| 8010 | + | |
7998 | 8011 | | |
7999 | 8012 | | |
8000 | 8013 | | |
| |||
0 commit comments