Skip to content

Commit

Permalink
Minor changes to README, ensure docs are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Giles committed Apr 22, 2020
1 parent 63c5550 commit 3b36e02
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/@aws-cdk/aws-apigateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ book.addMethod('DELETE');

Optionally, you can import a Swagger/OpenAPI definition, and API Gateway will create resources
and methods from your specification:
```
const api = apigateway.RestApi.fromAPIDefinition(
this,
'books-api',
apigateway.APIDefinition.fromAsset('path-to-your-swagger-file.json')
);
```ts
const api = new apigateway.APIDefinitionRestApi(this, 'books-api', {
apiDefinition: apigateway.APIDefinition.fromAsset('path-to-your-swagger-file.json')
});
```
[API Gateway Swagger/OpenAPI import limitations](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html) apply when creating a Rest API in this way.

Expand Down

0 comments on commit 3b36e02

Please sign in to comment.