Skip to content

Commit

Permalink
Update readme, fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
austencollins committed Sep 18, 2020
1 parent 5cc5086 commit 32b468c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
- [x] **Custom Domain + SSL** - Auto-configure a custom domain w/ a free AWS ACM SSL certificate.
- [x] **Team Collaboration** - Collaborate with your teamates with shared state and outputs.
- [x] **Built-in Monitoring** - Monitor your express app right from the Serverless Dashboard.
- [x] **(NEW) Auto-Generate An OpenAPI Spec On Each Deployment** - A new OpenAPI spec is generated after each deployment.

<br/>

Expand Down Expand Up @@ -115,7 +114,6 @@ inputs:
- arn:aws:second:layer
domain: api.serverless.com # (optional) if the domain was registered via AWS Route53 on the account you are deploying to, it will automatically be set-up with your Express app's API Gateway, as well as a free AWS ACM SSL Cert.
region: us-east-2 # (optional) aws region to deploy to. default is us-east-1.
openApi: true # (optional) (experimental) Initialize the express app on each deployment, extract an OpenAPI V.3 specification, and add it to the outputs.
```
Once you've chosen your configuration, run `serverless deploy` again (or simply just `serverless`) to deploy your changes.
Expand Down Expand Up @@ -221,21 +219,6 @@ If things aren't working, revert your code to the old code, remove the `traffic`

If things are working, keep the new code, remove the `traffic` configuration option, and deploy.

### Auto-Generate An OpenAPI V3 Specification From Your Express.js App

Version 1.5.0 introduced experimental support for auto-generating an OpenAPI specification from your Express app upon every deployment, then adding them to the `outputs` of your app.

This works by attempting to run your application on each deployment and extracting the routes you've defined in your Express app.

Currently, this feature is disabled by default, since it's experimental. To enable it, add `openApi: true` to your `serverless.yml` and ensure you are using the latest version of the Express coponent (>= 1.1.0).

Given a lot of things can happen in your application upon starting it up, this does not work consistently. For example, your environment variables will NOT be available during this process, which could cause your app not to initialize.

If it runs into an error trying to start your application, it will try its best to pass through useful errors to you so you can address what's blocking it from working. You can see these by running `serverless deploy --debug`

Overall, an OpenAPI specification generated by default is very powerful. This means you don't have to maintain that manually since it auto-updates on every deployment. (That's what serverless is all about!)

We will be adding many interesting features built on this. Extracting your endpoints and putting them into a common format was merely the first step...

### How To Debug CORS Errors

Expand Down
4 changes: 0 additions & 4 deletions serverless.component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ actions:
min: 0
max: 1

openApi:
type: boolean
description: Automatically generate an OpenAPI specification on every deployment.

# remove

remove:
Expand Down

0 comments on commit 32b468c

Please sign in to comment.