fix(docs): use relation 'reader' instead of 'can_view' in perform-check.mdx#1022
Open
maxloge wants to merge 1 commit intoopenfga:mainfrom
Open
fix(docs): use relation 'reader' instead of 'can_view' in perform-check.mdx#1022maxloge wants to merge 1 commit intoopenfga:mainfrom
maxloge wants to merge 1 commit intoopenfga:mainfrom
Conversation
71eadcb to
ea75a56
Compare
ea75a56 to
77c7488
Compare
Member
|
Thanks @maxloge - will take a look at this soon! |
77c7488 to
6275cad
Compare
…date-tuples The perform-check.mdx example was using relation 'can_view', but the update-tuples page creates relation 'reader'. This brings the two getting-started examples into sync and prevents the ValidationException.
74afce8 to
292594c
Compare
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.
Description
The "Getting Started" use inconsistent relationship names between the
Update Relationship TuplesandPerform a Checksections:update-tuples.mdxreaderperform-check.mdxcan_viewSomeone who follows the instructions in order will receive a
400 Bad Request / ValidationExceptionwhen calling the Check API, even though the example in the doc claims that the result isallowed: true.A user following the example in Python with
would get the following Traceback:
I've also updated the explanation regarding the result since:
returns
returns
and
returns
Fix
In
perform-check.mdx, change the example relation fromcan_viewtoreaderso it matches the tuple created in the previous page and the relation that is used in the other pages of theGetting Startedsection of the documentation.After the fix, the end-to-end example executed by a user reading the documentation linearly using the instructions of the precedent page will works as expected.
The explanation below the example regarding the expected result has also been updated to be more specific.
References
The mismatch is visible on these pages:
Review Checklist
main