codegen

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Command codegen generates square-cli's typed models and command tree from the vendored Square OpenAPI specification.

Usage:

go run ./internal/codegen           # uses api/openapi/square-api.json
go run ./internal/codegen -spec X   # custom spec path

It writes:

pkg/square/models_gen.go            # typed request/response/enum models
internal/commands/<api>_gen.go      # one cobra command group per API
internal/commands/registry_gen.go   # AddCommands wiring

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL