# dev

Ariel Shaqed (Scolnicov)

01/09/2024, 12:13 PM
Hi devs, Bit of an strange question 😕: How do we recommend generating a lakeFS OpenAPI client for Go? Right now I put this in a file `gen.go`:
Copy code
// Package lakefsapi generates code for the lakeFS OpenAPI spec
package lakefsapi

//go:generate go run <|> -package apigen -generate "types,client" -o lakefs.gen.go <>
and then
go generate
builds it for me. Can I do better? In particular, can I somehow use the lakefs version that is already specified in my
(for other reasons)?

Barak Amar

01/09/2024, 12:37 PM
• We can commit the generated code as we can pull the code with the package. • oapi-codegen can accept yaml with instructions, as alternative to specify the command options • the spec also published in the docs website we can reference it, instead of the github raw, we can provide a link to generate the code or reference the spec from there.

Ariel Shaqed (Scolnicov)

01/09/2024, 3:52 PM