I run into this problem generating the spec in an endpoint working with Fiber. Then I realized that same problem occurs when running the chi example:
internal error: package "encoding/json" without types was imported from "github.com/a-h/respond".
It seems usually these problems are environmental and involve stale cached packages, but cleaning the mod cache wasn't good enough.
In case this helps:
$ go version
go version go1.24.1 darwin/arm64
$uname -a
Darwin machinename.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Nov 14 18:19:02 PST 2024; root:xnu-11215.41.3~13/RELEASE_ARM64_T8132 arm64
edit: just cloned it and tests fail because of the same reason:
=== RUN TestSchema
=== RUN TestSchema/test000.yaml
--- PASS: TestSchema/test000.yaml (0.00s)
=== RUN TestSchema/test001.yaml
2025/03/28 12:55:44 internal error: package "net/http" without types was imported from "github.com/a-h/rest"