generated from nationalarchives/da-template
-
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.
TDR-3364 - Create API Gateway resource (#24)
- Loading branch information
Showing
3 changed files
with
75 additions
and
3 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
56 changes: 56 additions & 0 deletions
56
terraform/templates/api_gateway/reference_generator.json.tpl
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"swagger" : "2.0", | ||
"info" : { | ||
"description" : "API Gateway for Reference Generator", | ||
"version" : "2023-09-11T11:10:51Z", | ||
"title" : "${title}" | ||
}, | ||
"basePath" : "/${environment}", | ||
"schemes" : [ "https" ], | ||
"paths" : { | ||
"/counter" : { | ||
"get" : { | ||
"produces" : [ "application/json" ], | ||
"parameters" : [ { | ||
"name" : "numberofrefs", | ||
"in" : "query", | ||
"required" : true, | ||
"type" : "string" | ||
} ], | ||
"responses" : { | ||
"200" : { | ||
"description" : "200 response", | ||
"schema" : { | ||
"$ref" : "#/definitions/Empty" | ||
} | ||
} | ||
}, | ||
"x-amazon-apigateway-request-validator" : "Validate query string parameters and headers", | ||
"x-amazon-apigateway-integration" : { | ||
"type" : "aws_proxy", | ||
"httpMethod" : "POST", | ||
"uri" : "arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/${lambda_arn}/invocations", | ||
"responses" : { | ||
"default" : { | ||
"statusCode" : "200" | ||
} | ||
}, | ||
"passthroughBehavior" : "when_no_match", | ||
"contentHandling" : "CONVERT_TO_TEXT" | ||
} | ||
} | ||
} | ||
}, | ||
"definitions" : { | ||
"Empty" : { | ||
"type" : "object", | ||
"title" : "Empty Schema" | ||
} | ||
}, | ||
"x-amazon-apigateway-request-validators" : { | ||
"Validate query string parameters and headers" : { | ||
"validateRequestParameters" : true, | ||
"validateRequestBody" : false | ||
} | ||
} | ||
} |