Skip to content

Commit 39b60b2

Browse files
authored
Merge pull request #270 from JaredCE/beta-rebase
Beta rebase
2 parents 0b062a5 + f8b89a9 commit 39b60b2

19 files changed

+3131
-3238
lines changed

.github/workflows/node.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2020

2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727
cache: "npm"

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
33

4-
name: Node.js Package
4+
name: Publish npm Package
55

66
on:
77
release:
88
types: [created]
99

10+
permissions:
11+
id-token: write # Required for OIDC
12+
contents: read
13+
1014
jobs:
1115
build:
1216
runs-on: ubuntu-latest
1317
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
1620
with:
1721
node-version: 20
1822
- run: npm ci
@@ -22,12 +26,12 @@ jobs:
2226
needs: build
2327
runs-on: ubuntu-latest
2428
steps:
25-
- uses: actions/checkout@v3
26-
- uses: actions/setup-node@v3
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-node@v4
2731
with:
2832
node-version: 20
2933
registry-url: https://registry.npmjs.org/
34+
- name: Update npm
35+
run: npm install -g npm@latest
3036
- run: npm ci
3137
- run: npm publish
32-
env:
33-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
/test/serverless-tests/*
1+
/test/*
22
.github/*
3+
.gitignore

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
</a>
1313
</p>
1414

15-
This will generate an [OpenAPI V3](https://spec.openapis.org/oas/v3.0.0.html) (up to v3.0.4) specification file for you from your serverless file. It can optionally generate a [Postman Collection V2](https://github.com/postmanlabs/openapi-to-postman) from the OpenAPI file for you too. This currently works for `http` and `httpApi` configurations.
15+
This will generate an OpenAPI V3 (up to v3.0.4) Document file for you from your serverless file. It can optionally generate a [Postman Collection V2](https://github.com/postmanlabs/openapi-to-postman) or (as of 0.0.120) [Bruno Collection](https://docs.usebruno.com/) from the OpenAPI file. This currently works for `http` and `httpApi` configurations.
1616

17-
If you are using the beta of 0.0.115, it will now try and create [OpenAPI V3.1 (3.1.x)](https://spec.openapis.org/oas/v3.1.0.html) specification file for you, should you run the command `serverless openapi generate -o openapi.json -f json -a 3.1.1 -p postman.json`. Please see this [guide on migrating to V3.1](https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0). Whilst I perosnally use this plugin all the time, please do open and report bugs, and I will do my best to fix them.
17+
If you are using the beta of 0.0.115, it will now try and create [OpenAPI V3.1 (3.1.x)](https://spec.openapis.org/oas/v3.1.0.html) Document for you, should you run the command `serverless openapi generate -o openapi.json -f json -a 3.1.1 -p postman.json`. Please see this [guide on migrating to V3.1](https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0). Whilst I perosnally use this plugin all the time, please do open and report bugs, and I will do my best to fix them.
1818

1919
Originally based off of: https://github.com/temando/serverless-openapi-documentation
2020

@@ -51,6 +51,7 @@ Options:
5151
--indent -i File indentation in spaces. Default: 2
5252
--openApiVersion -a OpenAPI version to generate for. Default: 3.0.0
5353
--postmanCollection -p Will generate a postman collection (from the generated OpenAPI Description), in json only, if passed in. Default: postman.json
54+
--brunoCollection -b Will generate a Bruno collection (from the generated OpenAPI Description), in json only, if passed in. Default: bruno.json
5455
--validationWarn -w Warn about validation errors only. Will write the OpenAPI file if generation is successful. Default: false
5556
```
5657

@@ -1110,7 +1111,7 @@ module.exports = {
11101111
dereference: {
11111112
circular: false, // Don't allow circular $refs
11121113
excludedPathMatcher: (
1113-
path // Skip dereferencing content under any 'example' key
1114+
path, // Skip dereferencing content under any 'example' key
11141115
) => path.includes("/example/"),
11151116
},
11161117
};

0 commit comments

Comments
 (0)