Summary
Build a code generation tool (catalog-gen) that scaffolds new catalog plugins from a single configuration file, producing all the boilerplate needed for models, services, API handlers, providers, loader, and plugin registration.
Motivation
After Phases 5 and 6, the pattern for creating a catalog plugin is well-established but involves significant boilerplate: Go types, service interfaces, API handlers, OpenAPI specs, provider implementations, plugin registration, and tests. A code generator dramatically reduces the effort to add new catalog types and ensures consistency across all plugins.
Scope
- Define the plugin configuration schema (YAML/JSON) that describes a new catalog type's entities, fields, and source types
- Implement
catalog-gen as a Go CLI tool
- Generate: Go model types, service interfaces and stubs, API handler scaffolding, OpenAPI spec files (
openapi.yaml + components.yaml), provider skeleton, plugin registration (init() + interface implementation), basic unit test files
- Add
make gen/catalog-plugin target to the Makefile
- Document usage in the project README or a dedicated guide
Acceptance Criteria
Dependencies
References
Summary
Build a code generation tool (
catalog-gen) that scaffolds new catalog plugins from a single configuration file, producing all the boilerplate needed for models, services, API handlers, providers, loader, and plugin registration.Motivation
After Phases 5 and 6, the pattern for creating a catalog plugin is well-established but involves significant boilerplate: Go types, service interfaces, API handlers, OpenAPI specs, provider implementations, plugin registration, and tests. A code generator dramatically reduces the effort to add new catalog types and ensures consistency across all plugins.
Scope
catalog-genas a Go CLI toolopenapi.yaml+components.yaml), provider skeleton, plugin registration (init()+ interface implementation), basic unit test filesmake gen/catalog-plugintarget to the MakefileAcceptance Criteria
catalog-genreads a config file and produces a complete, compilable plugin scaffoldmake build && make lintout of the boxcommon.yamlshared types correctlycatalog-genitself has unit testsDependencies
References