Skip to content

Commit 473a205

Browse files
committed
chore(ci): fix release
1 parent 82cc494 commit 473a205

File tree

3 files changed

+72
-95
lines changed

3 files changed

+72
-95
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
node-version: '16.x'
1515
cache: 'npm'
1616
scope: '@nightapes'
17+
registry-url: 'https://registry.npmjs.org'
18+
1719
id: node
1820

1921
- name: Install
@@ -50,5 +52,6 @@ jobs:
5052
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5153
GITHUB_PAT: ${{ secrets.PAT_GITHUB }}
5254
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5356
run: |
5457
./go-semantic-release release -l info

.release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ branch:
88
hooks:
99
preRelease:
1010
- npm version --prefix packages/serverless-openapi --new-version $(./go-semantic-release next)
11-
- npm publish dist/packages/serverless-openapi
11+
- npm publish dist/packages/serverless-openapi --access public

README.md

Lines changed: 68 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,68 @@
1-
2-
3-
# ServerlessOpenapi
4-
5-
This project was generated using [Nx](https://nx.dev).
6-
7-
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p>
8-
9-
🔎 **Smart, Fast and Extensible Build System**
10-
11-
## Adding capabilities to your workspace
12-
13-
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
14-
15-
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
16-
17-
Below are our core plugins:
18-
19-
- [React](https://reactjs.org)
20-
- `npm install --save-dev @nrwl/react`
21-
- Web (no framework frontends)
22-
- `npm install --save-dev @nrwl/web`
23-
- [Angular](https://angular.io)
24-
- `npm install --save-dev @nrwl/angular`
25-
- [Nest](https://nestjs.com)
26-
- `npm install --save-dev @nrwl/nest`
27-
- [Express](https://expressjs.com)
28-
- `npm install --save-dev @nrwl/express`
29-
- [Node](https://nodejs.org)
30-
- `npm install --save-dev @nrwl/node`
31-
32-
There are also many [community plugins](https://nx.dev/community) you could add.
33-
34-
## Generate an application
35-
36-
Run `nx g @nrwl/react:app my-app` to generate an application.
37-
38-
> You can use any of the plugins above to generate applications as well.
39-
40-
When using Nx, you can create multiple applications and libraries in the same workspace.
41-
42-
## Generate a library
43-
44-
Run `nx g @nrwl/react:lib my-lib` to generate a library.
45-
46-
> You can also use any of the plugins above to generate libraries as well.
47-
48-
Libraries are shareable across libraries and applications. They can be imported from `@serverless-openapi/mylib`.
49-
50-
## Development server
51-
52-
Run `nx serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
53-
54-
## Code scaffolding
55-
56-
Run `nx g @nrwl/react:component my-component --project=my-app` to generate a new component.
57-
58-
## Build
59-
60-
Run `nx build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
61-
62-
## Running unit tests
63-
64-
Run `nx test my-app` to execute the unit tests via [Jest](https://jestjs.io).
65-
66-
Run `nx affected:test` to execute the unit tests affected by a change.
67-
68-
## Running end-to-end tests
69-
70-
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
71-
72-
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
73-
74-
## Understand your workspace
75-
76-
Run `nx graph` to see a diagram of the dependencies of your projects.
77-
78-
## Further help
79-
80-
Visit the [Nx Documentation](https://nx.dev) to learn more.
81-
82-
83-
84-
## ☁ Nx Cloud
85-
86-
### Distributed Computation Caching & Distributed Task Execution
87-
88-
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png"></p>
89-
90-
Nx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly.
91-
92-
Teams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nx’s advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers.
93-
94-
Visit [Nx Cloud](https://nx.app/) to learn more.
1+
# serverless-openapi
2+
3+
A simple openapi generator for [serverless](serverless.com).
4+
5+
Support for serverless 2 and 3
6+
7+
The files is generated locally without any upload to aws apigateway.
8+
9+
## Install
10+
11+
`npm i -D @nightapes/serverless-openapi`
12+
13+
## Usage
14+
15+
Add plugin into your `serverless.yml` file
16+
17+
```yml
18+
plugins:
19+
- serverless-openapi
20+
```
21+
22+
## Add basic info
23+
24+
Under `custom` add
25+
26+
```yml
27+
custom:
28+
openapi:
29+
title: 'my fancy openapi'
30+
version: '1.0.0'
31+
description: 'My description of the serverless api'
32+
```
33+
34+
## Example for request and response schema
35+
36+
Works only for http events, the request is the default serverless request schema.
37+
38+
```yml
39+
events:
40+
- http:
41+
path: v1/user-settings
42+
method: put
43+
authorizer:
44+
name: authorizer
45+
scopes:
46+
- admin
47+
operationId: setUserSettings
48+
cors: true
49+
request:
50+
schemas:
51+
application/json:
52+
schema: ${file(./your-schema.json)}
53+
name: UserSettings
54+
responseSchemas:
55+
200:
56+
application/json:
57+
schema: ${file(./your-schema.json)}
58+
name: UserSettings
59+
description: 'UserSettings'
60+
204:
61+
application/json:
62+
description: 'OK'
63+
```
64+
65+
## TODO
66+
67+
- Servers
68+
- Authorizer

0 commit comments

Comments
 (0)