Skip to content

Commit cfeeb0e

Browse files
committed
feat: Add extra-args arg (closes #4)
1 parent a25cb9c commit cfeeb0e

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

.github/workflows/checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: openapi-generators/openapi-python-client-action@updates
11+
- uses: openapi-generators/openapi-python-client-action@v2
1212
with:
1313
openapi-url: https://raw.githubusercontent.com/openapi-generators/openapi-python-client/main/end_to_end_tests/openapi.json

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ The url of the OpenAPI document. Overrides `openapi-file` - If unspecified the v
1919

2020
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. See [openapi-python-client's README](https://github.com/openapi-generators/openapi-python-client#configuration) for available configuration
2121

22+
### `extra-args`
23+
24+
This is a catch-all to allow you to pass additional arguments to `openapi-python-client`.
25+
2226
## Outputs
2327

2428
No outputs are returned.

action.yml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ inputs:
2121
description: Path to the config file to be passed along to openapi-python-client
2222
required: false
2323
default: NOT_SPECIFIED
24+
extra-args:
25+
description: Any additional arguments to forward to openapi-python-client
26+
required: false
27+
default: ""
2428

2529
runs:
2630
using: "docker"
@@ -30,3 +34,4 @@ runs:
3034
- ${{ inputs.openapi-file }}
3135
- ${{ inputs.openapi-url }}
3236
- ${{ inputs.config-file }}
37+
- ${{ inputs.extra-args }}

entrypoint.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ openapi_python_client_version=$1
66
openapi_file_path=$2
77
openapi_url=$3
88
config_file_path=$4
9+
extra_args=$5
910

1011
if [[ "$openapi_python_client_version" != "NOT_SPECIFIED" ]]; then
1112
version_arg="openapi-python-client==${openapi_python_client_version}"
@@ -26,4 +27,5 @@ fi
2627

2728
PATH=$PATH:/github/home/.local/bin
2829
pip install "${version_arg}"
29-
openapi-python-client generate ${config_arg} ${openapi_document_path_or_url_arg}
30+
# shellcheck disable=SC2086
31+
openapi-python-client generate $config_arg $openapi_document_path_or_url_arg $extra_args

0 commit comments

Comments
 (0)