sphinx-contrib / sphinx-contrib/openapi
HTTP response codes - cannot be like '4XX', must be integer or start with an integer
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 126
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
Whilst the openapi spec allows HTTP codes for responses objects to be of type 2XX or 4XX (link) indicating a range of codes, this sphinx contrib seems unable to use those response codes appearing in a spec, with a warning:
(ERROR/3) HTTP status code must be an integer (e.g. 200) or start with an integer (e.g. 200 OK); <#text: '4XX'> is invalid
Not sure if the issue originates in the sphinxcontrib.openapi or in a dependency.
Way to reproduce: use an openapi.yaml spec with something like this in its paths:
paths:
/myendpoint:
post:
requestBody:
...
responses:
'4XX':
description: ...
content:
...
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Reproduce the warning with the OpenAPI YAML example in the issue, then trace the response-code validation or rendering entry point that emits it. Compare the accepted keys with the OpenAPI 3.0.2 Responses Object rules. Done means response keys such as 4XX are accepted without the invalid-status warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100