OAI / OAI/OpenAPI-Specification
Share header with multiple response objects
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 31.2k
- Forks
- 9.2k
- Avg merge
- 6h 37m
- Merged PRs (30d)
- 27
Description
Can there not just be a simple header generically at the response level not specific to each of the status codes? For our case, this kind of header is 99% the same across our codebase.
---
responses:
200:
description: no error
headers:
Content-Type:
description: application/json
type: string
It would be a pain to copy+paste this to each and every routine that supports HTTP JSON responses.
Contributor 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.
Research direction
Start by reading the response object rules in the OpenAPI Specification repository and compare how headers are currently defined under individual status codes. Define the valid scope and structure for a shared response-level header, then update the relevant specification text and examples so the feature's behavior is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100