feat: Introduce API versioning and compatibility headers#61
Open
Glam26 wants to merge 1 commit into
Open
Conversation
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.
I have completed the task. Here's a summary of the changes:
Fastify ( apps/access-api/src/app.ts ) that adds the x-guildpass-api-
version: 1.0.0 header to all API responses. It also surfaces a
deprecation: true header if a route explicitly marks itself as deprecated
via its schema definition.
return the current API version ( 1.0.0 ) in its response payload.
If specified, the client checks the x-guildpass-api-version response
packages/sdk-lite/src/index.ts to accept an optional expectedApiVersion .
If specified, the client checks the x-guildpass-api-version response
header and triggers a warning when there is a version mismatch, helping
integrations identify breaking changes.
the README.md to outline the strict compatibility contract for the
existing /v1 routes and provide explicit guidance on how deprecations
will be handled in the future.
api/test/version.test.ts to verify that the version header is injected
properly across health endpoints, business routes, and tests that the
deprecation header is properly surfaced.
TypeScript and Prisma compilation issues in the MVP (like an unclosed
Prisma model schema block, improperly configured tsconfig.json
configurations in test environments, and an unresolved Badge type) which
were preventing the test suites from cleanly running.
closes #58