Note that REST filter examples need populate to surface traversed relations#3144
Open
singhvishalkr wants to merge 1 commit intostrapi:mainfrom
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two open issues report the same root cause on the same page:
author.namebut the response example only shows the book's own attributes (name,date), with noauthorfield anywhere.chef.restaurants.stars, but the response example only shows the restaurant's ownnameandstars.Both are correct: the bare REST response does not include relations unless they are populated, so the example output reads as if the filter never matched on those keys.
Where
docusaurus/docs/cms/api/rest/filters.md, immediately after the existing response example in each section. The two sections already have a generic:::notementioning that relations are not populated by default; the new notes are scoped to "this specific example" and link to the populate docs with a copy-pasteable parameter.Diff intent
:::noteafter the Complex filtering response example pointing to&populate=author.:::noteafter the Deep filtering response example pointing to&populate[chef][populate][restaurants]=true.Closes #2066
Closes #2067