-
Notifications
You must be signed in to change notification settings - Fork 0
/
apispec.yaml
97 lines (95 loc) · 2.87 KB
/
apispec.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
openapi: 3.0.1
info:
description: 'Spezifikation für die Rocket API zur AStA Jobbörse'
version: 0.1.1
title: 'AStA Jobbörse API'
contact:
email: [email protected]
license:
name: AGPLv3
url: 'https://www.gnu.org/licenses/agpl-3.0.html'
paths:
'/':
get:
operationId: getPosts
summary: 'Get all job postings'
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Post'
example:
- { id: 1,
author: 12,
date: '1900-01-01 00:00:00',
modified: '1900-01-01 00:00:00',
content: 'Weitere Informationen findest Du <a href="https://asta.uni-paderborn.de/wp-content/uploads/xxxx/yy/Stellenausschreibung-*.pdf">hier.</a>',
title: 'Programmierer (m/w) gesucht',
excerpt: 'Weitere Informationen [...]'
}
- { id: 2,
author: 12,
date: '1900-01-01 00:00:00',
modified: '1900-01-01 00:00:00',
content: 'Weitere Informationen findest Du <a href="https://asta.uni-paderborn.de/wp-content/uploads/xxxx/yy/Stellenausschreibung-*.pdf">hier.</a>',
title: 'Programmierer (m/w) gesucht',
excerpt: 'Weitere Informationen [...]'
}
'500':
$ref: '#/components/responses/ServerError'
'/{post_id}':
get:
operationId: getPost
summary: 'Get a single post'
parameters:
- in: path
name: post_id
description: 'The ID of the job (as in database id _and_ id from the JSON)'
schema:
type: integer
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Post'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
servers:
- url: 'https://asta.upb.de/jobboerse_api'
description: Backend
components:
responses:
NotFound:
description: '404 - Not Found'
ServerError:
description: '500 - Internal Server Error - Most likely a database problem'
schemas:
Post:
type: object
properties:
id:
type: integer
author:
type: integer
date:
type: string
format: date-time
modified:
type: string
format: date-time
content:
type: string
title:
type: string
excerpt:
type: string
name:
type: string