Commit 86eb885
refactor(catalog): split OpenAPI spec into per-plugin files with independent generation (#2735)
* feat(catalog): split OpenAPI spec into per-plugin files
Restructure the monolithic catalog.yaml source into per-plugin specs
so each plugin can independently define its own API paths and schemas
while sharing common types from common.yaml.
- Slim api/openapi/src/catalog.yaml to core (sources, labels, preview)
- Add catalog/plugins/model/api/openapi/ (model paths + schemas)
- Add catalog/plugins/mcp/api/openapi/ (MCP paths + schemas)
- Add scripts/merge_catalog_specs.sh to combine core + plugins + lib
- Update Makefile to use merge_catalog_specs.sh for catalog.yaml
The merged output is semantically identical to the previous monolithic
spec — generated code, validation, and tests are unchanged.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
* feat(catalog): per-plugin server stub generation
Generate server stubs (controllers, interfaces) per-plugin instead of
from the unified spec, while keeping client models in catalog/pkg/openapi/.
- Add scripts/assemble_plugin_spec.sh to build standalone specs per plugin
- Add catalog/plugins/{model,mcp}/scripts/gen_openapi_server.sh for
independent per-plugin code generation
- Add per-plugin .openapi-generator-ignore files
- Split api.go into api_model.go + api_mcp.go (same package, no breaking change)
- Refactor catalog/scripts/gen_openapi_server.sh into orchestrator
- Update catalog/Makefile with per-plugin targets and dependency isolation
Changing a plugin's spec only regenerates that plugin's controller.
Generated output is identical to the previous unified generation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
* refactor: move plugin OpenAPI specs to api/openapi/src/plugins/
Co-locate plugin specs with other OpenAPI sources under api/openapi/src/
instead of catalog/plugins/*/api/openapi/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
* refactor: consolidate plugin OpenAPI specs into single files
Flatten per-plugin directory structure (openapi.yaml + components.yaml)
into single files (model.yaml, mcp.yaml) under api/openapi/src/plugins/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
* fix: update .gitattributes and clean target for per-plugin generation
Regenerate .gitattributes to reflect api.go → api_model.go/api_mcp.go
rename. Fix clean-internal-server-openapi to also delete per-plugin
output files so both plugins regenerate after a clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
* fix: remove generator boilerplate after per-plugin generation
Clean up README.md, api/openapi.yaml, and .openapi-generator-ignore
after each plugin generation run to prevent untracked files in CI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
---------
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8ff4a8e commit 86eb885
17 files changed
Lines changed: 2082 additions & 1713 deletions
File tree
- api/openapi
- src
- plugins
- catalog
- internal/server/openapi
- .openapi-generator
- plugins
- mcp
- scripts
- model
- scripts
- scripts
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2117 | 2117 | | |
2118 | 2118 | | |
2119 | 2119 | | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
2120 | 2193 | | |
2121 | 2194 | | |
2122 | 2195 | | |
| |||
2167 | 2240 | | |
2168 | 2241 | | |
2169 | 2242 | | |
2170 | | - | |
| 2243 | + | |
2171 | 2244 | | |
2172 | | - | |
2173 | | - | |
2174 | | - | |
2175 | | - | |
2176 | | - | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
2193 | | - | |
2194 | | - | |
2195 | | - | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
2203 | 2249 | | |
2204 | 2250 | | |
2205 | | - | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
2206 | 2276 | | |
2207 | 2277 | | |
2208 | 2278 | | |
| |||
2243 | 2313 | | |
2244 | 2314 | | |
2245 | 2315 | | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | | - | |
2252 | | - | |
2253 | | - | |
2254 | | - | |
2255 | | - | |
2256 | | - | |
2257 | | - | |
2258 | 2316 | | |
2259 | 2317 | | |
2260 | 2318 | | |
| |||
2307 | 2365 | | |
2308 | 2366 | | |
2309 | 2367 | | |
2310 | | - | |
2311 | | - | |
2312 | | - | |
2313 | | - | |
2314 | | - | |
2315 | | - | |
2316 | | - | |
2317 | | - | |
2318 | | - | |
2319 | | - | |
2320 | | - | |
2321 | | - | |
2322 | | - | |
2323 | | - | |
2324 | | - | |
2325 | | - | |
2326 | | - | |
2327 | | - | |
2328 | | - | |
2329 | | - | |
2330 | | - | |
2331 | | - | |
2332 | | - | |
2333 | | - | |
2334 | | - | |
2335 | | - | |
2336 | | - | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | | - | |
2341 | | - | |
2342 | | - | |
2343 | | - | |
2344 | | - | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
2352 | | - | |
2353 | | - | |
2354 | | - | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | 2368 | | |
2369 | 2369 | | |
2370 | 2370 | | |
| |||
0 commit comments