swagger-api / swagger-api/swagger-codegen

php error syntax

Open
#9,153 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

I generate a PHP client using the configiration file: https://data.explore.star.fr/api/v2/swagger.json.
There are a few syntax errors on generated PHP classes.

On "Api/DatasetApi.php" and "Api/OdsApi.php"

Errors are always the same: a missing "," on parameters.
Example: "sendDatasetFeedback($body$source" instead of "sendDatasetFeedback($body,$source"

Swagger-codegen version

Version 3.0.4

Contributor guide

Open the contributing guide

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.

Research direction

Reproduce generation with the linked Swagger configuration and inspect Api/DatasetApi.php and Api/OdsApi.php, focusing on the generated method parameter lists. Trace those outputs back to the relevant generator template or entry point, then verify that generated PHP methods contain commas between parameters and no syntax errors remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.