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

Support API Platform and multiple response content types #655

Merged
merged 2 commits into from Sep 21, 2022

Conversation

warmwaterkruik
Copy link

@warmwaterkruik warmwaterkruik commented Sep 20, 2022

Support API Platform and multiple response content types: application/ld+json application/hal+json application/vnd.api+json content types through optional accept headers.

  • The previous apip-demo.json schema contained old invalid references. Fixed with latest demo.json schema
  • The client endpoint methods will now accept an optional array $accept parameter if there are multiple content types available as a response. API Platform can return ld+json or hal+json responses based on the Accept header.
  • The endpoint response body transfer will now transform LdJson and HalJson json responses into concrete objects based on the response content type.

Copy link
Member

@Korbeil Korbeil left a comment

Choose a reason for hiding this comment

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

It looks really good !
I will make a test on a code-base I have at work to make sure everything is fine since there is a lot of impactful changes. And I'll merge that if it's good.

Could you add a line in CHANGELOG.md file about your PR please ? :)

…al+json application/vnd.api+json content types through optional accept headers.
@warmwaterkruik
Copy link
Author

It looks really good ! I will make a test on a code-base I have at work to make sure everything is fine since there is a lot of impactful changes. And I'll merge that if it's good.

Could you add a line in CHANGELOG.md file about your PR please ? :)

thank you! I added the line to the changelog.

@Korbeil Korbeil merged commit 1dd59b1 into janephp:next Sep 21, 2022
@warmwaterkruik warmwaterkruik deleted the feat/api-platform branch September 22, 2022 07:55
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.

None yet

2 participants