Documentation
¶
Overview ¶
Package testscenarios provides reusable Goa design scenarios for testing agent code generation.
Index ¶
- func AliasBoth() func()
- func AliasPayloadOnly() func()
- func AliasResultOnly() func()
- func ArgsInlineObject() func()
- func ArgsLocatedNestedUserType() func()
- func ArgsPrimitive() func()
- func ArgsUnionSumTypes() func()
- func ArgsUserType() func()
- func ConfirmationDSL() func()
- func DeepNestedValidations() func()
- func ExportsSimple() func()
- func ExportsWithHints() func()
- func ImportsDeterministic() func()
- func MCPDSL() func()
- func MCPUse() func()
- func MCPUseAlias() func()
- func MethodComplexEmbedded() func()
- func MethodExternalAlias() func()
- func MethodSimpleCompatible() func()
- func MultiToolset() func()
- func NoResultMethod() func()
- func ReUse() func()
- func RunPolicyBasic() func()
- func ServiceToolsetBindCross() func()
- func ServiceToolsetBindSelf() func()
- func ServiceToolsetBindSelfBoundedResult() func()
- func ServiceToolsetBindSelfHints() func()
- func ServiceToolsetBindSelfServerData() func()
- func ServiceToolsetBindSelfServerDataPointerSidecar() func()
- func TagsBasic() func()
- func ToolSpecsMinimal() func()
- func ToolsetNamedTools() func()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliasBoth ¶
func AliasBoth() func()
AliasBoth returns a design where tool payload and result reuse the exact method user types, enabling full adapter bypass.
func AliasPayloadOnly ¶
func AliasPayloadOnly() func()
AliasPayloadOnly returns a design where payload reuses the method payload user type but result is inline, requiring a result adapter.
func AliasResultOnly ¶
func AliasResultOnly() func()
AliasResultOnly returns a design where result reuses the method result user type but payload is inline, requiring a payload adapter.
func ArgsInlineObject ¶
func ArgsInlineObject() func()
ArgsInlineObject returns a DSL with inline object args and result.
func ArgsLocatedNestedUserType ¶
func ArgsLocatedNestedUserType() func()
ArgsLocatedNestedUserType returns a DSL where the tool payload aliases a user type placed via struct:pkg:path (e.g. `types.*`) and that type references another user type.
With newer Goa versions, types that are forced into a located package must ensure their dependencies are explicitly located as well. This scenario exercises codegen for a tool payload whose nested references live in a non-default package.
func ArgsPrimitive ¶
func ArgsPrimitive() func()
ArgsPrimitive returns a DSL with primitive args and result.
func ArgsUnionSumTypes ¶
func ArgsUnionSumTypes() func()
ArgsUnionSumTypes returns a DSL with union (OneOf) args and result.
func ArgsUserType ¶
func ArgsUserType() func()
ArgsUserType returns a DSL with user type args and result (service-local type).
func ConfirmationDSL ¶
func ConfirmationDSL() func()
ConfirmationDSL returns a DSL design function for confirmation tool specs.
func DeepNestedValidations ¶
func DeepNestedValidations() func()
DeepNestedValidations defines nested user types with validations at each level.
func ExportsSimple ¶
func ExportsSimple() func()
ExportsSimple declares an agent that exports a single toolset with one tool.
func ExportsWithHints ¶
func ExportsWithHints() func()
ExportsWithHints declares an exported toolset whose tool configures call and result hint templates.
func ImportsDeterministic ¶
func ImportsDeterministic() func()
ImportsDeterministic uses a user type with a custom package path to exercise alias stability.
func MCPDSL ¶
func MCPDSL() func()
MCPDSL references an external MCP toolset using the Toolset with FromMCP DSL.
func MCPUse ¶
func MCPUse() func()
MCPUse references an external MCP toolset using Toolset with FromMCP.
func MCPUseAlias ¶
func MCPUseAlias() func()
MCPUseAlias references an external MCP toolset through a local alias so the generator must keep definition-owned package names separate from provider metadata.
func MethodComplexEmbedded ¶
func MethodComplexEmbedded() func()
MethodComplexEmbedded defines a method-bound tool with nested/embedded user types.
func MethodExternalAlias ¶
func MethodExternalAlias() func()
MethodExternalAlias defines a method-bound tool whose result aliases a specs-local type while nesting a user type with a custom package path. It exercises transform initialization to ensure the top-level initializer uses the specs package while nested fields preserve external packages.
func MethodSimpleCompatible ¶
func MethodSimpleCompatible() func()
MethodSimpleCompatible defines a simple method-bound tool whose shapes are compatible to trigger transform emission (Args -> Method Payload, Method Result -> Return).
func MultiToolset ¶
func MultiToolset() func()
MultiToolset returns a DSL design with two toolsets under one agent to exercise the aggregated specs package importing multiple per-toolset packages.
func NoResultMethod ¶
func NoResultMethod() func()
NoResultMethod returns a DSL design with a method-backed tool whose target service method returns only an error (no result). Tests assert service_toolset code generation handles no-result methods correctly.
func RunPolicyBasic ¶
func RunPolicyBasic() func()
RunPolicyBasic returns a DSL design with caps, time budget, and interrupts.
func ServiceToolsetBindCross ¶
func ServiceToolsetBindCross() func()
ServiceToolsetBindCross returns a DSL with an agent binding to another service method.
func ServiceToolsetBindSelf ¶
func ServiceToolsetBindSelf() func()
ServiceToolsetBindSelf returns a DSL design function for a method-backed toolset within the same service.
func ServiceToolsetBindSelfBoundedResult ¶
func ServiceToolsetBindSelfBoundedResult() func()
ServiceToolsetBindSelfBoundedResult returns a DSL design function for a method-backed bounded tool whose semantic result stays domain-only while the bound method result carries canonical bounds fields for projection.
func ServiceToolsetBindSelfHints ¶
func ServiceToolsetBindSelfHints() func()
ServiceToolsetBindSelfHints returns a DSL design function for a method-backed used toolset that includes call and result hint templates.
func ServiceToolsetBindSelfServerData ¶
func ServiceToolsetBindSelfServerData() func()
ServiceToolsetBindSelfServerData returns a DSL design function for a method-backed toolset that emits server_data from a bound method result field.
func ServiceToolsetBindSelfServerDataPointerSidecar ¶
func ServiceToolsetBindSelfServerDataPointerSidecar() func()
ServiceToolsetBindSelfServerDataPointerSidecar returns a DSL design function for a method-backed toolset that emits pointer-typed server_data from an optional bound method result field.
The generated codecs must treat nil sidecar values as "no server_data" and therefore encode them to JSON null rather than returning an error.
func ToolSpecsMinimal ¶
func ToolSpecsMinimal() func()
ToolSpecsMinimal returns a DSL design function for a minimal tool_specs scenario.
func ToolsetNamedTools ¶
func ToolsetNamedTools() func()
ToolsetNamedTools creates a scenario where the toolset is named "tools", which could conflict with the runtime tools package import.
Types ¶
This section is empty.
Source Files
¶
- alias_bypass.go
- args_located_nested_usertype.go
- args_union_sum_types.go
- args_variants.go
- confirmation.go
- deep_nested.go
- exports_simple.go
- exports_with_hints.go
- imports_deterministic.go
- mcp_dsl.go
- mcp_use.go
- mcp_use_alias.go
- method_complex.go
- method_external_alias.go
- method_simple.go
- multi_toolset.go
- no_result_method.go
- reuse_toolset.go
- run_policy.go
- service_toolset_bind_cross.go
- service_toolset_bind_self.go
- service_toolset_bind_self_bounded_result.go
- service_toolset_bind_self_hints.go
- service_toolset_bind_self_server_data.go
- service_toolset_bind_self_server_data_pointer_sidecar.go
- tags.go
- tool_specs_minimal.go
- toolset_named_tools.go