-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
110 lines (109 loc) · 3.64 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
swagger: "2.0"
info:
description: "This is the properties service for AB2D and it's other services."
version: "1.0"
title: "Properties Service"
host: "properties.ab2d.cms.gov"
basePath: "/v1"
schemes:
- "https"
paths:
/properties:
get:
summary: "Retrieve the list of properties"
produces:
- "application/json"
responses:
200:
description: "Success"
401:
description: "Unauthorized"
500:
description: "Internal Server Error"
x-amazon-apigateway-integration:
type: "aws"
httpMethod: "GET"
uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:012345678901:function:propserviceapi-ReadPropertyFunction-SdJ94xzfaq9o/invocations"
responses:
default:
statusCode: 200
requestTemplates:
application/json: "#set($inputRoot = $input.path('$')) [ #foreach($elem in $inputRoot.bins) { \"key\": \"$elem.key\", \"value\": \"$elem.value\" } ]"
post:
summary: "Create a new property"
produces:
- "application/json"
responses:
201:
description: "Property Created"
401:
description: "Unauthorized"
500:
description: "Internal Server Error"
x-amazon-apigateway-integration:
type: "aws"
httpMethod: "POST"
uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:012345678901:function:propserviceapi-CreatePropertyFunction-PEN32oit8QeT/invocations"
responses:
default:
statusCode: 200
requestTemplates:
application/json: "{ \"status\": 201, \"description\": \"Property created: key\" }"
/properties/{key}:
get:
summary: "Find a property by its key"
produces:
- "application/json"
parameters:
-
name: "key"
in: "path"
description: "The key of the parameter to search for"
required: true
type: "string"
responses:
200:
description: "Success"
401:
description: "Unauthorized"
404:
description: "Property Not found"
500:
description: "Internal Server Error"
x-amazon-apigateway-integration:
type: "aws"
httpMethod: "GET"
uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:012345678901:function:propserviceapi-ReadSpecificPropertyFunction-lKYUnRf4QZAz/invocations"
responses:
default:
statusCode: 200
requestTemplates:
application/json: "{\"key\": \"key\", \"value\": \"value\"}"
delete:
summary: "delete property by its key"
produces:
- "application/json"
parameters:
- name: "key"
in: "path"
description: "The key of the parameter to delete"
required: true
type: "string"
responses:
200:
description: "Success"
401:
description: "Unauthorized"
404:
description: "Property Not found"
500:
description: "Internal Server Error"
x-amazon-apigateway-integration:
type: "aws"
httpMethod: "DELETE"
uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:012345678901:function:propserviceapi-DeletePropertyFunction-MRxbDE8yti35/invocations"
responses:
default:
statusCode: 200
requestTemplates:
application/json: "{ \"status\": 200, \"description\": \"Property deleted: key\"}"