Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[PHP] Default headers should be configurable

Open Beginner friendly
#623 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
api

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.

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.

See: https://github.com/swagger-api/swagger-codegen-generators/blob/458be6c0da3a6d7f7d4049f60d8f21cb1edf163b/src/main/resources/handlebars/php/HeaderSelector.mustache#L41

Dominant language
Mustache
Stars
299
Forks
439
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from swagger-api/swagger-codegen-generators

All issues in swagger-api/swagger-codegen-generators

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.