Document interests and preferences, and tutorial completion - #607
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The interests/preferences PUT requestBody schema/description is inconsistent with the documented and tested permissive input behavior, and the TutorialKey description omits the “null” platform substitution behavior.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
This PR extends the VRChat OpenAPI specification and test suite to cover new onboarding-related behavior: user “interests and preferences” storage plus tutorial completion/clearing keyed by platform/store headers.
Changes:
- Adds
/auth/user/interestsAndPreferencesGET/PUT operations with associated schema and response examples. - Adds
/users/{userId}/tutorialPOST/DELETE operations and documentsX-Platform/X-Storeheader behavior. - Expands
test/arazzo.yamlwith workflows covering authenticated/unauthenticated access and lifecycle behavior for both features.
| File | Description |
|---|---|
| test/arazzo.yaml | Adds workflows to exercise interests/preferences and tutorial-key behavior (including platform/store header keying). |
| openapi/components/schemas/TutorialKey.yaml | Updates TutorialKey description to describe platform/store-derived tutorial keys and custom tutorial keys. |
| openapi/components/schemas/InterestsAndPreferences.yaml | Introduces an InterestsAndPreferences object schema for the new endpoint. |
| openapi/components/responses/users/CompleteTutorialForbiddenError.yaml | Adds a 403 response example for completing another user’s tutorial. |
| openapi/components/responses/users/ClearTutorialsForbiddenError.yaml | Adds a 403 response example for clearing another user’s tutorial completions. |
| openapi/components/responses/authentication/UpdateInterestsAndPreferencesResponse.yaml | Adds the success response example for updating interests/preferences. |
| openapi/components/responses/authentication/UpdateInterestsAndPreferencesParseError.yaml | Adds the 400 response example for invalid interests/preferences bodies. |
| openapi/components/responses/authentication/GetInterestsAndPreferencesResponse.yaml | Adds GET response examples for “all off” and “all on” states. |
| openapi/components/paths/users.yaml | Adds POST/DELETE operations under /users/{userId}/tutorial and attaches the new header parameters. |
| openapi/components/paths/authentication.yaml | Adds the /auth/user/interestsAndPreferences path and operations. |
| openapi/components/paths.yaml | Registers /auth/user/interestsAndPreferences in the root paths map. |
| openapi/components/parameters.yaml | Adds reusable X-Platform and X-Store header parameters. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -0,0 +1,38 @@ | |||
| title: InterestsAndPreferences | |||
| type: object | |||
| description: Interests and preferences the current user has turned on. A key is present only while its value is `true`. | |||
| title: TutorialKey | ||
| type: string | ||
| description: "The ID of a tutorial, in the format `{platform}:{tutorial}:{version}`. `undefined:undefined:v1` is used as a null-ish or sentinel value." | ||
| description: "The ID of a tutorial. A platform tutorial is `{platform}:{store}:v1`, taken from the `X-Platform` and `X-Store` headers, with `undefined` for a header the request left out. Other tutorials take a longer form, such as `platform-agnostic:custom:onboarding-tutorial-world:v1`." |
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.


Closes #605.
GET/PUT /auth/user/interestsAndPreferences(getInterestsAndPreferences,updateInterestsAndPreferences).PUTmerges:trueturns a key on,falseremoves it, and unknown keys or non-boolean values are ignored. A body that is not a JSON object answers 400. The key the issue lists asScifiisSciFi.POST/DELETE /users/{userId}/tutorial(completeUserTutorial,clearUserTutorials), plus theX-PlatformandX-Storeheaders that build a tutorial's key ({platform}:{store}:v1) on all three methods.DELETEclears every platform tutorial and keeps custom ones such as the onboarding world's. Both answer 403 for another user.