Skip to content

Swagger api changes for v5 and new bus payload #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
dist
67 changes: 58 additions & 9 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ info:
title: "bus-api"
contact: {}
host: "localhost:3000"
basePath: "/api/v1"
basePath: "/v5/bus"
schemes:
- "https"
consumes:
Expand All @@ -30,18 +30,41 @@ paths:
schema:
type: "object"
required:
- "message"
- "type"
- "topic"
- "originator"
- "timestamp"
- "mime-type"
- "payload"
properties:
type:
topic:
type: "string"
description: "the event type, should be a dot separated fully qualitied\
description: "topic name should be a dot separated fully qualified\
\ name i.e. domain.type.operation"
example: "notifications.action.email.project.topic.created"
originator:
type: "string"
description: "service repository name, from where message is published"
example: "tc-notifications"
timestamp:
type: "string"
description: "ISO 8601 timestamp at which message is published.\
\ name"
example: "notifications.connect.project.update"
message:
example: "2018-04-13T00:00:00"
mime-type:
type: "string"
description: "the message, should be a JSON formatted string"
example: "{ \\\"test\\\": \\\"test-value\\\" }"
description: "mime-type for 'payload'"
example: "application/json"
payload:
type: "object"
description: "actual payload depending on mime-type for consumer"
example:
data:
subject: "project topic created"
name: "xyz"
recipients:
- "tc@mailinator.com"
- "tc2@mailinator.com"
replyTo: ""
responses:
204:
description: "OK"
Expand Down Expand Up @@ -87,6 +110,32 @@ paths:
description: "internal server error"
schema:
$ref: "#/definitions/Error"
/placeholders:
delete:
tags:
- "placeholders"
summary: "clear cache for placefolder"
description: "clear the cache for placefolder validation for email topics."
parameters: []
responses:
200:
description: "OK"
schema:
type: "array"
items:
type: "string"
401:
description: "missing, invalid, or expired token"
schema:
$ref: "#/definitions/Error"
403:
description: "the calling service is not allowed"
schema:
$ref: "#/definitions/Error"
500:
description: "internal server error"
schema:
$ref: "#/definitions/Error"
securityDefinitions:
Bearer:
type: "apiKey"
Expand Down