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(laravel): entrypoint serialization #6541

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Aug 22, 2024

Q A
Branch? main
Tickets n/a
License MIT
Doc PR n/a

The jsonapi format weren't working. This patch fixes the issue.

@@ -37,13 +37,13 @@ public function __construct(
private readonly ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, this class should probably be undeprecated as it is now used again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we just copy that class to the Laravel directory?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you wish

@@ -37,13 +37,13 @@ public function __construct(
private readonly ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory,
private readonly ProviderInterface $provider,
private readonly ProcessorInterface $processor,
private readonly array $documentationFormats = []
private readonly array $documentationFormats = [],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely a bug in Symfony variant. AFAIU, formats should be injected here, not docs_formats.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed both implementation are not necessary the same

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Laravel has no differenciation between both formats yet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be cool to be able to render SwaggerUI when requesting /api as we do for the Symfony variant.

@dunglas dunglas force-pushed the fix/entrypoint-serialization branch from 7f29f81 to bd251c4 Compare August 23, 2024 10:19
@dunglas dunglas force-pushed the fix/entrypoint-serialization branch from bd251c4 to d50abd9 Compare August 23, 2024 12:51
@dunglas dunglas merged commit ebc61d5 into api-platform:main Aug 23, 2024
56 of 59 checks passed
@dunglas dunglas deleted the fix/entrypoint-serialization branch August 23, 2024 14:11
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.

2 participants