nelmio / NelmioApiDocBundle

Generates documentation for your REST API from annotations
MIT License
2.21k stars 828 forks source link

feat(#2297): (Symfony 7.1) Add MapRequestPayload array parameter handling #2298

Closed mazumba closed 1 week ago

mazumba commented 2 weeks ago
Q A
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #2297

With Symfony 7.1, a new type parameter has been introduced for MapRequestPayload that allows array Controller parameters to be resolved. This currently leads to an error when the Describer tries to register a new Model, because the parameter type array is used in this case. To resolve the issue, the given type parameter form the MapRequestPayload should be used instead.

I tried to test this as gracefully as possible. Any more elegant suggestions are welcome!

mazumba commented 2 weeks ago

Not sure if skipping the test is correct in this case. And I noticed that I was maybe a tiny bit too early with this, since 7.1 is fairly fresh 😅

DjordyKoert commented 2 weeks ago

Not sure if skipping the test is correct in this case.

It is 😉

And I noticed that I was maybe a tiny bit too early with this, since 7.1 is fairly fresh 😅

You can't start early enough, thanks a lot!

mazumba commented 2 weeks ago

I would love this to also be merged into the 4.x branch. Do I just create a new PR with 100% successful checks into the 4.x branch?

DjordyKoert commented 1 week ago

Thank you @mazumba :)