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.423.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8027708aada25c553d262158d97737ce349863226c8adf9e7eaca97a0ac5ec23 |
|
MD5 | f1011506179156c762f540b1d684d385 |
|
BLAKE2b-256 | e5260d20ac38ace53e2d7c4a4d61d18678f102427ab6485edcbaad85fb695eb7 |
Close
Hashes for pepperize.cdk_apigateway_swagger_ui-0.0.423-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f47c0143834bfcf6fa5dd47074e00d7c14db6a91990014b4be7a2a709dd6ea29 |
|
MD5 | 76baa7ff040f30f9ae7b6f261ad5a13c |
|
BLAKE2b-256 | bb6ac4dd8ab707f94679e930cde4d9467fef758a701bd46ba9d53f7bdec55025 |