StoplightでTODOアプリケーション用のAPI定義書作成
oapi-codegenをインストールしてコード生成
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest
oapi-codegen -package petstore petstore-expanded.yaml > petstore.gen.go
以下のパッケージをインストールする
"github.com/deepmap/oapi-codegen/pkg/runtime"
"github.com/getkin/kin-openapi/openapi3"
"github.com/labstack/echo/v4"
Applicationの初期化
copilot app init
Environmentの初期化とデプロイ
copilot env init
copilot env deploy --name dev
Serviceの初期化とデプロイ
copilot svc init
copilot svc deploy --name {service-name} --env dev
デプロイに成功するとエンドポイントが表示される
Recommended follow-up action:
- You can access your service at https://yhjp2pr4z3.ap-northeast-1.awsapprunner.com over the internet.