Skip to content

[Swagger][Bug] swagger:export --yaml doesn't work as expected #2115

@dkarlovi

Description

@dkarlovi

If you use --yaml, the nested resources will not get dumped since they're not array but objects.

If I do:

        $content = $input->getOption('yaml')
            ? Yaml::dump(json_decode(json_encode($data), true))
            : json_encode($data, JSON_PRETTY_PRINT);

as a quick hack, it works as expected. Is this a bug in Yaml or should we workaround this here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions