- Notifications
You must be signed in to change notification settings - Fork5
GitHub Action to generate a python client package from an openapi spec
License
openapi-generators/openapi-python-client-action
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The official GitHub Action foropenapi-python-client - generates a modern Python client package from an OpenAPI document
The version of the openapi-python-client package to use. If unspecified the latest released version will be used.Version 2 of this action only supports version 0.9.0+ of the generator. Use version 1 of this action for older versions of the generator.
The path (with respect to the current directory/the workspace) to the OpenAPI document (both JSON and YAML are supported). Defaults to just "openapi.json" i.e. a file in the current directory called openapi.json.
The url of the OpenAPI document. Overridesopenapi-file - If unspecified the value of theopenapi-file input (which defaults to justopenapi.json) will be used to generate the client.
The path (with respect to the current directory/the workspace) to the config.yml to be used with openapi-python-client. Configuaration is not required so if this is unspecified then no configuration will be passed along. Seeopenapi-python-client's README for available configuration
This is a catch-all to allow you to pass additional arguments toopenapi-python-client.
No outputs are returned.The generated client is placed in the current directory. The name of the package (unless configured differently) will betitle-client where "title" comes from the field with the same name within theinfo section of the openapi document.
jobs:generate-python-client:runs-on:ubuntu-latestname:Examplesteps:# Checkout your code -name:Checkoutuses:actions/checkout@v2# Generate your openapi document (if you don't write it manually)# Use the action to generate a client package# This uses all defaults (latest version, openapi.json in the current workspace, no configuration) -name:Generate Python Clientuses:openapi-generators/openapi-python-client-action@v2# Do something with the generated client (likely publishing it somewhere)# Here we assume that the info/title in the openapi document was "example-project" -name:Do something with the clientrun:| cd example-project-client
About
GitHub Action to generate a python client package from an openapi spec
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.