Skip to content

hyeomans/tooldemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-tool-demo

A small demo project showing how to use go tool and generate Go code from an OpenAPI spec.

This repository demonstrates generating API types from an OpenAPI spec and a few useful go tool commands you can run against the built binary.

Prerequisites

  • Go 1.25.x (see go.mod)
  • Make (optional, used by the included Makefile)

Files of interest

  • misc/openapi.yml — OpenAPI spec used to generate API types.
  • misc/oapi-config.yml — configuration for the oapi-codegen tool.
  • cmd/service/api/generate.go — contains the //go:generate directive.
  • Makefile — helper targets: install-deps, generate.

About

A small demo project showing how to use `go tool` and generate Go code from an OpenAPI spec.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published