swagger-api / swagger-api/swagger-codegen-generators
[PHP] [ObjectSerializer] Call to undefined method stdClass::swaggerFormats()
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I wanna build php client for Flagr. There are some models that have property with JSON object.
It may look like this:
{
"prop1": {
"prop2": {
"prop3": "propValue"
}
}
}
So, when I try to serialize this model, then I catch Exception:
Call to undefined method stdClass::swaggerFormats() at ...flagr-php-client/lib/ObjectSerializer.php:65
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/ObjectSerializer.php:65 and reproduce serialization of a model containing the nested JSON object shown in the report. Trace why the nested stdClass is treated as requiring swaggerFormats(), then verify that serializing this model completes without the undefined-method exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100