Repository navigation
chore(catalog): rename getById to getCollectionSchema - #69
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the catalog public API to use a clearer method name (getCollectionSchema) instead of getById, aligning the name with the returned data (collection schema) and the documented HTTP endpoint shape.
Changes:
- Renamed
CollectionCatalog.getByIdtoCollectionCatalog.getCollectionSchemain the public interface andInMemoryCollectionCatalogimplementation. - Updated unit tests to call
getCollectionSchemainstead ofgetById. - Updated README usage example to the new method name.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/index.test.ts | Updates catalog API usage in the public entry-point unit test. |
| test/unit/catalog/in-memory.test.ts | Updates in-memory catalog unit tests to the renamed method. |
| src/catalog/types.ts | Renames the method on the exported CollectionCatalog interface. |
| src/catalog/in-memory.ts | Renames the method on the in-memory implementation to match the interface. |
| README.md | Updates documentation example to use the new API name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
This pull request refactors the
CollectionCataloginterface and related classes to rename the methodgetByIdtogetCollectionSchema. This change improves clarity by making the method's purpose more explicit. The update is applied consistently across the implementation, interface, tests, and documentation.API Naming Improvements:
getByIdmethod togetCollectionSchemain theCollectionCataloginterface (src/catalog/types.ts) and its implementation inInMemoryCollectionCatalog(src/catalog/in-memory.ts). [1] [2]getByIdtogetCollectionSchemain tests (test/unit/catalog/in-memory.test.ts,test/unit/index.test.ts) and documentation (README.md).(closes #68 )