Response without schema
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- openapi, typescript
- Domain
- api
Research direction
Start in worker.js at getType and getParsedSchema, using the response configuration shown in the issue with the schema omitted or set to null. Reproduce the TypeError, then verify that a response with no returned schema is accepted and no empty JSON schema is rendered.
Written by the indexing model from the issue text.
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
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.
- Dominant language
- TypeScript
- Stars
- 777
- Forks
- 74
- Avg merge
- 16h 30m
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/chanfana
-
Hono path parameters with a regex pattern keep the pattern in the OpenAPI pathPossibly taken @0z5a claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cloudflare/chanfana#400 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cloudflare/chanfana#287 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
cloudflare/chanfana#345 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
cloudflare/chanfana#336 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
cloudflare/chanfana#285 ·
Maintainers usually reply within 1 day
All issues in cloudflare/chanfana
Similar issues
-
kind:defect
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mux-labs/mux-frontend#1240 ·
Maintainers usually reply within 1 day
-
area: agents-mcp priority: normal
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Wait for the IDS correction dialog to settle in the stale-audit testPossibly taken @louistrue claimed this today. Openready
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Top-bar LanguagePicker: a failed language save rolls back silentlyPossibly taken @ShivamJuyal24 claimed this today. Openaccessibility admin bug
Difficulty 2/5 Half a day Newbie friendliness 70/100
endora-commerce/endora-commerce#1769 · 1 comment ·
Maintainers usually reply within 1 day