-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
martin.mueller
committed
Nov 24, 2020
1 parent
1392402
commit 37ac17a
Showing
10 changed files
with
901 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
"settings": {}, | ||
"editor.formatOnSave": true, | ||
"prettier.singleQuote": true, | ||
"prettier.trailingComma": true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
import * as apigw from '@aws-cdk/aws-apigateway'; | ||
import * as cdk from '@aws-cdk/core'; | ||
// import * as lambda from "@aws-cdk/aws-apigateway"; | ||
import { join } from 'path'; | ||
|
||
export interface AlpsSpecRestApiProps {} | ||
|
||
export class AlpsSpecRestApi extends cdk.Construct { | ||
constructor( | ||
scope: cdk.Construct, | ||
id: string, | ||
props: AlpsSpecRestApiProps = {}, | ||
) { | ||
constructor(scope: cdk.Construct, id: string, props?: AlpsSpecRestApiProps) { | ||
super(scope, id); | ||
props; | ||
|
||
const api = new apigw.RestApi(this, 'RestApi', { | ||
restApiName: 'Alps Rest Api Gw', | ||
}); | ||
// const uni = unified; | ||
const swaggerFile = 'src/todo-oas.yaml'; | ||
//const swaggerFile = 'src/openapi.yaml'; | ||
|
||
api.root.addMethod('ANY'); | ||
const api = new apigw.SpecRestApi(this, 'SpecRestApi', { | ||
// restApiName: 'Alps Rest Api Gw', | ||
apiDefinition: apigw.ApiDefinition.fromAsset( | ||
join(__dirname, `../${swaggerFile}`), | ||
), | ||
}); | ||
api; | ||
} | ||
} |
Oops, something went wrong.