Commit 39b5e3c
authored
fix: filter invalid request bodies (#348)
whilst implementing better support for non-JSON content-types, I
realized that the stripe api defines a bunch of meaningless requests
bodies on their `GET` / `DELETE` requests that look like this:
```yaml
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
properties: {}
type: object
required: false
```
which is basically an `object` with no `properties` and no
`additionalProperties` allowed.
I'd probably have just ignored this, but the combination of this with
`application/x-www-form-urlencoded` meant it complicated adding support
for encoding bodies using `URLSearchParams`
I've raised stripe/openapi#170 but for now
lets just skip these and log a warning.1 parent 958c88b commit 39b5e3c
10 files changed
Lines changed: 2013 additions & 14590 deletions
File tree
- integration-tests
- typescript-angular/src/generated/stripe.yaml
- typescript-axios/src/generated/stripe.yaml
- typescript-express/src/generated/stripe.yaml
- typescript-fetch/src/generated/stripe.yaml
- typescript-koa/src/generated/stripe.yaml
- packages/openapi-code-generator/src/typescript
- client
- common
- server
Lines changed: 4 additions & 1994 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 281 additions & 1967 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 562 additions & 3275 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 606 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 562 additions & 2991 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 562 additions & 3169 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 582 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
| |||
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
241 | 239 | | |
242 | 240 | | |
243 | 241 | | |
| |||
263 | 261 | | |
264 | 262 | | |
265 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
266 | 277 | | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| 269 | + | |
268 | 270 | | |
| 271 | + | |
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
276 | 290 | | |
277 | 291 | | |
278 | 292 | | |
| |||
0 commit comments