You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace concrete type assertions with capability interfaces (closes#59) (#120)
Replace two concrete type assertions in cmd/server/main.go with interface checks:
1. svc.(*module.OpenAPIGenerator) → svc.(interfaces.SchemaRegistrar)
- Define SchemaRegistrar in interfaces/ with Name(), RegisterAdminSchemas(),
ApplySchemas() methods
- Add RegisterAdminSchemas() method to *OpenAPIGenerator that delegates to
the package-level RegisterAdminSchemas function
- Add compile-time check: var _ interfaces.SchemaRegistrar = (*OpenAPIGenerator)(nil)
2. svc.(*module.WorkflowRegistry) → svc.(interfaces.WorkflowStoreProvider)
- Define WorkflowStoreProvider in interfaces/ with Name() and WorkflowStore() any
- Add WorkflowStore() any method to *WorkflowRegistry returning the store opaquely
(avoids interfaces→module circular import)
- Add compile-time check: var _ interfaces.WorkflowStoreProvider = (*WorkflowRegistry)(nil)
No behaviour is changed; only the mechanism for identifying capable services is updated.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments