Open cebe opened 5 years ago
I've encountered the same issue. The problem is that it parses only arrays while getSerializableData()
return stdClass
es.
I'm using typical trick from js world:
Yaml::dump(
json_decode(json_encode($openApiSpec->create()->getSerializableData()), true),
flags: Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE
)
While trying to add more tests for more specs from these sources:
I found that symfony YAML fails on a lot of these. We either need an alternative YAML parser or improve symfony YAML to not fail.