Commit beef8a1
Default tags on tag-less webhook operations to avoid NPE
Webhook operations normally omit `tags`, but createOperation requires
one (Objects.requireNonNull), so a realistic tag-less webhook crashed
with a NullPointerException in the default by-url grouping mode - and
was silently skipped in tag-grouping mode. The prior test masked this
by giving the webhook explicit tags.
mergeWebhooksIntoPaths now defaults each webhook operation's tags to the
webhook name when absent/empty, and skips blank keys (guards the
pathUrl.split()[1] grouping). The testWebhooks fixture is updated to the
realistic tag-less shape to cover this.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c6a4ec1 commit beef8a1
3 files changed
Lines changed: 26 additions & 5 deletions
File tree
- multiapi-engine/src
- main/java/com/sngular/api/generator/plugin/openapi/utils
- test/resources/openapigenerator/testWebhooks
- assets
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
121 | 142 | | |
122 | 143 | | |
123 | 144 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments