The spec is now built from the same calls that register the routes, so it
can't drift from the router like the swag comments did (all /api/v1
routes were missing).
- /api/v1 endpoints are typed Huma operations; the spec is OpenAPI 3.1 at
/openapi.json (3.0 at /openapi-3.0.json, YAML too), docs at /docs.
/openapi and /swagger/* redirect there
- Bearer token security is declared per operation; token creation and
the new GET /api/v1/health are public
- Legacy routes use the same handlers, are hidden from the spec and keep
the Deprecation header
- /sync/reset is hidden (debug only); the /sync/new, /sync/quick and
/sync/new/full aliases are removed (use /sync and /sync/full)
- Invalid parameters return 422 (validation); every error is
{"error": "..."}; empty lists are [] instead of null
- /sync/progress is documented as progress or result (oneOf)
- Tests validate the spec and check real responses of every documented
operation against it (kin-openapi)
- Removed swag annotations, cmd/docs, echo-swagger and the swag tool
37 lines
660 B
TOML
37 lines
660 B
TOML
root = "."
|
|
testdata_dir = "testdata"
|
|
tmp_dir = "tmp"
|
|
|
|
[build]
|
|
bin = "./tmp/main"
|
|
cmd = "go build -o ./tmp/main ./cmd"
|
|
delay = 1000
|
|
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
|
|
exclude_file = []
|
|
exclude_regex = ["_test.go"]
|
|
exclude_unchanged = false
|
|
follow_symlink = false
|
|
full_bin = ""
|
|
include_dir = []
|
|
include_ext = ["go", "tpl", "tmpl", "html"]
|
|
kill_delay = "0s"
|
|
log = "build-errors.log"
|
|
send_interrupt = false
|
|
stop_on_error = true
|
|
|
|
[color]
|
|
app = ""
|
|
build = "yellow"
|
|
main = "magenta"
|
|
runner = "green"
|
|
watcher = "cyan"
|
|
|
|
[log]
|
|
time = false
|
|
|
|
[misc]
|
|
clean_on_exit = false
|
|
|
|
[screen]
|
|
clear_on_rebuild = false
|