Skip to content

Conversation

@mnahkies
Copy link
Owner

  • 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 generation

mnahkies added 5 commits July 22, 2025 12:27
- 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 clearer to the user.
@mnahkies mnahkies enabled auto-merge (squash) July 22, 2025 13:08
@mnahkies mnahkies merged commit 7808634 into main Jul 22, 2025
6 checks passed
@mnahkies mnahkies deleted the mn/fix/identify-unsupported-bodies branch July 22, 2025 13:13
mnahkies added a commit that referenced this pull request Oct 18, 2025
after #349 the integration tests no longer pass when using `joi` as the
schema builder, due to:
```
TS2322: Type any is not assignable to type never
```

add an explicit `as never` cast in these instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants