swagger-api / swagger-api/swagger-codegen-generators
[PHP] Default headers should be configurable
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
At present there's no way to inject default headers. There are instances when you may wish to include additional headers that aren't defined by the Swagger Documentation, perhaps for debugging or slight differences in API flows.
The default empty $headers array should be configurable.
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 with src/main/resources/handlebars/php/HeaderSelector.mustache at line 41, where the default empty headers array is defined. Trace how this template is used for generated PHP clients and verify that the resulting clients can accept additional default headers without losing documented headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100