TODO:
- fix serverless/serverless#7619
- template modifications
- tests
This GitHub Action syncs an OpenAPI spec with client SDK repositories.
Required Provide a GitHub App access token with create and write permissions.
The program exit code.
uses: actions/SDK-Generator@v1
with:
env:
- access-token: {{ github.secrets.SDK_GENERATOR_ACCESS_TOKEN }}
Set SDK_GENERATOR_ACCESS_TOKEN
in your repository secrets
If you want to have the SDK updated by using API Gateway:
- Create an IAM policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ExportSwagger",
"Effect": "Allow",
"Action": "apigateway:GET",
"Resource": "arn:aws:apigateway:*::/restapis/{apiId}/stages/dev/exports/oas30"
}
]
}
- Attach policy to user or role
- Supply access key & access token as secrets
...
with:
env:
...
- aws-key-id: {{ github.secrets.AWS_ACCESS_KEY_ID }}
- aws-key-secret: {{ github.secrets.AWS_SECRET_ACCESS_KEY }}
...