swagger-api / swagger-api/swagger-codegen-generators
Problem in generating PHP client.
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
I am testing DISCRIMINATOR functionality and find out that this line is not correctly converted to final source.
$subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator};
I am using version 3.0.11
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 at src/main/resources/mustache/php/ObjectSerializer.mustache around line 286 and reproduce the discriminator generation problem with swagger-codegen-generators 3.0.11. Inspect the generated PHP client to determine the expected conversion of the referenced template expression; done means discriminator handling produces valid PHP source. No test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100