4646 - uses : stainless-api/upload-openapi-spec-action@main
4747 with :
4848 stainless_api_key : ${{ secrets.STAINLESS_API_KEY }}
49- input_path : ' path/to/my-company-openapi.json'
50- project_name : ' my-stainless-project'
51- commit_message : ' feat(api): my cool feature'
49+ input_path : " path/to/my-company-openapi.json"
50+ project_name : " my-stainless-project"
51+ commit_message : " feat(api): my cool feature"
5252 guess_config : true
5353` ` `
5454
@@ -62,16 +62,16 @@ Then, add the following to your `.gitlab-ci.yml` file:
6262
6363` ` ` yaml
6464include:
65- - remote: ' https://raw.githubusercontent.com/stainless-api/upload-openapi-spec-action/main/.gitlab-ci.yml'
65+ - remote: " https://raw.githubusercontent.com/stainless-api/upload-openapi-spec-action/main/.gitlab-ci.yml"
6666
6767upload-openapi-spec:
6868 extends: .upload-openapi-spec
6969 variables:
7070 STAINLESS_API_KEY: "$STAINLESS_API_KEY"
71- INPUT_PATH: ' $CI_PROJECT_DIR/path/to/my-company-openapi.json'
72- PROJECT_NAME: ' my-stainless-project'
73- COMMIT_MESSAGE: ' feat(api): my cool feature'
74- GUESS_CONFIG: ' true'
71+ INPUT_PATH: " $CI_PROJECT_DIR/path/to/my-company-openapi.json"
72+ PROJECT_NAME: " my-stainless-project"
73+ COMMIT_MESSAGE: " feat(api): my cool feature"
74+ GUESS_CONFIG: " true"
7575 # CONFIG_PATH: '$CI_PROJECT_DIR/path/to/my-company.stainless.yaml' # Optional
7676 # OUTPUT_PATH: '$CI_PROJECT_DIR/path/to/output.json' # Optional
7777 # BRANCH: 'main' # Optional
@@ -82,16 +82,16 @@ You can identify your Stainless project name on the [Stainless dashboard](https:
8282# ## Optional parameters
8383
8484- `branch` : Specifies the branch to push files to. If you provide it, the project MUST have the [branches
85- feature](https://app.stainless.com/docs/guides/branches) enabled. By default, it is `main`.
85+ feature](https://app.stainless.com/docs/guides/branches) enabled. By default, it is `main`.
8686
8787- `commit_message` : Specifies the commit message that we will use for the commits generated for your SDKs as a result
88- of the API change (and which will subsequently appear in the Changelog). If you provide it, it MUST follow the
89- [Conventional Commits format](https://www.conventionalcommits.org/en/v1.0.0/). If you do not provide it, we will use a
90- default message.
88+ of the API change (and which will subsequently appear in the Changelog). If you provide it, it MUST follow the
89+ [Conventional Commits format](https://www.conventionalcommits.org/en/v1.0.0/). If you do not provide it, we will use a
90+ default message.
9191
9292- `guess_config` : When `true`, will update your Stainless config file based on the change you've made to your spec. This
93- does the same thing as selecting the "Generate missing endpoints" button in the Studio. By default, it is `false`. You
94- should not set this to `true` if you are passing a `config_path`.
93+ does the same thing as selecting the "Generate missing endpoints" button in the Studio. By default, it is `false`. You
94+ should not set this to `true` if you are passing a `config_path`.
9595
9696# # Usage with ReadMe for docs with example snippets
9797
@@ -122,10 +122,10 @@ jobs:
122122 - uses: stainless-api/upload-openapi-spec-action@main
123123 with:
124124 stainless_api_key: ${{ secrets.STAINLESS_API_KEY }}
125- input_path: ' path/to/my-company-openapi.json'
126- output_path: ' path/to/my-company-openapi.documented.json'
127- project_name: ' my-stainless-project'
128- commit_message: ' feat(api): my cool feature'
125+ input_path: " path/to/my-company-openapi.json"
126+ output_path: " path/to/my-company-openapi.documented.json"
127+ project_name: " my-stainless-project"
128+ commit_message: " feat(api): my cool feature"
129129 - uses: readmeio/rdme@v8
130130 with:
131131 rdme: openapi "path/to/my-company-openapi.documented.json" --key=${{ secrets.README_TOKEN }} --id=${{ secrets.README_DEFINITION_ID }}
@@ -140,7 +140,6 @@ This assumes the following secrets have been [uploaded to your GitHub Actions Se
140140
141141Remember to set the `readmeio/rdme` ref version to the latest stable available (`v8`, as of this writing). You can verify the latest version of ReadMe's GitHub Action [here](https://github.com/marketplace/actions/rdme-sync-to-readme).
142142
143-
144143# # Usage with Mintlify for docs with example snippets
145144
146145If you use Mintlify's OpenAPI support for your API reference documentation,
@@ -174,21 +173,21 @@ jobs:
174173 uses: stainless-api/upload-openapi-spec-action@main
175174 with:
176175 stainless_api_key: ${{ secrets.STAINLESS_API_KEY }}
177- input_path: ' path/to/my-company-openapi.json'
178- output_path: ' path/to/my-company-openapi.documented.json'
179- project_name: ' my-stainless-project'
180- commit_message: ' feat(api): my cool feature'
176+ input_path: " path/to/my-company-openapi.json"
177+ output_path: " path/to/my-company-openapi.documented.json"
178+ project_name: " my-stainless-project"
179+ commit_message: " feat(api): my cool feature"
181180 - name: Push documented spec to docs repo
182181 uses: dmnemec/copy_file_to_another_repo_action@main
183182 env:
184183 API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
185184 with:
186- source_file: ' path/to/my-company-openapi.documented.json'
187- destination_repo: ' {DOCS_REPO_NAME}'
188- destination_folder: ' openapi-specs' # (optional) the folder in the destination repository to place the file in, if not the root directory
189- user_email: ' {EMAIL}' # the email associated with the GH token
190- user_name: ' {USERNAME}' # the username associated with the GH token
191- commit_message: ' Auto-updates from Stainless'
185+ source_file: " path/to/my-company-openapi.documented.json"
186+ destination_repo: " {DOCS_REPO_NAME}"
187+ destination_folder: " openapi-specs" # (optional) the folder in the destination repository to place the file in, if not the root directory
188+ user_email: " {EMAIL}" # the email associated with the GH token
189+ user_name: " {USERNAME}" # the username associated with the GH token
190+ commit_message: " Auto-updates from Stainless"
192191` ` `
193192
194193This assumes the following secrets have been [uploaded to your GitHub Actions Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) :
0 commit comments