Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hatamiarash7/openapi-generator
OpenAPI generator action
https://github.com/hatamiarash7/openapi-generator
api openai openapi-generator
Last synced: about 1 month ago
JSON representation
OpenAPI generator action
- Host: GitHub
- URL: https://github.com/hatamiarash7/openapi-generator
- Owner: hatamiarash7
- License: mit
- Created: 2023-05-31T10:19:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-21T06:55:43.000Z (about 1 year ago)
- Last Synced: 2024-10-03T16:40:15.215Z (about 2 months ago)
- Topics: api, openai, openapi-generator
- Language: Mustache
- Homepage: https://github.com/marketplace/actions/openapi-generator
- Size: 51.8 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenAPI Generator Action
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/hatamiarash7/openapi-generator?color=%2300baba&label=Marketplace&logo=github) [![Test](https://github.com/hatamiarash7/openapi-generator/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/hatamiarash7/openapi-generator/actions/workflows/test.yml)
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:
```yaml
name: Generate Code from OpenAPIon:
release:
types: [published]jobs:
generate_code:
runs-on: ubuntu-lateststeps:
- name: Checkout repository
uses: actions/checkout@v3- name: Generate code
uses: hatamiarash7/[email protected]
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](https://en.cryptobadges.io/badge/micro/3GhT2ABRuHuXGNzP6DH5KvLZRTXCBKkx2y)](https://en.cryptobadges.io/donate/3GhT2ABRuHuXGNzP6DH5KvLZRTXCBKkx2y) [![Donate with Ethereum](https://en.cryptobadges.io/badge/micro/0x4832fd8e2cfade141dc4873cc00cf77de604edde)](https://en.cryptobadges.io/donate/0x4832fd8e2cfade141dc4873cc00cf77de604edde)
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D1WGU9)
## 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.