Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Latest commit

 

History

History
31 lines (23 loc) · 832 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 832 Bytes

Github Actions to generate the golang codes from OAPI specs

MIT License

This action uses the oapi-codegen to generate the golang codes from OpenAPI specs.

oapi-codegen

Inputs

Input Required Default Description
oapi Yes openapi-spec.yaml OpenAPI specfile
boilerplates No server,types,spec Boilerplates types
package No main Package name
export No true Enable exporting to file
export_filename No server.gen.go Export file name

Example Usage

uses: soharaki/oapi-codegen@v1.0.0
with:
    oapi: "openapi-spec.yaml"
    boilerplates: "server,types,spec"
    package: "api"
    export: true
    export_filename: "server.gen.go"

I am deeply grateful to @deepmap.