...
1swagger: '2.0'
2info:
3 version: 0.0.0
4 title: 'AttendList'
5 description: |
6 AttendList service.
7 contact:
8 name: API Support
9 url: http://attendlist.co/support
10 email: contact@evecon.co
11consumes:
12 - application/json
13produces:
14 - application/json
15definitions:
16 Event:
17 title: Event
18 type: object
19 properties:
20 Id:
21 type: integer
22 format: int64
23 readOnly: true
24 Version:
25 type: integer
26 format: int64
27 readOnly: true
28 Created:
29 type: integer
30 format: int64
31 readOnly: true
32 Updated:
33 type: integer
34 format: int64
35 readOnly: true
36 Deleted:
37 type: boolean
38 readOnly: true
39 StartDate:
40 type: string
41 format: date-time
42 EndDate:
43 type: string
44 format: date-time
45 Latitude:
46 type: number
47 format: float
48 Longitude:
49 type: number
50 format: float
51 Name:
52 type: string
53 URL:
54 type: string
55 Notes:
56 type: string
57 Autosearch:
58 type: boolean
59 example:
60 StartDate: "2015-11-01T12:00:00Z"
61 EndDate: "2015-11-05T12:00:00Z"
62 Latitude: 59.842609
63 Longitude: 30.319087
64 Name: "Bikers meeting"
65 URL: "http://attendlist.co"
66 Notes: "Yet another bikers meeting"
67 Autosearch: false
68paths:
69 /events:
70 get:
71 description: Get events.
72 tags:
73 - events
74 operationId: getEvents
75 responses:
76 default:
77 description: Generic Error
78 '200':
79 description: Successful response
80 schema:
81 title: ArrayOfEvents
82 type: array
83 items:
84 $ref: '#/definitions/Event'
85 post:
86 description: Create new event.
87 tags:
88 - events
89 operationId: postEvent
90 parameters:
91 - name: Event
92 in: body
93 description: New events
94 required: true
95 schema:
96 $ref: '#/definitions/Event'
97 responses:
98 default:
99 description: Generic Error
100 '201':
101 description: |
102 Successful response.
103 'Location' header with link to /events/{id} containing new ID.
104 /events/{id}:
105 parameters:
106 - name: id
107 in: path
108 description: Existing event id.
109 required: true
110 type: integer
111 format: int64
112 get:
113 description: Get event by id.
114 tags:
115 - events
116 operationId: getEventById
117 responses:
118 default:
119 description: Generic Error
120 '200':
121 description: Successful response
122 schema:
123 title: Newly created event
124 $ref: '#/definitions/Event'
125 put:
126 description: Update existing event.
127 tags:
128 - events
129 operationId: putEventById
130 parameters:
131 - name: Event
132 in: body
133 description: Existing event
134 required: true
135 schema:
136 $ref: '#/definitions/Event'
137 responses:
138 default:
139 description: Generic Error
140 '204':
141 description: Successful response
142 delete:
143 description: Delete event by id.
144 tags:
145 - events
146 operationId: deleteEventById
147 responses:
148 default:
149 description: Generic Error
150 '204':
151 description: Successful response
View as plain text