fix(examples): read profile fields through getPublicProfile - #42
Merged
Merged
Conversation
Specification v1.21.0 moved bio, bioLinks, badges and the current-avatar fields off CurrentUser and User (only CurrentUser keeps currentAvatar*). They are now served by getPublicProfile, which also gained asSelf for the owner's own view. The AspNetCore example still read them off the user objects, so every repository_dispatch build since that release failed with CS1061 in HomeController. Fetch the public profile alongside the user in both endpoints instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every
repository_dispatchbuild since specification v1.21.0 (twelve today) has failed withCS1061inexamples/VRChat.API.Examples.AspNetCore/Controllers/HomeController.cs.Spec commit vrchatapi/specification@2a62f54 moved
bio,bioLinks,badgesand thecurrentAvatar*fields offCurrentUserandUser(onlyCurrentUserkeepscurrentAvatar*). They now live behindgetPublicProfile, which also gainedasSelffor the owner's own view. The AspNetCore example still read them off the user objects.This PR fetches the public profile alongside the user in both example endpoints:
/api/users/currentusesGetPublicProfileAsync(user.Id, asSelf: true)for badges, bio and bio links, keepingCurrentAvatarImageUrlfromCurrentUser./api/users/{id}usesGetPublicProfileAsync(id)for badges, bio, bio links and the current avatar image.The example was the only code in
examples/,wrapper/or the docs that referenced any field removed or retyped in v1.21.0.Verification
Regenerated locally from
v1.21.0/openapi-legacy.yamlwithgenerate.shand openapi-generator 7.17.0, thendotnet build VRChat.API.sln -c Release: 0 warnings, 0 errors. The regeneratedsrc/is not part of this PR since CI regenerates it on every run.馃 Generated with Claude Code