Skip to content

Non singleValue value objects as query parameters are not handled correctly yet #11

@mficzel

Description

@mficzel

If a value object is used as query parameter the generated openapi spec will lead swagger ui to pass each property ob the value object as single parameter.

VO

final readonly class Person
{
    public function __construct(
        public string $firstName,
        public string $lastName,
    ) {
    }
}

controller action

    public function personAction(
        Person $person
    ): PersonResponse {
    }

generated ur by swagger ui: path?firstName=foo&lastName=bar
expected uri: path?person[firstName]=foo&person[lastName]=bar | path?person={"firstName":"foo", "lastName":"bar"}

I am pretty sure the generated uris are not correct but cannot say which of the correctish ones should be expected.

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