Skip to content

refactor(api): remove deprecated version endpoint and update documentation to reflect changes in public config endpoint#1960

Merged
djstrong merged 2 commits intomainfrom
1597-remove-v1version-endpoint-from-ensrainbow
Apr 20, 2026
Merged

refactor(api): remove deprecated version endpoint and update documentation to reflect changes in public config endpoint#1960
djstrong merged 2 commits intomainfrom
1597-remove-v1version-endpoint-from-ensrainbow

Conversation

@djstrong
Copy link
Copy Markdown
Member

@djstrong djstrong commented Apr 20, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary

  • Removed ENSRainbow GET /v1/version endpoint (deprecated in favor of GET /v1/config).
  • Removed the deprecated ENSRainbow SDK version() client method and associated types/tests.
  • Updated ENSRainbow docs to reference GET /v1/config instead of GET /v1/version.

Why

  • /v1/version was already deprecated and duplicated the newer /v1/config discovery surface; removing it reduces maintenance and avoids clients relying on a legacy endpoint.

Testing


Notes for Reviewer (Optional)

  • In-repo usage of /v1/version was limited to ENSRainbow’s own integration test and the deprecated @ensnode/ensrainbow-sdk version() method; ENSIndexer already uses ensRainbowClient.config().

Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

…ation to reflect changes in public config endpoint
Copilot AI review requested due to automatic review settings April 20, 2026 11:26
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 20, 2026

🦋 Changeset detected

Latest commit: d42ad67

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@ensnode/ensrainbow-sdk Major
ensindexer Major
ensrainbow Major
ensadmin Major
ensapi Major
fallback-ensapi Major
enssdk Major
enscli Major
enskit Major
ensskills Major
@ensnode/datasources Major
@ensnode/ensdb-sdk Major
@ensnode/ensnode-react Major
@ensnode/ensnode-sdk Major
@ensnode/ponder-sdk Major
@ensnode/ponder-subgraph Major
@ensnode/shared-configs Major
@docs/ensnode Major
@docs/ensrainbow Major
@docs/mintlify Major
@namehash/ens-referrals Major
@namehash/namehash-ui Major
@ensnode/enskit-react-example Patch
@ensnode/integration-test-env Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Apr 20, 2026 0:00am
ensnode.io Ready Ready Preview, Comment Apr 20, 2026 0:00am
ensrainbow.io Ready Ready Preview, Comment Apr 20, 2026 0:00am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

@djstrong has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 31 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 22 minutes and 31 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4be84950-0899-4e52-a680-119dbeea7d0d

📥 Commits

Reviewing files that changed from the base of the PR and between 1d56f0c and d42ad67.

📒 Files selected for processing (3)
  • .changeset/odd-seahorses-sleep.md
  • docs/ensnode.io/src/content/docs/ensrainbow/concepts/versioning.mdx
  • docs/ensnode.io/src/content/docs/ensrainbow/usage/api.mdx
📝 Walkthrough

Walkthrough

The pull request removes the deprecated GET /v1/version API endpoint from the ENSRainbow server and SDK. Version information is now accessed via GET /v1/config. Changes include removing the endpoint implementation, deleting associated types and methods, updating tests, and revising documentation to reference the new location.

Changes

Cohort / File(s) Summary
Server API Implementation
apps/ensrainbow/src/lib/api.ts
Removed the GET /v1/version route handler and its associated imports (packageJson, DB_SCHEMA_VERSION).
SDK Client Implementation
packages/ensrainbow-sdk/src/client.ts
Removed the version() method from EnsRainbowApiClient and ApiClient interface; deleted exported VersionInfo and VersionResponse types.
Test Coverage
apps/ensrainbow/src/commands/server-command.test.ts, packages/ensrainbow-sdk/src/client.test.ts
Removed test cases validating the /v1/version endpoint response and client.version() method behavior.
Documentation Updates
docs/ensnode.io/src/content/docs/ensrainbow/usage/api.mdx, docs/ensnode.io/src/content/docs/ensrainbow/concepts/versioning.mdx, docs/ensnode.io/src/content/docs/ensrainbow/contributing/index.mdx
Updated API documentation to reference /v1/config instead of /v1/version; updated versioning documentation; corrected URL path formatting in contributing guide.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A version endpoint hops away,
/v1/version had its day,
Now /config shows the way,
Deprecation clears the fray,
Rainbow endpoints here to stay! 🌈

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the deprecated version endpoint and updating documentation to reference the new config endpoint.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description follows the template structure with all required sections completed: Summary, Why, Testing, Notes for Reviewer, and Pre-Review Checklist.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 1597-remove-v1version-endpoint-from-ensrainbow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/ensnode.io/src/content/docs/ensrainbow/concepts/versioning.mdx`:
- Around line 12-14: The docs show a semantic version example with a leading "v"
("v0.4.2") which conflicts with the `/v1/config` API that returns
packageJson.version (e.g., "0.1.0"); update the example and any mentions in this
section to drop the "v" prefix so the documented format matches `/v1/config` and
packageJson.version.

In `@docs/ensnode.io/src/content/docs/ensrainbow/usage/api.mdx`:
- Line 16: Update the endpoint summary for `GET /v1/config` to use the exported
SDK interface name `EnsRainbowPublicConfig` (instead of
`ENSRainbowPublicConfig`); locate the line listing the `GET /v1/config` route in
the API table and replace the type reference so casing matches the authoritative
interface `EnsRainbowPublicConfig`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0bed8751-4606-45d1-a788-291403c7c244

📥 Commits

Reviewing files that changed from the base of the PR and between 2017ae6 and 1d56f0c.

📒 Files selected for processing (7)
  • apps/ensrainbow/src/commands/server-command.test.ts
  • apps/ensrainbow/src/lib/api.ts
  • docs/ensnode.io/src/content/docs/ensrainbow/concepts/versioning.mdx
  • docs/ensnode.io/src/content/docs/ensrainbow/contributing/index.mdx
  • docs/ensnode.io/src/content/docs/ensrainbow/usage/api.mdx
  • packages/ensrainbow-sdk/src/client.test.ts
  • packages/ensrainbow-sdk/src/client.ts
💤 Files with no reviewable changes (4)
  • packages/ensrainbow-sdk/src/client.test.ts
  • apps/ensrainbow/src/commands/server-command.test.ts
  • apps/ensrainbow/src/lib/api.ts
  • packages/ensrainbow-sdk/src/client.ts

Comment thread docs/ensnode.io/src/content/docs/ensrainbow/concepts/versioning.mdx Outdated
Comment thread docs/ensnode.io/src/content/docs/ensrainbow/usage/api.mdx Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the deprecated ENSRainbow /v1/version HTTP endpoint and the corresponding deprecated version() method/types from @ensnode/ensrainbow-sdk, updating ENSRainbow docs to use /v1/config as the discovery surface.

Changes:

  • Removed GET /v1/version route from the ENSRainbow service and deleted its integration test coverage.
  • Removed deprecated EnsRainbowApiClient.version() plus Version* types and unit tests from @ensnode/ensrainbow-sdk.
  • Updated ENSRainbow documentation to reference GET /v1/config and the ENSRainbowPublicConfig shape.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/ensrainbow-sdk/src/client.ts Removes the deprecated version() client method and Version* types.
packages/ensrainbow-sdk/src/client.test.ts Deletes the unit test that exercised client.version().
apps/ensrainbow/src/lib/api.ts Removes the deprecated /v1/version API route implementation.
apps/ensrainbow/src/commands/server-command.test.ts Removes server tests that validated /v1/version and its CORS preflight.
docs/ensnode.io/src/content/docs/ensrainbow/usage/api.mdx Updates API reference to describe /v1/config instead of /v1/version.
docs/ensnode.io/src/content/docs/ensrainbow/contributing/index.mdx Fixes contribution guide link formatting.
docs/ensnode.io/src/content/docs/ensrainbow/concepts/versioning.mdx Updates version endpoint reference from /v1/version to /v1/config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/ensrainbow-sdk/src/client.ts
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 20, 2026

Greptile Summary

This PR removes the deprecated GET /v1/version endpoint from ENSRainbow and the corresponding version() SDK client method, along with all associated types, tests, and documentation, directing consumers to GET /v1/config instead.

  • The changeset bumps @ensnode/ensrainbow-sdk as minor, but removing the public version() method is a breaking API change that should be a major bump under semver — consumers still calling .version() will get a runtime TypeError after upgrading.

Confidence Score: 4/5

Safe to merge after correcting the changeset bump from minor to major

All code changes are correct and well-scoped — the endpoint, SDK method, types, tests, and docs are consistently updated. The single blocking concern is the semver classification: removing a public method from a published SDK package is a breaking change and must use a major changeset bump to avoid silently breaking downstream consumers.

.changeset/odd-seahorses-sleep.md — the version bump type needs to change from minor to major

Important Files Changed

Filename Overview
.changeset/odd-seahorses-sleep.md Changeset incorrectly marks a breaking API removal as minor instead of major
apps/ensrainbow/src/lib/api.ts Cleanly removes the deprecated /v1/version route handler and its now-unused imports (packageJson, DB_SCHEMA_VERSION)
packages/ensrainbow-sdk/src/client.ts Removes deprecated version() method, VersionInfo/VersionResponse types, and unused EnsRainbowServerLabelSet import from the SDK client
apps/ensrainbow/src/commands/server-command.test.ts Removes integration tests for GET /v1/version and its CORS OPTIONS test case; remaining test suite is unaffected
packages/ensrainbow-sdk/src/client.test.ts Removes unit test for the now-deleted version() SDK method; remaining tests unchanged
docs/ensnode.io/src/content/docs/ensrainbow/usage/api.mdx Updates API reference to replace /v1/version with /v1/config, adds recordsCount to response description, removes dbSchemaVersion field
docs/ensnode.io/src/content/docs/ensrainbow/concepts/versioning.mdx Updates version field reference from /v1/version to /v1/config; also removes leading v from example version string
docs/ensnode.io/src/content/docs/ensrainbow/contributing/index.mdx Minor doc fix: removes trailing slash from contribution guide link

Sequence Diagram

sequenceDiagram
    participant Client
    participant ENSRainbow API

    Note over Client,ENSRainbow API: Before this PR
    Client->>ENSRainbow API: GET /v1/version (deprecated)
    ENSRainbow API-->>Client: { status, versionInfo: { version, dbSchemaVersion, labelSet } }

    Note over Client,ENSRainbow API: After this PR
    Client->>ENSRainbow API: GET /v1/config
    ENSRainbow API-->>Client: { version, labelSet, recordsCount }
Loading

Reviews (1): Last reviewed commit: "chore(ensrainbow): remove deprecated ver..." | Re-trigger Greptile

@@ -0,0 +1,6 @@
---
"@ensnode/ensrainbow-sdk": minor
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Breaking change versioned as minor

Removing the public version() method from @ensnode/ensrainbow-sdk is a breaking API change — any consumer calling client.version() will get a runtime TypeError: client.version is not a function after upgrading. Under semver, this requires a major bump, not minor, regardless of the prior @deprecated annotation.

Suggested change
"@ensnode/ensrainbow-sdk": minor
"@ensnode/ensrainbow-sdk": major

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@djstrong djstrong linked an issue Apr 20, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@tk-o tk-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@djstrong djstrong merged commit 1eccf18 into main Apr 20, 2026
23 checks passed
@djstrong djstrong deleted the 1597-remove-v1version-endpoint-from-ensrainbow branch April 20, 2026 14:25
@github-actions github-actions Bot mentioned this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove /v1/version endpoint from ENSRainbow

3 participants