Commit 2840e08
authored
Remove redundant Equatable conformances in code generation (#214)
### Motivation
Fixes #210.
### Modifications
With this PR. we are removing the explicit `Equatable` conformance when
a type already conforms to `Hashable`
in generated code.
### Result
Generated types now conforms explicitly to `Hashable` but not to
`Equatable`.
```diff
- public struct Generated: Equatable, Hashable {
}
+ public sutrct Generated: Hashable {
}
```
### Test Plan
I have updated the reference ressources used by tests to check generated
code.1 parent a0333f6 commit 2840e08
File tree
7 files changed
+292
-301
lines changed- Sources/_OpenAPIGeneratorCore
- Translator
- CommonTypes
- Content
- Tests/OpenAPIGeneratorReferenceTests
- Resources/ReferenceSources
- Petstore_FF_MultipleContentTypes
- Petstore
7 files changed
+292
-301
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
| |||
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
157 | | - | |
158 | 156 | | |
159 | 157 | | |
160 | 158 | | |
| |||
208 | 206 | | |
209 | 207 | | |
210 | 208 | | |
211 | | - | |
212 | 209 | | |
213 | 210 | | |
214 | 211 | | |
| |||
225 | 222 | | |
226 | 223 | | |
227 | 224 | | |
228 | | - | |
229 | 225 | | |
230 | 226 | | |
231 | 227 | | |
| |||
239 | 235 | | |
240 | 236 | | |
241 | 237 | | |
242 | | - | |
243 | 238 | | |
244 | 239 | | |
245 | 240 | | |
| |||
249 | 244 | | |
250 | 245 | | |
251 | 246 | | |
252 | | - | |
253 | 247 | | |
254 | 248 | | |
255 | 249 | | |
| |||
272 | 266 | | |
273 | 267 | | |
274 | 268 | | |
275 | | - | |
276 | 269 | | |
277 | 270 | | |
278 | 271 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
Lines changed: 117 additions & 118 deletions
Large diffs are not rendered by default.
Lines changed: 116 additions & 117 deletions
Large diffs are not rendered by default.
Lines changed: 56 additions & 56 deletions
Large diffs are not rendered by default.
0 commit comments