Skip to content

OpenAPI Generator

Actions
Generates a client library using OpenAPI generator
v0.3.0
Latest
Star (2)

Tags

 (1)

OpenAPI Generator Action

GitHub tag (latest by date) Test

This GitHub Action allows you to automatically generate code using the OpenAPI Tools generator. The OpenAPI Tools generator provides a set of powerful features to generate client SDKs, server stubs, documentation, and more from your OpenAPI specification file.

Usage

Here's an example workflow that demonstrates how to use this GitHub Action:

name: Generate Code from OpenAPI

on:
  release:
    types: [published]

jobs:
  generate_code:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Generate code
        uses: hatamiarash7/openapi-generator@v0.2.0
        with:
          generator: python
          openapi-file: example.yml

      # Do anything you want with the generated code
      - name: Do anything
        run: ...

Inputs

Name Type Default Description
generator Required The name of the generator to use e.g. "typescript-angular"
generator-tag latest The Docker tag of the openapitools/openapi-generator-cli image to use
openapi-file ./openapi.json The path to the OpenAPI document
openapi-url UNSET If set, the OpenAPI document will be loaded from this URL instead of openapi-file
config-file UNSET The path to the config file to be passed along to the generator
template-dir UNSET The path to the folder containing the template files
output-dir UNSET The path to the folder where the generated files will be placed
command-args Additional arguments to pass through to the generator

Note: The default output directory is ./{generator}-client. If you want to change this, you must set the output-dir input. You can also use the /github/workspace to write your files to the root of your repository.


Support

Donate with Bitcoin Donate with Ethereum

ko-fi

Contributing

Don't be shy and reach out to us if you want to contribute.

  1. Fork it !
  2. Create your feature branch : git checkout -b my-new-feature
  3. Commit your changes : git commit -am 'Add some feature'
  4. Push to the branch : git push origin my-new-feature
  5. Submit a pull request

Issues

Each project may have many problems. Contributing to the better development of this project by reporting them.

OpenAPI Generator is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Generates a client library using OpenAPI generator
v0.3.0
Latest

Tags

 (1)

OpenAPI Generator is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.