You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[PHP] Invalid classes generated if models start with a digit #2392
Apparently this works fine in some languages but for the PHP client it generates invalid classnames since PHP classes are not allowed to start with a digit:
/** * 400ResponseModel Class Doc Comment * * @category Class * @description * @package Supplier\Cybersource * @author http://github.com/swagger-api/swagger-codegen * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2 * @link https://github.com/swagger-api/swagger-codegen */class400ResponseModel implements ArrayAccess
{
/** * Array of property to type mappings. Used for (de)serialization * @var string[] */static$swaggerTypes = array(
/* ... */
Thanks. This looks like a good solution. I am not really sure how I can get the master .jar file? I used the wagger-codegen-cli-2.1.5.jar from the maven repos before.
git clone https://github.com/swagger-api/swagger-codegen.git
cd swagger-codegen
mvn package
ls ./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar
Activity
wing328 commentedon Mar 16, 2016
@willemstuursma thanks for reporting the issue. Similar to reserved keyword, we'll prepend "Model" to to the model name that starts with number.
wing328 commentedon Mar 16, 2016
The fix has been merged into master. Please pull the latest and give it a try.
willemstuursma commentedon Mar 18, 2016
Thanks. This looks like a good solution. I am not really sure how I can get the master .jar file? I used the wagger-codegen-cli-2.1.5.jar from the maven repos before.
wing328 commentedon Mar 19, 2016
@willemstuursma please do the following