specgen

command
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command specgen turns the fulfillmenttools OpenAPI spec into opmeta.gen.go: the metadata table that lets fft reach every operation the typed client does not have.

oapi-codegen generates a typed client for eight tags — 96 methods of the API's 576 operations. The other 480 have no Go method to call, so a command that wants to reach them has to build the request itself: method, path template, parameters and body. That is what this table carries.

It also carries something the spec does not: a **sample request body** for each of the 285 operations that take one. The spec has thousands of field-level `example:` values and not a single request-body example, so there is nothing to copy; the bodies are synthesized from the schemas (see sample.go).

Run it through `make generate`. CI re-runs it and fails on a diff, so the output must be a deterministic function of the spec.

go run ./tools/specgen -spec api/openapi/fft.api.swagger.yaml -out internal/api/opmeta.gen.go

Jump to

Keyboard shortcuts

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