New command group for OpenAPI spec generation and SDK codegen: - `core api spec` generates OpenAPI 3.1 spec (JSON/YAML) from route groups - `core api sdk` generates client SDKs via openapi-generator-cli - Adds go-api dependency for SpecBuilder, ExportSpec, SDKGenerator Co-Authored-By: Virgil <virgil@lethean.io> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
390 B
Go
18 lines
390 B
Go
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
package api
|
|
|
|
import "forge.lthn.ai/core/go/pkg/cli"
|
|
|
|
func init() {
|
|
cli.RegisterCommands(AddAPICommands)
|
|
}
|
|
|
|
// AddAPICommands registers the 'api' command group.
|
|
func AddAPICommands(root *cli.Command) {
|
|
apiCmd := cli.NewGroup("api", "API specification and SDK generation", "")
|
|
root.AddCommand(apiCmd)
|
|
|
|
addSpecCommand(apiCmd)
|
|
addSDKCommand(apiCmd)
|
|
}
|