feat(dsl): add holder interfaces for DSL extensibility #3856
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.
Summary
Add interfaces that allow custom expression types to use standard DSL functions, enabling goa-ai and other extensions to reuse Goa's DSL.
New Interfaces
TitleHolder- for expressions that can receive a title viaTitle()VersionHolder- for expressions that can receive a version viaVersion()URLHolder- for expressions that can receive a URL viaURL()DescriptionHolder- for expressions that can receive a description viaDescription()TimeoutHolder- for expressions that can receive a timeout duration viaTimeout()SecurityHolder- for expressions that can receive security requirements viaSecurity()Updated DSL Functions
Title(),Version(),URL()indsl/api.goDescription()indsl/description.goTimeout()extended to accept an optional duration string argumentSecurity()indsl/security.goUse Case
This enables goa-ai to define custom expression types (registries, agents, toolsets) that can use Goa's standard DSL functions instead of defining duplicates.