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

ListRelations docs incorrect #67

Open
6 tasks done
jonathaneckman opened this issue Jul 9, 2024 · 0 comments
Open
6 tasks done

ListRelations docs incorrect #67

jonathaneckman opened this issue Jul 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jonathaneckman
Copy link

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of OpenFGA and the issue still persists.
  • I have searched the Slack community and have not found a suitable solution or answer.
  • I agree to the terms within the OpenFGA Code of Conduct.

Description

The docs example:

ListRelationsRequest body =
    new ListRelationsRequest() {
        User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
        Object = "document:roadmap",
        Relations = new List<string> {"can_view", "can_edit", "can_delete", "can_rename"},
        ContextualTuples = new List<ClientTupleKey>() {
            new ClientTupleKey {
                User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
                Relation = "editor",
                Object = "document:roadmap",
            }
        }
    };
var response = await fgaClient.ListRelations(body);

should be:

ClientListRelationsRequest body =
    new ClientListRelationsRequest() {
        User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
        Object = "document:roadmap",
        Relations = new List<string> {"can_view", "can_edit", "can_delete", "can_rename"},
        ContextualTuples = new List<ClientTupleKey>() {
            new ClientTupleKey {
                User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
                Relation = "editor",
                Object = "document:roadmap",
            }
        }
    };
var response = await fgaClient.ListRelations(body);

Expectation

Example code works.

Reproduction

N/A

OpenFGA SDK version

Latest

OpenFGA version

Latest

SDK Configuration

Latest

Logs

No response

References

No response

@jonathaneckman jonathaneckman added the bug Something isn't working label Jul 9, 2024
@rhamzeh rhamzeh moved this from Backlog to Ready in SDKs and Tooling Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready
Development

No branches or pull requests

1 participant