Repository navigation
feat: SDK update for version 6.1.0 - #100
Conversation
Greptile SummaryUpdates the .NET SDK to version 6.1.0.
Confidence Score: 4/5The PR is not yet safe to merge because several OAuth response models still destroy structured authorization details during deserialization. OAuth consent, consent-token, grant, and token responses deserialize nested authorization details into collections and then replace those values with CLR type-name strings. Appwrite/Models/Oauth2Consent.cs, Appwrite/Models/Oauth2ConsentToken.cs, Appwrite/Models/Oauth2Grant.cs, Appwrite/Models/Oauth2Token.cs Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
Appwrite/Models/Oauth2Consent.cs:78
**Authorization details lose structure**
When an OAuth consent, consent-token, grant, or token response contains structured authorization details, response deserialization produces a dictionary or list and these model conversions call `ToString()` on it, causing consumers to receive a CLR collection type name instead of the authorization metadata.
Reviews (2): Last reviewed commit: "chore: update .NET SDK to 6.1.0" | Re-trigger Greptile |
| grant_id: "<GRANT_ID>", | ||
| authorization_details: "<AUTHORIZATION_DETAILS>", // optional |
There was a problem hiding this comment.
Named arguments do not compile
The example uses grant_id and authorization_details, but the C# method declares grantId and authorizationDetails, so copying this invocation produces compiler errors.
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/examples/oauth2/approve.md
Line: 14-15
Comment:
**Named arguments do not compile**
The example uses `grant_id` and `authorization_details`, but the C# method declares `grantId` and `authorizationDetails`, so copying this invocation produces compiler errors.
How can I resolve this? If you propose a fix, please make it concise.| cimdUrl: map["cimdUrl"].ToString(), | ||
| scopes: map["scopes"].ConvertToList<string>(), | ||
| resources: map["resources"].ConvertToList<string>(), | ||
| authorizationDetails: map["authorizationDetails"].ToString(), |
There was a problem hiding this comment.
Authorization details lose structure
When an OAuth consent, consent-token, grant, or token response contains structured authorization details, response deserialization produces a dictionary or list and these model conversions call ToString() on it, causing consumers to receive a CLR collection type name instead of the authorization metadata.
Prompt To Fix With AI
This is a comment left during a code review.
Path: Appwrite/Models/Oauth2Consent.cs
Line: 78
Comment:
**Authorization details lose structure**
When an OAuth consent, consent-token, grant, or token response contains structured authorization details, response deserialization produces a dictionary or list and these model conversions call `ToString()` on it, causing consumers to receive a CLR collection type name instead of the authorization metadata.
How can I resolve this? If you propose a fix, please make it concise.
This PR contains updates to the SDK for version 6.1.0.
What's Changed
Appsservice for managing OAuth2 applications, keys, and installationsOAuth2service with authorize, grant, device authorization, and consent flowsAccountOAuth2 consent methodsListConsents,GetConsent,DeleteConsent, and consent token methodsOrganizationandTeamsservicesinstallationAccessTokenDurationparameter toProject.UpdateOAuth2Servertokenparameter toSites.GetDeploymentDownloadoauth2.introspectand organization installation key scopes