Code
Speed up your API development by converting your API spec into boilerplate generated code to help you get started. Blackbird currently creates go projects by using templates.
Test and debug your APIs against production-like traffic before you promote your code to production allowing you to inspect and troubleshoot in real-time.
Codegen using our Provided Template
First, download the sample petstore.yaml file to test with.
When using the provided template for Go projects, the following prompts will appear:
- ProjectName: Provide a name for your new Go project. This will also be the name for the
cmd
in your project. - GoModule: Provide a name for your new Go project's
go.mod
module. For more information, read about Using Go Modules. - GoVersion: Provide the Go version for your project. This value will also be used in
go.mod
. - enable GitHub Actions - Test module?: Generate a
.github/build.yaml
configuring CI testing for the project using GitHub Actions. - enable Readme module? [y/n]: Generate a basic
README.md
file for the project. - enable Dockerfile module? [y/n]: Generate a basic
Dockerfile
to use withblackbird code run
,blackbird code debug
, andblackbird deployment create
Using a Local Template
To generate your code using a locally available template, pass the path to the template as an argument.
Codegen without using a Template
To just generate the OpenAPI Spec-based code, pass the argument to not use a template.
Build and run a local container with a remote server
To start debugging an API or Mock, you need to pass in the instance name as well as the path to the dockerfile and context.
Build and debug a local container with a remote server
This command is similar to the run
command, but it attaches a debugger to the container.