fetcher-decorator-service
Workflow
reflect-metadataships with the package and is imported automatically; an explicit entry-point import is only needed for other decorator libraries.- Define a service class with
@api()and method decorators; leave method bodies as generated-error stubs. - Bind path, query, header, body, request, and attribute values with parameter decorators.
- Choose the result extractor or endpoint return type that matches the caller contract.
- Load
references/api.mdfor decorator signatures, lifecycle hooks, inheritance, and CRUD examples.
Key Practices
- Prefer decorator services when endpoint shape is stable and discoverability matters.
- Use core Fetcher directly for highly dynamic request construction.
- Keep
reflect-metadatasetup out of individual service modules unless the app has no shared entry point.
References
references/api.md: Detailed package API, examples, and edge-case guidance. Load it only when the task needs decorator signatures, parameter mapping, lifecycle hooks, inheritance rules, error stubs, and complete CRUD service examples.
Related Skills
- $fetcher-integration: Use for the underlying Fetcher and NamedFetcher setup.
- $fetcher-openapi-generator: Use when service code should come from an OpenAPI spec.
- $fetcher-llm-streaming: Use when a decorator endpoint returns SSE or streaming data.