genever generates TypeScript types from JSON Schema and OpenAPI documents. Since November 8 it also has a Go version, released as v0.1.0:
go get -tool github.com/JacobLey/leyman/apps/genever/go/cmd/[email protected]
Enter fullscreen mode
Exit fullscreen mode
It reads the same schemas, has the same strict mode, and rejects the same bad schemas with the same kind of error at the same JSON Pointer. It writes Go structs instead of TypeScript types. Two of genever's dependencies came along, because the Go command has to sign its output and keep a manifest the way the TypeScript one does: populate-files and generated-signature are Go modules now too, released at the same version.
This continues a pattern in my adoption of Go, which forces language-agnostic support for common functionality (in this case, type-ifying JSON Schema + OpenAPI).
None of the Go code is tested against the TypeScript code.…