Add SwaggerUI to your AWS Apigateway RestApi
Project description
CDK Apigateway SwaggerUI
Add SwaggerUI to your AWS Apigateway RestApi
Install
TypeScript
npm install @pepperize/cdk-apigateway-swagger-ui
or
yarn add @pepperize/cdk-apigateway-swagger-ui
Python
pip install pepperize.cdk-apigateway-swagger-ui
C# / .Net
dotnet add package Pepperize.CDK.ApigatewaySwaggerUi
Java
<dependency>
<groupId>com.pepperize</groupId>
<artifactId>cdk-apigateway-swagger-ui</artifactId>
<version>${cdkApigatewaySwaggerUi.version}</version>
</dependency>
Usage
import { Stack } from "aws-cdk-lib";
import * as apigateway from "aws-cdk-lib/aws-apigateway";
import { SwaggerUi } from "@pepperize/cdk-apigateway-swagger-ui";
const stack = new Stack();
const restApi = new apigateway.RestApi();
new SwaggerUi(stack, "SwaggerUI", { resource: restApi.root });
- Open your SwaggerUI:
https://<rest api id>.execute-api.<aws region>.amazonaws.com/<stage>/api-docs/swagger-ui.html
- View your API docs:
https://<rest api id>.execute-api.<aws region>.amazonaws.com/<stage>/api-docs.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pepperize.cdk-apigateway-swagger-ui-0.0.728.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e702a48981715ae9f98c2e5726e5fb7f2ecb0bd2e22c6d1d92104dd28880e17c |
|
MD5 | ed0846b790aa41487d22f64143c95df3 |
|
BLAKE2b-256 | 1cbe7fbd7e697f30957375e6369ba191f0b41c8d101941ba00975c04f4917bd5 |
Close
Hashes for pepperize.cdk_apigateway_swagger_ui-0.0.728-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89f03153bf76621bc7d6f1d323095c6a241bd15bc39f46f2f3e35181411f7276 |
|
MD5 | 57b9f094b48bf8a53ec2b80b4d0f7d19 |
|
BLAKE2b-256 | 984ab824647b2c743c72c19f0dcb92cf274ff768b15064251f39f640f37a78a3 |