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(docs): split Read examples in README to separate sections #31

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

akj2018
Copy link
Contributor

@akj2018 akj2018 commented Jun 12, 2023

Description

Edited README.md to create separate code blocks for Read Relationship Tuples example.

References

OpenFGA RFC
Contributing to OpenFGA

Closes #26

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Edited README.md to create separate code blocks for Read Relationship Tuples example.
@akj2018 akj2018 requested a review from a team as a code owner June 12, 2023 08:02
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 12, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@rhamzeh rhamzeh left a comment

Choose a reason for hiding this comment

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

Thanks @akj2018

You probably need to duplicate this part across all the code blocks:

response = await api_instance.read(body)
# response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})

@rhamzeh
Copy link
Member

rhamzeh commented Jun 12, 2023

Also, looking at it now, the three above code blocks should read:

body = ReadRequest(...)
instead of
body = TupleKey(...)

Mind doing that change too?

@rhamzeh rhamzeh changed the title fix: Update README.md #26 chore(docs): split Read examples in README to separate sections Jun 12, 2023
…les (openfga#31)

Edited README.md to create separate code blocks for Read Relationship Tuples example with following structure

body = ReadRequest(...)
response = await api_instance.read(body)
response = ReadResponse({"tuples": [Tuple({"key": TupleKey({"user":"...","relation":"...","object":"..."}), "timestamp": datetime.fromisoformat("...") })]})
@akj2018
Copy link
Contributor Author

akj2018 commented Jun 13, 2023

Hi @rhamzeh, thanks for letting me know. I have made the required changes in my latest commit.

Copy link
Member

@rhamzeh rhamzeh left a comment

Choose a reason for hiding this comment

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

Thanks @akj2018 !

@rhamzeh rhamzeh merged commit bb7b745 into openfga:main Jun 13, 2023
adriantam added a commit to openfga/sdk-generator that referenced this pull request Jun 22, 2023
adriantam added a commit to openfga/sdk-generator that referenced this pull request Jun 23, 2023
* fix(python-sdk): correct README

Implement changes for openfga/python-sdk#32 and
openfga/python-sdk#31
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.

README: use different code block for different read API configuration
2 participants