Skip to content
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

Symfony YAML does not parse all YAML #21

Open
cebe opened this issue Apr 25, 2019 · 3 comments
Open

Symfony YAML does not parse all YAML #21

cebe opened this issue Apr 25, 2019 · 3 comments

Comments

@cebe
Copy link
Owner

cebe commented Apr 25, 2019

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.

@cebe
Copy link
Owner Author

cebe commented Nov 26, 2019

@simPod
Copy link
Contributor

simPod commented Apr 7, 2021

I've encountered the same issue. The problem is that it parses only arrays while getSerializableData() return stdClasses.

@simPod
Copy link
Contributor

simPod commented Apr 7, 2021

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
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants