Skip to content

Bazel rules for working with github.com/deepmap/oapi-codegen, the Go library for codegen-based OpenAPI servers.

License

Notifications You must be signed in to change notification settings

Silicon-Ally/rules_oapi_codegen

Repository files navigation

rules_oapi_codegen

CI Workflow

rules_oapi_codegen provides Bazel rules for generating Go code from OpenAPI 3.0 definitions. It uses deepmap/oapi-codegen to provide this functionality.

Usage

Look at the Releases page for instructions on how to update your Bazel WORKSPACE.

# In a BUILD.bazel file

load("@rules_oapi_codegen//oapi_codegen:def.bzl", "oapi_codegen_go")

oapi_codegen_go(
    name = "api",
    importpath = "<your import path>",
    spec = "<your OpenAPI YAML file>",
    visibility = ["//visibility:public"],
)

Example

The example directory provides the standard OpenAPI Petstore example, see the example/ README for more details.

Contributing

Contribution guidelines can be found on our website.

About

Bazel rules for working with github.com/deepmap/oapi-codegen, the Go library for codegen-based OpenAPI servers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published