swagger-api / swagger-api/swagger-codegen
[PHP] Use servers variables
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Trying to find out how to use the server variables in the generated client. The server section in the yaml is:
servers:
- url: https://{environment}.relaypay.io/api/v1
variables:
environment:
enum:
- sandbox-api
- api
default: sandbox-api
Is there a way to specify the variables somehow in the generated PHP client?
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 examining how the generated PHP client handles the OpenAPI servers section and its variables entry. Confirm whether the client can select sandbox-api or api for environment, and document or implement the supported way to specify that value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100