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.456.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d8dbfd72030d09ef9b75451521644aa24d930cf952f30cb9ba4298daddcbdf7 |
|
MD5 | aa37c1fc54db96ab105d4dfe06c45815 |
|
BLAKE2b-256 | 9b7669986cc6e57672f5496d1114f0117b974a02d578a6bdfa1c7e1d351870cf |
Close
Hashes for pepperize.cdk_apigateway_swagger_ui-0.0.456-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0babc3862b67b32e84b1d188bfb7a950c1146eea62f0cbfc5dbb90313e26771 |
|
MD5 | 7eca543166097fd9af81cc561adb85d2 |
|
BLAKE2b-256 | 3d4476c54f739d4a95de05fca935fa3fedc3c6cbb3fe7d87d010ee3b644112ac |