cloudflare / cloudflare/chanfana
Response without schema
- Dominant language
- TypeScript
- Stars
- 766
- Forks
- 70
- Avg merge
- 25m
- Merged PRs (30d)
- 4
Description
Is it possible to define a response that has no schema, e.g. for return an error?
Currently, the schema needs to be set, for example like
```js
responses: {
'415': {
description: 'Not supported',
schema: {}
}
}
```
which renders an empty json object in the schema on the documentation page.
Omitting the schema or setting it to null fails with
> Uncaught TypeError: Cannot read properties of undefined (reading 'generated')
at worker.js:268:20 in getType
at worker.js:265:126 in x
at worker.js:327:5 in j
at worker.js:442:20 in getParsedSchema
at worker.js:393:21
at worker.js:709:8
It would be nice if one could represent that nothing gets returned.
Contributor guide
Assessment
This issue has not been assessed yet.