1 | openapi: 3.1.0
|
---|
2 | info:
|
---|
3 | title: Blacklist
|
---|
4 | version: '1'
|
---|
5 |
|
---|
6 | components:
|
---|
7 | schemas:
|
---|
8 | BlacklistElement:
|
---|
9 | type: object
|
---|
10 | properties:
|
---|
11 | name:
|
---|
12 | type: string
|
---|
13 | examples:
|
---|
14 | - TheFunPimp
|
---|
15 | description: Name of the banned player for display purposes. Can be empty.
|
---|
16 | userId:
|
---|
17 | $ref: './openapi.yaml#/components/schemas/TypeUserIdObject'
|
---|
18 | bannedUntil:
|
---|
19 | type: string
|
---|
20 | format: date-time
|
---|
21 | banReason:
|
---|
22 | type: string
|
---|
23 | examples:
|
---|
24 | - Cheating not allowed!
|
---|
25 | required:
|
---|
26 | - name
|
---|
27 | - userId
|
---|
28 | - bannedUntil
|
---|
29 | - banReason
|
---|
30 |
|
---|
31 | BlacklistList:
|
---|
32 | type: array
|
---|
33 | items:
|
---|
34 | $ref: '#/components/schemas/BlacklistElement'
|
---|
35 |
|
---|
36 |
|
---|
37 | requestBodies:
|
---|
38 | BlacklistBodyIn:
|
---|
39 | content:
|
---|
40 | application/json:
|
---|
41 | schema:
|
---|
42 | type: object
|
---|
43 | properties:
|
---|
44 | bannedUntil:
|
---|
45 | type: string
|
---|
46 | format: date-time
|
---|
47 | banReason:
|
---|
48 | type: string
|
---|
49 | examples:
|
---|
50 | - Cheating not allowed!
|
---|
51 | name:
|
---|
52 | type: string
|
---|
53 | examples:
|
---|
54 | - TheFunPimp
|
---|
55 | required:
|
---|
56 | - bannedUntil
|
---|
57 | required: true
|
---|
58 |
|
---|
59 |
|
---|
60 | paths:
|
---|
61 | /api/blacklist:
|
---|
62 | get:
|
---|
63 | tags:
|
---|
64 | - Permissions
|
---|
65 | summary: Blacklist list
|
---|
66 | description: Fetch a list of all blacklisted users
|
---|
67 | operationId: blacklist.get
|
---|
68 | responses:
|
---|
69 | 200:
|
---|
70 | description: List of blacklist entries
|
---|
71 | content:
|
---|
72 | application/json:
|
---|
73 | schema:
|
---|
74 | type: object
|
---|
75 | properties:
|
---|
76 | data:
|
---|
77 | $ref: '#/components/schemas/BlacklistList'
|
---|
78 | meta:
|
---|
79 | $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
|
---|
80 | required:
|
---|
81 | - data
|
---|
82 | - meta
|
---|
83 | 403:
|
---|
84 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
85 | security:
|
---|
86 | - apiTokenName: [ ]
|
---|
87 | apiTokenSecret: [ ]
|
---|
88 | - sessionCookie: [ ]
|
---|
89 |
|
---|
90 |
|
---|
91 | /api/blacklist/{id}:
|
---|
92 | # get:
|
---|
93 | # tags:
|
---|
94 | # - Permissions
|
---|
95 | # summary: Marker show
|
---|
96 | # description: Fetch a single defined map marker
|
---|
97 | # operationId: blacklist.get.id
|
---|
98 | # parameters:
|
---|
99 | # - $ref: '#/components/parameters/MarkerIdParameter'
|
---|
100 | # responses:
|
---|
101 | # 200:
|
---|
102 | # description: Single found marker
|
---|
103 | # $ref: '#/components/responses/MarkersBodyOut'
|
---|
104 | # 404:
|
---|
105 | # description: Marker ID not found, errorCode will be 'ID_NOT_FOUND'
|
---|
106 | # $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
107 |
|
---|
108 | post:
|
---|
109 | tags:
|
---|
110 | - Permissions
|
---|
111 | summary: Blacklist create
|
---|
112 | description: Create or update a blacklist entry
|
---|
113 | operationId: blacklist.post.id
|
---|
114 | parameters:
|
---|
115 | - $ref: './openapi.yaml#/components/parameters/UserIdPathParameter'
|
---|
116 | requestBody:
|
---|
117 | $ref: '#/components/requestBodies/BlacklistBodyIn'
|
---|
118 | responses:
|
---|
119 | 201:
|
---|
120 | description: Blacklist entry created or updated
|
---|
121 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
122 | 400:
|
---|
123 | description: Invalid request body, errorCode will be 'NO_OR_INVALID_BANNED_UNTIL'
|
---|
124 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
125 | 403:
|
---|
126 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
127 | security:
|
---|
128 | - apiTokenName: []
|
---|
129 | apiTokenSecret: []
|
---|
130 | - sessionCookie: []
|
---|
131 |
|
---|
132 | delete:
|
---|
133 | tags:
|
---|
134 | - Permissions
|
---|
135 | summary: Blacklist delete
|
---|
136 | description: Delete a single entry from the blacklist
|
---|
137 | operationId: blacklist.delete.id
|
---|
138 | parameters:
|
---|
139 | - $ref: './openapi.yaml#/components/parameters/UserIdPathParameter'
|
---|
140 | responses:
|
---|
141 | 204:
|
---|
142 | description: Deleted blacklist entry
|
---|
143 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
144 | 404:
|
---|
145 | description: User ID not found
|
---|
146 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
147 | 403:
|
---|
148 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
149 | security:
|
---|
150 | - apiTokenName: []
|
---|
151 | apiTokenSecret: []
|
---|
152 | - sessionCookie: []
|
---|