Skip to content

Empty SecurityRequirement in YAML file #46

Closed
@NukeBoy

Description

@NukeBoy

When trying to write a Security Requirement object to a YAML file:
$openapi->security = [new SecurityRequirement(['Bearer' => []])];
The result is:

security:
        -
          Bearer: {  }

When expected:

security:
        -
          Bearer: []

When writing to a JSON file, everything is fine:

"security": [
    {
         "Bearer": []
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds investigationWork is needed to figure out the root cause of the problem.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions