Skip to content

Conversation

@ewanharris
Copy link
Member

@ewanharris ewanharris commented Nov 12, 2025

Description

What problem is being solved?

Currently the example has the following errors when being ran against a newer version of the SDK.

/Users/ewan/dev/git/openfga/dotnet-sdk/example/Example1/Example1.cs(46,51): error CS7036: There is no argument given that corresponds to the required parameter 'body' of 'OpenFgaClient.ListStores(IClientListStoresRequest?, IClientListStoresOptions?, CancellationToken)'
/Users/ewan/dev/git/openfga/dotnet-sdk/example/Example1/Example1.cs(64,50): error CS7036: There is no argument given that corresponds to the required parameter 'body' of 'OpenFgaClient.ListStores(IClientListStoresRequest?, IClientListStoresOptions?, CancellationToken)'
/Users/ewan/dev/git/openfga/dotnet-sdk/example/Example1/Example1.cs(148,53): error CS0117: 'TypeName' does not contain a definition for 'INT'
/Users/ewan/dev/git/openfga/dotnet-sdk/example/Example1/Example1.cs(151,53): error CS0117: 'TypeName' does not contain a definition for 'STRING'
/Users/ewan/dev/git/openfga/dotnet-sdk/example/Example1/Example1.cs(154,53): error CS0117: 'TypeName' does not contain a definition for 'STRING'

What changes are made to solve it?

Updated referenced SDK to latest and make required changes.

References

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

Summary by CodeRabbit

  • New Features

    • Store list operations now support filtering by name.
  • Chores

    • Updated OpenFga SDK dependency to version 0.8.0.
    • Updated example code for API compatibility.

Copilot AI review requested due to automatic review settings November 12, 2025 11:10
@ewanharris ewanharris requested a review from a team as a code owner November 12, 2025 11:10
@coderabbitai
Copy link

coderabbitai bot commented Nov 12, 2025

Walkthrough

The changes update the example application to use OpenFga SDK version 0.8.0, incorporating breaking API changes including a modified ListStores method signature that now requires a ClientListStoresRequest parameter and enum member renames for TypeName constants.

Changes

Cohort / File(s) Summary
SDK Dependency Update
example/Example1/Example1.csproj
Updated OpenFga.Sdk package reference from version 0.5.1 to 0.8.0
Example Code Updates
example/Example1/Example1.cs
Modified ListStores API call to accept ClientListStoresRequest parameter; renamed enum members TypeName.INT → TypeName.TYPENAMEINT and TypeName.STRING → TypeName.TYPENAMESTRING

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that the ListStores API call properly constructs the ClientListStoresRequest object and that the new filtering parameter is used correctly
  • Confirm that all enum member references (TYPENAMEINT, TYPENAMESTRING) are consistently updated throughout the example code
  • Ensure the dependency version bump aligns with the code changes and that no additional SDK API changes in 0.8.0 affect the example

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: update example to work with latest changes to type enums and liststores' clearly and specifically describes the main changes in the pull request: updating example code to work with SDK changes involving type enums and ListStores API.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/fix-example

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7a67f3 and 39fc641.

📒 Files selected for processing (2)
  • example/Example1/Example1.cs (3 hunks)
  • example/Example1/Example1.csproj (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: CodeQL analysis (csharp)
  • GitHub Check: Agent
  • GitHub Check: Test netcoreapp3.1 on windows-latest
  • GitHub Check: Test net48 on windows-latest
  • GitHub Check: Test net8.0 on macos-latest
  • GitHub Check: Test net9.0 on ubuntu-latest
  • GitHub Check: Test net8.0 on windows-latest
  • GitHub Check: Test net8.0 on ubuntu-latest
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (4)
example/Example1/Example1.cs (3)

46-47: LGTM! ListStores API usage updated correctly.

The call now passes the required ClientListStoresRequest parameter, fixing the compilation error mentioned in the PR objectives.


62-64: LGTM! Good demonstration of the filtering capability.

The updated call correctly uses ClientListStoresRequest with the Name parameter, demonstrating how to filter stores by name. The comment clearly explains the purpose of the filtering.


148-155: LGTM! TypeName enum members updated consistently.

All three enum references have been correctly updated from TypeName.INT and TypeName.STRING to TypeName.TYPENAMEINT and TypeName.TYPENAMESTRING, fixing the undefined enum member compilation errors mentioned in the PR objectives.

example/Example1/Example1.csproj (1)

13-13: Version update verified: v0.8.0 is stable with no breaking changes.

v0.8.0 was released Oct 22, 2025 and the v0.8.0 release notes do not list any breaking changes for the .NET SDK. The package version bump to 0.8.0 is safe and the code changes in Example1.cs align with the SDK's API evolution.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedopenfga.sdk@​0.5.1 ⏵ 0.8.096 -410090100100

View full report

@socket-security
Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: nuget microsoft.extensions.configuration.abstractions under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget microsoft.extensions.dependencyinjection.abstractions under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget microsoft.extensions.dependencyinjection under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget microsoft.extensions.http under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget microsoft.extensions.logging.abstractions under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget microsoft.extensions.logging under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget microsoft.extensions.options under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget microsoft.extensions.primitives under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget system.diagnostics.diagnosticsource under HP-1989

License: HP-1989 (THIRD-PARTY-NOTICES.TXT)

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget system.memory under Unicode-3.0

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]nuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: nuget system.threading.tasks.extensions under Unicode-3.0

License: Unicode-3.0 (THIRD-PARTY-NOTICES.TXT)

License: W3C-20150513 (THIRD-PARTY-NOTICES.TXT)

From: example/Example1/Example1.csprojnuget/[email protected]nuget/[email protected]nuget/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copilot finished reviewing on behalf of ewanharris November 12, 2025 11:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates Example1 to be compatible with SDK version 0.8.0 by addressing breaking changes introduced in versions 0.6.0 and 0.7.0. The changes fix compilation errors related to the ListStores API signature changes and TypeName enum value updates.

Key changes:

  • Updated SDK dependency from version 0.5.1 to 0.8.0
  • Modified ListStores calls to accept a ClientListStoresRequest parameter (breaking change from v0.6.0)
  • Updated TypeName enum values to use new naming convention (breaking change from v0.7.0)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
example/Example1/Example1.csproj Updated OpenFga.Sdk package reference from version 0.5.1 to 0.8.0
example/Example1/Example1.cs Updated ListStores API calls to pass ClientListStoresRequest parameter and updated TypeName enum values to match v0.7.0 naming convention (INT → TYPENAMEINT, STRING → TYPENAMESTRING)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@SoulPancake SoulPancake left a comment

Choose a reason for hiding this comment

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

LG

@ewanharris ewanharris added this pull request to the merge queue Nov 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2025
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.

4 participants