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

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-openapi

version test License: MIT

🟢 Set up GitHub Actions workflow with OpenAPI Generator.

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 a valid petstore.yaml doc:

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

See action.yml

Note

On Windows, you'll need to install a higher Java version:

on: push
jobs:
  openapi:
    runs-on: windows-latest
    steps:
      - uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: 21
      - uses: remarkablemark/setup-openapi@v1

Inputs

version

Optional: The OpenAPI Generator version. Defaults to latest.

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

License

MIT