Skip to content

Commit f66af08

Browse files
author
sachin-maheshwari
authored
Merge pull request #11 from topcoder-platform/dev
Swagger api changes for v5 and new bus payload
2 parents eb01b0d + b0b2e02 commit f66af08

File tree

2 files changed

+59
-9
lines changed

2 files changed

+59
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
dist

docs/swagger.yaml

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ info:
66
title: "bus-api"
77
contact: {}
88
host: "localhost:3000"
9-
basePath: "/api/v1"
9+
basePath: "/v5/bus"
1010
schemes:
1111
- "https"
1212
consumes:
@@ -30,18 +30,41 @@ paths:
3030
schema:
3131
type: "object"
3232
required:
33-
- "message"
34-
- "type"
33+
- "topic"
34+
- "originator"
35+
- "timestamp"
36+
- "mime-type"
37+
- "payload"
3538
properties:
36-
type:
39+
topic:
3740
type: "string"
38-
description: "the event type, should be a dot separated fully qualitied\
41+
description: "topic name should be a dot separated fully qualified\
42+
\ name i.e. domain.type.operation"
43+
example: "notifications.action.email.project.topic.created"
44+
originator:
45+
type: "string"
46+
description: "service repository name, from where message is published"
47+
example: "tc-notifications"
48+
timestamp:
49+
type: "string"
50+
description: "ISO 8601 timestamp at which message is published.\
3951
\ name"
40-
example: "notifications.connect.project.update"
41-
message:
52+
example: "2018-04-13T00:00:00"
53+
mime-type:
4254
type: "string"
43-
description: "the message, should be a JSON formatted string"
44-
example: "{ \\\"test\\\": \\\"test-value\\\" }"
55+
description: "mime-type for 'payload'"
56+
example: "application/json"
57+
payload:
58+
type: "object"
59+
description: "actual payload depending on mime-type for consumer"
60+
example:
61+
data:
62+
subject: "project topic created"
63+
name: "xyz"
64+
recipients:
65+
- "tc@mailinator.com"
66+
- "tc2@mailinator.com"
67+
replyTo: ""
4568
responses:
4669
204:
4770
description: "OK"
@@ -87,6 +110,32 @@ paths:
87110
description: "internal server error"
88111
schema:
89112
$ref: "#/definitions/Error"
113+
/placeholders:
114+
delete:
115+
tags:
116+
- "placeholders"
117+
summary: "clear cache for placefolder"
118+
description: "clear the cache for placefolder validation for email topics."
119+
parameters: []
120+
responses:
121+
200:
122+
description: "OK"
123+
schema:
124+
type: "array"
125+
items:
126+
type: "string"
127+
401:
128+
description: "missing, invalid, or expired token"
129+
schema:
130+
$ref: "#/definitions/Error"
131+
403:
132+
description: "the calling service is not allowed"
133+
schema:
134+
$ref: "#/definitions/Error"
135+
500:
136+
description: "internal server error"
137+
schema:
138+
$ref: "#/definitions/Error"
90139
securityDefinitions:
91140
Bearer:
92141
type: "apiKey"

0 commit comments

Comments
 (0)