Versions in this module Expand all Collapse all v1 v1.0.2 Oct 9, 2026 v1.0.1 Oct 9, 2026 v1.0.0 Oct 9, 2026 Changes in this version + var ErrExtraFile = errors.New("extra file") + var ErrFramework = errors.New("no router for the framework") + var ErrNameClash = errors.New("name declared twice") + var ErrTemplateFile = errors.New("read template file") + var ErrWrite = errors.New("write generated file") + func Version() string + type API struct + Operations []Operation + Package string + Service TypeRef + Types []TypeRef + UserContext map[string]any + type Body struct + ContentType string + Field string + Type TypeRef + type Diagnostic struct + Code string + Col int + File string + Line int + Message string + Pointer string + Severity Severity + func Prepare(ctx context.Context, cfg *config.Config, opts ...Option) ([]byte, []Diagnostic, error) + func (d Diagnostic) String() string + type File struct + Content []byte + IsOverwritten bool + Kind FileKind + Package string + Parts []string + Path string + type FileKind int + const FileGenerated + const FileScaffold + type Operation struct + Bodies []Body + ClientRequestOptions TypeRef + ClientResponse TypeRef + HasOptions bool + ID string + IsRouted bool + Method string + Path string + RequestOptions TypeRef + ResponseData TypeRef + Responses []Response + Success *Response + Summary string + Tags []string + type Option func(*options) + func WithSpec(data []byte) Option + type Response struct + Body TypeRef + Code int + Constructor TypeRef + ContentType string + HasStatusArg bool + IsRaw bool + IsStream bool + Status string + type Result struct + Diagnostics []Diagnostic + Files []File + func Generate(ctx context.Context, cfg *config.Config, opts ...Option) (*Result, error) + type Severity int + const SeverityError + const SeverityInfo + const SeverityWarning + func (s Severity) String() string + type TypeRef struct + ImportPath string + Name string + Package string + func (t TypeRef) Elem() TypeRef + type WriteAction int + const ActionSkip + const ActionWrite + func (a WriteAction) String() string + type WriteOptions struct + DryRun bool + type WriteReport struct + Action WriteAction + Path string + func Write(res *Result, opts WriteOptions) ([]WriteReport, error)