Commit 7808634
authored
fix: improve request body / content-type handling (#349)
- instead of using the first `requestBody` `content-type`,
search for the first supported one.
- when none are currently supported, output a `never` type,
and a `todo` comment to make this clear to the user.
- subsequent changes to support for `text/plain`,
`application/x-www-form-urlencoded`, `application/octet-stream` and
`multipart/form-data` are planned to follow reasonably quickly, but they
might not become supported for every template at once, and this feels
like a fairer representation
- also start cleaning integration tests before generation1 parent 91a9939 commit 7808634
File tree
69 files changed
+29743
-204471
lines changed- e2e/src/generated/client
- axios
- fetch
- integration-tests
- typescript-angular
- src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- petstore-expanded.yaml
- stripe.yaml
- todo-lists.yaml
- typescript-axios
- src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- petstore-expanded.yaml
- stripe.yaml
- todo-lists.yaml
- typescript-express
- src/generated
- api.github.com.yaml
- okta.oauth.yaml
- stripe.yaml
- todo-lists.yaml
- typescript-fetch
- src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- petstore-expanded.yaml
- stripe.yaml
- todo-lists.yaml
- typescript-koa/src/generated
- api.github.com.yaml
- okta.oauth.yaml
- stripe.yaml
- todo-lists.yaml
- packages/openapi-code-generator/src
- core
- typescript
- client
- typescript-angular
- typescript-axios
- typescript-fetch
- common
- schema-builders
- server
- typescript-express
- typescript-koa
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+29743
-204471
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments