-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP client Class '\Swagger\Client\Model\Object' not found #1503
Comments
on commit 7ac91ce |
It looks like bare json ints are getting parsed and set to type Model/Object in the php "phone": { devicemcd gets set to type "string" |
@bthibault do you have the swagger spec that you can share with us to reproduce the issue? please also make sure you're using the latest version (master) FYI. We already have some test cases to cover deserialization: https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/php/SwaggerClient-php/tests/PetApiTest.php#L98 |
swagger spec :
so I guess the problem is $ref: Object cc: @wing328 |
Yes, $ref refers to "Object" which is not defined. May I know how you obtain the Swagger spec? Using some third-party plug-ins? |
spray swagger plugin "com.gettyimages" %% "spray-swagger" % "0.5.1" So this is through Scala / Slick / Spray the items getting defined as $ref: Object are defined by scala case classes as Option[Long] so the Scala option is probably throwing it off. |
I would suggest you to report the issue to https://github.com/gettyimages/spray-swagger/issues. Another approach is you manually update the Swagger spec with properly-defined models. |
Yeah I'm manually updating for now...apparently there is already an open ticket : gettyimages/spray-swagger#31 THanks for helping me track this down. |
i'm getting PHP Fatal error: Class '\Swagger\Client\Model\Object' not found in vendors/SwaggerClient-php/lib/ObjectSerializer.php on line 211
There are nested object types in the return object and I think somehow its looking for a generic Object.
The text was updated successfully, but these errors were encountered: