PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.11k stars 4.79k forks source link

AbstractCQRSOperation constructor #36660

Open clement-hvt opened 2 months ago

clement-hvt commented 2 months ago

Prerequisites

Describe the bug and add attachments

Hi, I think there is a mistake in the constructor of AbstractCQRSOperation. The openapi constructor parameter allow only boolean type but the inherited class allow bool|OpenApiOperation|null $openapi = null.

Expected behavior

We can set the openapi parameter with the class ApiPlatform\OpenApi\Model\Operation to specify many things like request body.

Steps to reproduce

Add an openapi property to an existing ApiPlatform ressource in the module ps_apiresource. You can take the example here : https://api-platform.com/docs/core/openapi/#changing-operations-in-the-openapi-documentation.

PrestaShop version(s) where the bug happened

9.0.0

PHP version(s) where the bug happened

8.1

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

Soledis

florine2623 commented 2 months ago

ping @PrestaShop/tech-council maybe @jolelievre this would interest you ^^