Skip to content

chore(docs): split Read examples in README to separate sections#31

Merged
rhamzeh merged 2 commits into
openfga:mainfrom
akj2018:patch-1
Jun 13, 2023
Merged

chore(docs): split Read examples in README to separate sections#31
rhamzeh merged 2 commits into
openfga:mainfrom
akj2018:patch-1

Conversation

@akj2018

@akj2018 akj2018 commented Jun 12, 2023

Copy link
Copy Markdown
Contributor

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

linux-foundation-easycla Bot commented Jun 12, 2023

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@rhamzeh rhamzeh left a comment

Copy link
Copy Markdown
Member

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

rhamzeh commented Jun 12, 2023

Copy link
Copy Markdown
Member

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

akj2018 commented Jun 13, 2023

Copy link
Copy Markdown
Contributor Author

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

@rhamzeh rhamzeh left a comment

Copy link
Copy Markdown
Member

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