joekendal / SDK-Generator

GitHub Action for updating SDKs from an OpenAPI spec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TODO:

SDK Generator

This GitHub Action syncs an OpenAPI spec with client SDK repositories.

Inputs

access-token

Required Provide a GitHub App access token with create and write permissions.

Outputs

exit-code

The program exit code.

Example usage

uses: actions/SDK-Generator@v1
with:
  env:
    - access-token: {{ github.secrets.SDK_GENERATOR_ACCESS_TOKEN }}

Set SDK_GENERATOR_ACCESS_TOKEN in your repository secrets

Optional: AWS API Gateway Integration

If you want to have the SDK updated by using API Gateway:

  1. 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"
        }
    ]
}
  1. Attach policy to user or role
  2. 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 }}
...

About

GitHub Action for updating SDKs from an OpenAPI spec


Languages

Language:Go 91.3%Language:Dockerfile 6.6%Language:Shell 2.1%