feat(calm-hub): decorator resource and endpoint to get decorators#2212
Open
harveymmaunders wants to merge 7 commits intofinos:mainfrom
Open
feat(calm-hub): decorator resource and endpoint to get decorators#2212harveymmaunders wants to merge 7 commits intofinos:mainfrom
harveymmaunders wants to merge 7 commits intofinos:mainfrom
Conversation
Adds initial seed data for decorators collection in MongoDB, including deployment decorators for finos and workshop namespaces. Refs finos#2168
Add DecoratorResource with GET /calm/namespaces/{namespace}/decorators endpoint to retrieve decorator IDs for a given namespace.
Includes:
- DecoratorStore interface for data access abstraction
- MongoDecoratorStore implementation with MongoDB support
- NitriteDecoratorStore implementation for standalone mode
- DecoratorStoreProducer for database mode selection
- Full test coverage for all components
- Updated NitriteDBConfig to initialize decorators collection
Returns list of integer decorator IDs per namespace following the same pattern as patterns, architectures, and flows. Decorators use decoratorId as primary identifier with unique-id preserved in nested decorator object.
Refs finos#2168
Implement query parameter support for filtering decorators by target path and decorator type in both MongoDB and Nitrite storage backends. - Add target and type query parameters to /decorators endpoint - Implement filtering logic in storage layer - Add input sanitization for query parameters Refs finos#2168
Move query parameter validation from custom methods to Jakarta Bean Validation annotations (@SiZe, @pattern). Refactor decorator store implementations into smaller, more maintainable methods. - Replace sanitizeQueryParam with @pattern validation - Add QUERY_PARAM_NO_WHITESPACE_REGEX constant (^[A-Za-z0-9_/-]+$) - Break down getDecoratorsForNamespace into focused methods - Update tests for new validation behavior Refs finos#2168
Contributor
Author
harveymmaunders
commented
Mar 5, 2026
| "unique-id": "finos-architecture-1-deployment", | ||
| "type": "deployment", | ||
| "target": [ | ||
| "/calm/namespaces/finos/architectures/1/versions/1-0-0" |
Contributor
Author
There was a problem hiding this comment.
Not entirely sure how I feel about this target reference. We can include architecture id, but how do differ between pattersn / architectures and also the version>
Contributor
Author
There was a problem hiding this comment.
However, this is currently how MongoDB and CALM Hub have been setup. This follows the rest of how CALM Hub works and when this is changed, it will be updated along with the rest #1853.
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.




Description
Type of Change
Affected Components
cli/)calm/)calm-ai/)calm-hub/)calm-hub-ui/)calm-server/)calm-widgets/)docs/)shared/)calm-plugins/vscode/)Commit Message Format ✅
Testing
Checklist