Skip to content

[PHP][Silex] Generated parameters don't use same naming conventions as path variables #4257

@PisaJan

Description

@PisaJan
Description

PHP SILEX server generator doesn't use same naming conventions for path variables and function parameters.

Eg. like this:

$app->GET('/pet/{petId}', function(Application $app, Request $request, $pet_id)

When trying to GET that URI, you get:

RuntimeException in ControllerResolver.php line 126:
Controller "Closure" requires that you provide a value for the "$pet_id" argument (because there is no default value or because there is a non optional argument after this one).
Swagger-codegen version

swagger: '2.0'
info:
version: 1.0.0
title: PetStore on Heroku

Swagger declaration file content or url

I am using defalt Pet store example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions