Skip to content

feat: Rename /schema endpoint to /schemas#1263

Merged
Azorlogh merged 1 commit intomainfrom
feat/schema_/rename-endpoint-to-plural
Feb 19, 2026
Merged

feat: Rename /schema endpoint to /schemas#1263
Azorlogh merged 1 commit intomainfrom
feat/schema_/rename-endpoint-to-plural

Conversation

@Azorlogh
Copy link
Contributor

@Azorlogh Azorlogh commented Feb 18, 2026

for consistency with other endpoints

@Azorlogh Azorlogh requested a review from a team as a code owner February 18, 2026 11:25
@Azorlogh Azorlogh force-pushed the feat/schema_/rename-endpoint-to-plural branch from 0d33ca9 to b7d5dad Compare February 18, 2026 11:34
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Walkthrough

This PR updates API endpoint paths from singular /schema to plural /schemas across route definitions and corresponding test files. The functionality remains unchanged; only the URL paths are modified.

Changes

Cohort / File(s) Summary
Schema Test Endpoints
internal/api/v2/controllers_schema_insert_test.go, internal/api/v2/controllers_schema_list_test.go, internal/api/v2/controllers_schema_read_test.go
Updated test request paths from /default/schema* to /default/schemas* to match corrected API endpoint naming. Test logic and assertions unchanged.
Route Definitions
internal/api/v2/routes.go
Pluralized schema endpoint paths from /schema/{version}, /schema to /schemas/{version}, /schemas under the ledger-scoped "/_info" group. No control flow or error handling changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Schemas hop along in plurals now,
From /schema to /schemas—we'll show you how!
Four wee files all matched with care,
Paths harmonized everywhere, 🎯
Consistency blooms in the rabbit's lair!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: renaming the /schema endpoint to /schemas across the codebase.
Description check ✅ Passed The description is related to the changeset, explaining the rationale for the endpoint rename (consistency with other endpoints).

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

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/schema_/rename-endpoint-to-plural

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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
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.

🧹 Nitpick comments (1)
internal/api/v2/routes.go (1)

85-87: Breaking change – consider documenting a migration path.

Renaming /schema/schemas is a non-backward-compatible change. Any deployed client targeting the old endpoint will receive a 404 with no indication of what changed. Consider one of:

  • Adding a 301/308 redirect from the old paths to the new ones (temporary compatibility shim).
  • Documenting this as a breaking change in the changelog/migration guide alongside the SEMVER bump.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/api/v2/routes.go` around lines 85 - 87, Routes were renamed from
/schema to /schemas causing a breaking change; add compatibility shims by
registering redirect handlers for the old endpoints that forward to the new ones
(or return a 301/308) so existing clients don’t get a bare 404. Specifically,
add routes corresponding to the previous /schema paths that call either a
redirect to the new path or invoke the existing handlers (insertSchema,
readSchema, listSchemas) so behavior remains the same while you document the
breaking change in the changelog/migration guide.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@internal/api/v2/routes.go`:
- Around line 85-87: Routes were renamed from /schema to /schemas causing a
breaking change; add compatibility shims by registering redirect handlers for
the old endpoints that forward to the new ones (or return a 301/308) so existing
clients don’t get a bare 404. Specifically, add routes corresponding to the
previous /schema paths that call either a redirect to the new path or invoke the
existing handlers (insertSchema, readSchema, listSchemas) so behavior remains
the same while you document the breaking change in the changelog/migration
guide.

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.20%. Comparing base (0080fb5) to head (b7d5dad).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1263   +/-   ##
=======================================
  Coverage   82.20%   82.20%           
=======================================
  Files         198      198           
  Lines       10224    10224           
=======================================
  Hits         8405     8405           
  Misses       1326     1326           
  Partials      493      493           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Azorlogh Azorlogh added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit d17d225 Feb 19, 2026
9 checks passed
@Azorlogh Azorlogh deleted the feat/schema_/rename-endpoint-to-plural branch February 19, 2026 13:33
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.

2 participants