Skip to content

Merge 2.6 #4111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 4, 2021
Merged

Merge 2.6 #4111

merged 10 commits into from
Mar 4, 2021

Conversation

alanpoulain
Copy link
Member

No description provided.

WybrenKoelmans and others added 10 commits March 1, 2021 18:19
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)
);
```
Hello, i just add the return type for method `getPaths`

Co-authored-by: Abdouni Abdelkarim <[email protected]>
…asier to add new strategies to classes inheriting from SearchFilter class (api-platform#3541)
@alanpoulain alanpoulain merged commit 781dce7 into api-platform:main Mar 4, 2021
@alanpoulain alanpoulain deleted the merge-2.6 branch March 4, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants