forked from WPFerg/services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
messages.yaml
100 lines (100 loc) · 1.96 KB
/
messages.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
swagger: "2.0"
info:
version: 0.0.1
title: go-ws-example
license:
name: MIT
url: http://opensource.org/licenses/MIT
host: api-3scale-apicast-staging.192.168.99.101.nip.io
basePath: /msgs
schemes:
- https
paths:
/messages:
get:
summary: Get all messages
parameters:
- name: user_key
in: query
type: string
required: true
responses:
200:
description: OK
schema:
$ref: "#/definitions/MessageList"
post:
summary: Add new message
parameters:
- name: user_key
in: query
type: string
required: true
- name: body
in: body
schema:
$ref: "#/definitions/MessageNew"
responses:
200:
description: OK
schema:
$ref: "#/definitions/ID"
/messages/{id}:
get:
parameters:
- name: user_key
in: query
type: string
required: true
- name: id
in: path
description: "ID of message"
required: true
type: "integer"
summary: Get message by id
responses:
200:
description: OK
schema:
$ref: "#/definitions/Message"
delete:
summary: Delete message by id
parameters:
- name: user_key
in: query
type: string
required: true
- name: id
in: path
description: "ID of message"
required: true
type: "integer"
responses:
200:
description: OK
definitions:
MessageNew:
type: object
properties:
Sender:
type: string
Message:
type: string
Message:
type: object
properties:
ID:
type: integer
Sender:
type: string
Message:
type: string
MessageList:
type: array
items:
$ref: "#/definitions/Message"
ID:
type: object
properties:
ID:
type: integer