Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 795 Bytes

File metadata and controls

32 lines (21 loc) · 795 Bytes

go-zero

Spec Forge supports generating OpenAPI specs from go-zero projects.

How It Works

  1. Detection: Parses go.mod to detect go-zero dependency and locate API definition files (.api files)
  2. Patching: Checks for goctl installation
  3. Generation: Uses goctl api swagger command to generate the OpenAPI spec

Prerequisites

The goctl tool must be installed:

go install github.com/zeromicro/go-zero/tools/goctl@latest

Usage

# Basic generation
spec-forge generate ./my-go-zero-project

# With AI enrichment
spec-forge generate ./my-go-zero-project --language zh

References