jdesrosiers / silex-swagger-provider

A silex service provider that integrates swagger-php into silex
MIT License
21 stars 10 forks source link

Error "Expecting an options-array for getResourceList()" #4

Closed ideovitra closed 11 years ago

ideovitra commented 11 years ago

Hi there,

I'm trying to use the swagger provider but I get an error and I don't know how to correct this. Here is the debug message : in vendor/jdesrosiers/silex-swagger-provider/src/JDesrosiers/Silex/Provider/SwaggerServiceProvider.php line 71 at SwaggerServiceProvider->getResourceList(object(Application), object(Request))

in vendor/zircote/swagger-php/library/Swagger/Swagger.php line 96 at Swagger->getResourceList(true, false)

in /vendor/zircote/swagger-php/library/Swagger/Swagger.php line 597 at Swagger::parseOptions(true, array('prefix' => '/', 'suffix' => '', 'basePath' => null, 'apiVersion' => null, 'swaggerVersion' => '1.2', 'output' => 'array', 'json_pretty_print' => true))

Any clue? Hope you can help! Thanks in advance.

jdesrosiers commented 11 years ago

Looks like a new version of swagger-php was released a few days ago and it's not backward compatible with the previous version. I'll update the composer requirements immediately so others don't run into the same issue. I should have the code updated to support the new version soon as well.

ideovitra commented 11 years ago

great, it works now. I can start adding others annotations and see... Be careful: it seems that swagger-php has also changed "httpMethod" into "method" in the next version. Have a look on that when you'll do the support with the new version.

Thanks!

From: Jason Desrosiers notifications@github.com To: jdesrosiers/silex-swagger-provider silex-swagger-provider@noreply.github.com, Cc: ideovitra s.valette@ideovitra.com Date: 22/10/2013 02:29 Subject: Re: [silex-swagger-provider] Error "Expecting an options-array for getResourceList()" (#4)

Looks like a new version of swagger-php was released a few days ago and it's not backward compatible with the previous version. I'll update the composer requirements immediately so others don't run into the same issue. I should have the code updated to support the new version soon as well. — Reply to this email directly or view it on GitHub.

jdesrosiers commented 11 years ago

Yes, swagger-php version 0.8 now supports swagger 1.2 so I have a few updates to make. Thanks for bringing this to my attention!

jdesrosiers commented 11 years ago

Version v1.1.0 has been released. This version supports swagger-php version 0.8 and swagger 1.2.