OAI / OAI/OpenAPI-Specification
Inconsistency in runtime expression examples for request headers
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 31.2k
- Forks
- 9.2k
- Avg merge
- 6h 37m
- Merged PRs (30d)
- 27
Description
Runtime expression examples include the following:
| Source Location | example expression | notes |
|---|---|---|
| Requested media type | $request.header.accept |
|
| Request parameter | $request.path.id |
Request parameters MUST be declared in the parameters section of the parent operation or they cannot be evaluated. This includes request headers. |
The 2nd example says that headers MUST be defined as parameters. But the 1st example refers to the Accept header which is not allowed in parameters.
Is $request.header.accept is an invalid example? Or are runtime expressions supposed to access any request headers?
Similarly, the section about callback path keys provides an example with the Content-Type header:
$request.header.content-Type application/json
Like Accept, Content-Type is not allowed in parameters. Is this example valid or not?
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
Review the runtime expression examples and the callback path keys section in versions/3.0.0.md, along with the referenced parameters fixed-fields section. First compare the examples with the stated parameter rules. Done means resolving whether the header examples are valid and updating the specification text consistently.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100