Skip to content

remarkablemark/setup-openapi

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

setup-openapi

version test License: MIT

🟒 Set up GitHub Actions workflow with OpenAPI Generator CLI.

This action installs Java, downloads the OpenAPI Generator CLI, caches it by version, and exposes the binary.

Quick Start

# .github/workflows/openapi.yml
on: push
jobs:
  openapi:
    runs-on: ubuntu-latest
    steps:
      - name: Setup OpenAPI
        uses: remarkablemark/setup-openapi@v1

      - name: Generate Ruby Client
        run: openapi-generator-cli generate -i petstore.yaml -g ruby -o /tmp/test/

Usage

Install OpenAPI Generator CLI tool:

- uses: remarkablemark/setup-openapi@v1

Generate a Ruby client from an OpenAPI spec:

- run: openapi-generator-cli generate -i petstore.yaml -g ruby -o /tmp/test/

See action.yml

Inputs

version

Optional: The OpenAPI Generator CLI version. Defaults to 7.21.0.

- uses: remarkablemark/setup-openapi@v1
  with:
    version: 7.21.0

name

Optional: The OpenAPI Generator CLI binary name. Defaults to openapi-generator-cli.

- uses: remarkablemark/setup-openapi@v1
  with:
    name: openapi-generator-cli

License

MIT