Skip to content

Commit 3543903

Browse files
committed
chore: reformat
1 parent fca39ec commit 3543903

12 files changed

Lines changed: 1422 additions & 1447 deletions

File tree

.eslintrc.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
module.exports = {
22
extends: [
3-
'eslint:recommended',
4-
'plugin:@typescript-eslint/recommended',
5-
'plugin:prettier/recommended',
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:prettier/recommended",
66
],
77
parserOptions: {
88
tsconfigRootDir: __dirname,
9-
project: ['./tsconfig.json'],
9+
project: ["./tsconfig.json"],
1010
},
1111
ignorePatterns: [
12-
'.eslintrc.js', // https://stackoverflow.com/q/63118405
13-
'jest.config.js',
14-
'dist/**',
12+
".eslintrc.js", // https://stackoverflow.com/q/63118405
13+
"jest.config.js",
14+
"dist/**",
1515
],
1616

1717
rules: {
18-
curly: ['error', 'multi-line'],
19-
'@typescript-eslint/no-non-null-assertion': 0,
20-
'@typescript-eslint/no-empty-interface': 0,
21-
'@typescript-eslint/ban-types': 1,
22-
'@typescript-eslint/no-unused-vars': [
23-
'error',
18+
curly: ["error", "multi-line"],
19+
"@typescript-eslint/no-non-null-assertion": 0,
20+
"@typescript-eslint/no-empty-interface": 0,
21+
"@typescript-eslint/ban-types": 1,
22+
"@typescript-eslint/no-unused-vars": [
23+
"error",
2424
{
25-
argsIgnorePattern: '^_',
26-
varsIgnorePattern: '^_',
25+
argsIgnorePattern: "^_",
26+
varsIgnorePattern: "^_",
2727
},
2828
],
2929
},

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Setup Node
1111
uses: actions/setup-node@v4
1212
with:
13-
cache: 'yarn'
14-
node-version: '20'
13+
cache: "yarn"
14+
node-version: "20"
1515
- run: yarn install
1616
- run: yarn run build

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Setup Node
1111
uses: actions/setup-node@v4
1212
with:
13-
cache: 'yarn'
14-
node-version: '20'
13+
cache: "yarn"
14+
node-version: "20"
1515
- run: yarn install
1616
- run: yarn run lint

.prettierrc.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
{
2-
"singleQuote": true,
3-
"arrowParens": "always",
4-
"trailingComma": "all",
5-
"printWidth": 110
6-
}
1+
{}

README.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ jobs:
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
6464
include:
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
6767
upload-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

141141
Remember 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

146145
If 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

194193
This assumes the following secrets have been [uploaded to your GitHub Actions Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets):

action.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ runs:
88
main: dist/index.js
99
inputs:
1010
stainless_api_key:
11-
description: 'Stainless API key.'
11+
description: "Stainless API key."
1212
required: true
1313
input_path:
14-
description: 'Path to the OpenAPI file.'
14+
description: "Path to the OpenAPI file."
1515
required: true
1616
config_path:
17-
description: 'Path to the Stainless config file.'
17+
description: "Path to the Stainless config file."
1818
required: false
1919
output_path:
20-
description: 'Output path for the decorated OpenAPI spec.'
20+
description: "Output path for the decorated OpenAPI spec."
2121
project_name:
22-
description: 'Stainless project name.'
22+
description: "Stainless project name."
2323
required: true
2424
commit_message:
25-
description: 'Commit message to use in the commits in the SDK repo.'
25+
description: "Commit message to use in the commits in the SDK repo."
2626
required: false
2727
guess_config:
28-
description: 'If true, renegerate the endpoints in the Stainless config file.'
28+
description: "If true, renegerate the endpoints in the Stainless config file."
2929
required: false
30-
default: 'false'
30+
default: "false"
3131
branch:
32-
description: 'If true, renegerate the endpoints in the Stainless config file.'
32+
description: "If true, renegerate the endpoints in the Stainless config file."
3333
required: false
34-
default: 'main'
34+
default: "main"

0 commit comments

Comments
 (0)