Skip to content
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

fix: entrypoint for OpenAPI #5863

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Action/EntrypointAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
$context = ['request' => $request];
$operation = new Get(outputFormats: $this->documentationFormats, read: true, serialize: true, class: Entrypoint::class, provider: fn () => new Entrypoint($this->resourceNameCollectionFactory->create()));
$body = $this->provider->provide($operation, [], $context);
// see https://github.com/api-platform/core/issues/5845#issuecomment-1732400657
if ($request && ($apiOperation = $request->attributes->get('_api_operation'))) {
$operation = $apiOperation;

Check warning on line 50 in src/Action/EntrypointAction.php

View check run for this annotation

Codecov / codecov/patch

src/Action/EntrypointAction.php#L50

Added line #L50 was not covered by tests
}

return $this->processor->process($body, $operation, [], $context);
}
Expand Down
Loading