Repository navigation
Migrate to generated SDK and update sharp dependency - #926
Merged
Merged
Conversation
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
src/lib/api held a hand-written copy of the API surface, the same copy
that lives in adminv2 and finance-dashboard. Replace it with
@hackpsu/react-sdk, whose client is generated from the API's own OpenAPI
document, so drift becomes a compile error.
This app gates per route rather than globally: marketing pages are public
and only (protected) requires a session. HackPSUProvider therefore renders
with guard={false} and the protected layout keeps its own AuthGuard, which
gained a minimumRole prop for exactly this case.
Call sites change shape rather than just name: generated mutations take a
variables object, and queries take a params object. Reimbursement and
photo upload no longer build FormData by hand, since the generated client
serialises multipart bodies itself.
Nullable fields are typed T | null rather than optional, so form controls
coalesce them. Several registration fields the API has always accepted as
absent were declared required in the document; apiv3 #940 corrected that
rather than making this form send values the server ignores.
Values this app owns rather than the API, UsersCategory and
PROJECT_CATEGORIES, move to src/lib/constants. lib/config/settings.json
stays where it is.
Renovate reads the registry mapping from .npmrc but will not query a non-npmjs host unless it is allowed, so @hackpsu/react-sdk would have gone stale without update PRs. The Artifact Registry repository grants public read, so the host rule needs no credentials. Group the client and the SDK into one PR: react-sdk pins an exact api-client version, so they cannot move independently.
Consume the generated SDK instead of a local API layer
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
No description provided.