You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After disabling itemOperation `GET`
```
itemOperations: [
'get' => [
'controller' => ApiPlatform\Core\Action\NotFoundAction::class,
'read' => false,
'output' => false,
],
]
```
there is not nice way to remove that path from OpenApi docs. Now to do
that you have to write:
```
$pathItem = $openApi->getPaths()->getPath('/resource/{id}');
$openApi->getPaths()->addPath(
'/resource/{id}',
new Model\PathItem(
$pathItem->getRef(),
$pathItem->getSummary(),
$pathItem->getDescription(),
null,
$pathItem->getPut(),
$pathItem->getPost(),
$pathItem->getDelete(),
$pathItem->getOptions(),
$pathItem->getHead(),
$pathItem->getPatch(),
$pathItem->getTrace(),
$pathItem->getServers(),
$pathItem->getParameters(),
)
);
```
After change it will be:
```
$pathItem = $openApi->getPaths()->getPath('/resource/{id}');
$openApi->getPaths()->addPath(
'/resource/{id}',
$pathItem->withGet(null)
);
```
0 commit comments