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

chore: content-api response format header #19675

Merged
merged 2 commits into from Mar 5, 2024

Conversation

alexandrebodin
Copy link
Member

What does it do?

Add a header to get a response format following v4 old shape to ease v5 migration.

Why is it needed?

To help with migrating to v5

How to test it?

Call the content-api (only affects core-api) with a Strapi-Response-Format: v4 header to get the old format

Related issue(s)/PR(s)

Let us know if this is related to any issue/pull request

@alexandrebodin alexandrebodin added pr: chore This PR contains chore tasks (cleanups, configs, tooling...) source: core:core Source is core/core labels Mar 4, 2024
@alexandrebodin alexandrebodin added this to the 5.0.0 milestone Mar 4, 2024
@alexandrebodin alexandrebodin self-assigned this Mar 4, 2024
@alexandrebodin alexandrebodin marked this pull request as ready for review March 4, 2024 21:48
@joshuaellis
Copy link
Member

Should we be logging a warning if you use the v4 system and flag it as deprecated?

Base automatically changed from v5/doc-service-unified-code to v5/main March 5, 2024 08:19
@alexandrebodin
Copy link
Member Author

Should we be logging a warning if you use the v4 system and flag it as deprecated?

I don't see a good way to log a deprecation here. It's going to be used on the client side and not the server side where it would be logged.
it would also log on each request which is not ideal and I'm not convinced it's worth managing state to log it only once in a while.

And It's probably only going to be mentionned in the migration guide

@alexandrebodin alexandrebodin merged commit 960c8a5 into v5/main Mar 5, 2024
102 checks passed
@alexandrebodin alexandrebodin deleted the v5/v4-response-format branch March 5, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: chore This PR contains chore tasks (cleanups, configs, tooling...) source: core:core Source is core/core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants