Hi,
I'm using api-platform 2.5 with old version of the Swagger. I have some custom route defined with this doc : https://api-platform.com/docs/v2.5/core/jwt/ . Since I upgrade to 2.6 version of Api-platform I need to change my route to OpenApi.
Thanks for your help !
The example use the new PHP8 syntax : https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments
Of course, every body is already in PHP8 :-( !
I try to do a working example but it is awful. Is it possible to add the setters ? We can in this case use ->setPost(), ->setGet() and al to define cleanly the content ?
We can use the withPost(), but it return a clone of the PathItem object. If we use the setters, we can return $this, and chain the definitions
Here a working version :
JwtDecorator.php.zip
@dominiquefournier Thanks a lot ! Its working perfectly
@dominiquefournier Thanks !
Most helpful comment
The example use the new PHP8 syntax : https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments
Of course, every body is already in PHP8 :-( !
I try to do a working example but it is awful. Is it possible to add the setters ? We can in this case use ->setPost(), ->setGet() and al to define cleanly the content ?
We can use the withPost(), but it return a clone of the PathItem object. If we use the setters, we can return $this, and chain the definitions
Here a working version :
JwtDecorator.php.zip