Skip to content

Commit d9ac8f7

Browse files
committed
openapi: Correct security definition
It's not using bearer token format. Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 79e6086 commit d9ac8f7

18 files changed

Lines changed: 418 additions & 323 deletions

docs/api/schemas/latest/patchwork.yaml

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ paths:
7676
post:
7777
description: Create a bundle.
7878
operationId: bundles_create
79-
# security:
80-
# - basicAuth: []
81-
# - apiKeyAuth: []
79+
security:
80+
- basicAuth: []
81+
- apiKeyAuth: []
8282
requestBody:
8383
$ref: '#/components/requestBodies/Bundle'
8484
responses:
@@ -132,9 +132,9 @@ paths:
132132
patch:
133133
description: Update a bundle (partial).
134134
operationId: bundles_partial_update
135-
# security:
136-
# - basicAuth: []
137-
# - apiKeyAuth: []
135+
security:
136+
- basicAuth: []
137+
- apiKeyAuth: []
138138
requestBody:
139139
$ref: '#/components/requestBodies/Bundle'
140140
responses:
@@ -167,9 +167,9 @@ paths:
167167
put:
168168
description: Update a bundle.
169169
operationId: bundles_update
170-
# security:
171-
# - basicAuth: []
172-
# - apiKeyAuth: []
170+
security:
171+
- basicAuth: []
172+
- apiKeyAuth: []
173173
requestBody:
174174
$ref: '#/components/requestBodies/Bundle'
175175
responses:
@@ -590,9 +590,9 @@ paths:
590590
patch:
591591
description: Update a patch (partial).
592592
operationId: patches_partial_update
593-
# security:
594-
# - basicAuth: []
595-
# - apiKeyAuth: []
593+
security:
594+
- basicAuth: []
595+
- apiKeyAuth: []
596596
requestBody:
597597
$ref: '#/components/requestBodies/Patch'
598598
responses:
@@ -631,9 +631,9 @@ paths:
631631
put:
632632
description: Update a patch.
633633
operationId: patches_update
634-
# security:
635-
# - basicAuth: []
636-
# - apiKeyAuth: []
634+
security:
635+
- basicAuth: []
636+
- apiKeyAuth: []
637637
requestBody:
638638
$ref: '#/components/requestBodies/Patch'
639639
responses:
@@ -837,9 +837,9 @@ paths:
837837
post:
838838
description: Create a check.
839839
operationId: checks_create
840-
# security:
841-
# - basicAuth: []
842-
# - apiKeyAuth: []
840+
security:
841+
- basicAuth: []
842+
- apiKeyAuth: []
843843
requestBody:
844844
$ref: '#/components/requestBodies/Check'
845845
responses:
@@ -907,9 +907,9 @@ paths:
907907
get:
908908
description: List people.
909909
operationId: people_list
910-
# security:
911-
# - basicAuth: []
912-
# - apiKeyAuth: []
910+
security:
911+
- basicAuth: []
912+
- apiKeyAuth: []
913913
parameters:
914914
- $ref: '#/components/parameters/Page'
915915
- $ref: '#/components/parameters/PageSize'
@@ -947,9 +947,9 @@ paths:
947947
get:
948948
description: Show a person.
949949
operationId: people_read
950-
# security:
951-
# - basicAuth: []
952-
# - apiKeyAuth: []
950+
security:
951+
- basicAuth: []
952+
- apiKeyAuth: []
953953
responses:
954954
'200':
955955
description: ''
@@ -1025,9 +1025,9 @@ paths:
10251025
patch:
10261026
description: Update a project (partial).
10271027
operationId: projects_partial_update
1028-
# security:
1029-
# - basicAuth: []
1030-
# - apiKeyAuth: []
1028+
security:
1029+
- basicAuth: []
1030+
- apiKeyAuth: []
10311031
requestBody:
10321032
$ref: '#/components/requestBodies/Project'
10331033
responses:
@@ -1060,9 +1060,9 @@ paths:
10601060
put:
10611061
description: Update a project.
10621062
operationId: projects_update
1063-
# security:
1064-
# - basicAuth: []
1065-
# - apiKeyAuth: []
1063+
security:
1064+
- basicAuth: []
1065+
- apiKeyAuth: []
10661066
requestBody:
10671067
$ref: '#/components/requestBodies/Project'
10681068
responses:
@@ -1160,9 +1160,9 @@ paths:
11601160
get:
11611161
description: List users.
11621162
operationId: users_list
1163-
# security:
1164-
# - basicAuth: []
1165-
# - apiKeyAuth: []
1163+
security:
1164+
- basicAuth: []
1165+
- apiKeyAuth: []
11661166
parameters:
11671167
- $ref: '#/components/parameters/Page'
11681168
- $ref: '#/components/parameters/PageSize'
@@ -1200,9 +1200,9 @@ paths:
12001200
get:
12011201
description: Show a user.
12021202
operationId: users_read
1203-
# security:
1204-
# - basicAuth: []
1205-
# - apiKeyAuth: []
1203+
security:
1204+
- basicAuth: []
1205+
- apiKeyAuth: []
12061206
responses:
12071207
'200':
12081208
description: ''
@@ -1227,9 +1227,9 @@ paths:
12271227
patch:
12281228
description: Update a user (partial).
12291229
operationId: users_partial_update
1230-
# security:
1231-
# - basicAuth: []
1232-
# - apiKeyAuth: []
1230+
security:
1231+
- basicAuth: []
1232+
- apiKeyAuth: []
12331233
requestBody:
12341234
$ref: '#/components/requestBodies/User'
12351235
responses:
@@ -1262,9 +1262,9 @@ paths:
12621262
put:
12631263
description: Update a user.
12641264
operationId: users_update
1265-
# security:
1266-
# - basicAuth: []
1267-
# - apiKeyAuth: []
1265+
security:
1266+
- basicAuth: []
1267+
- apiKeyAuth: []
12681268
requestBody:
12691269
$ref: '#/components/requestBodies/User'
12701270
responses:
@@ -1301,7 +1301,15 @@ components:
13011301
scheme: basic
13021302
apiKeyAuth:
13031303
type: http
1304-
scheme: bearer
1304+
scheme: token
1305+
description: |
1306+
Token-based authentication.
1307+
cookieAuth:
1308+
type: apiKey
1309+
in: cookie
1310+
name: JSESSIONID
1311+
description: |
1312+
Cookie-based authentication. This is mainly used for the browsable API.
13051313
parameters:
13061314
Page:
13071315
in: query

docs/api/schemas/patchwork.j2

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ paths:
8282
post:
8383
description: Create a bundle.
8484
operationId: bundles_create
85-
# security:
86-
# - basicAuth: []
87-
# - apiKeyAuth: []
85+
security:
86+
- basicAuth: []
87+
- apiKeyAuth: []
8888
requestBody:
8989
$ref: '#/components/requestBodies/Bundle'
9090
responses:
@@ -140,9 +140,9 @@ paths:
140140
patch:
141141
description: Update a bundle (partial).
142142
operationId: bundles_partial_update
143-
# security:
144-
# - basicAuth: []
145-
# - apiKeyAuth: []
143+
security:
144+
- basicAuth: []
145+
- apiKeyAuth: []
146146
requestBody:
147147
$ref: '#/components/requestBodies/Bundle'
148148
responses:
@@ -175,9 +175,9 @@ paths:
175175
put:
176176
description: Update a bundle.
177177
operationId: bundles_update
178-
# security:
179-
# - basicAuth: []
180-
# - apiKeyAuth: []
178+
security:
179+
- basicAuth: []
180+
- apiKeyAuth: []
181181
requestBody:
182182
$ref: '#/components/requestBodies/Bundle'
183183
responses:
@@ -609,9 +609,9 @@ paths:
609609
patch:
610610
description: Update a patch (partial).
611611
operationId: patches_partial_update
612-
# security:
613-
# - basicAuth: []
614-
# - apiKeyAuth: []
612+
security:
613+
- basicAuth: []
614+
- apiKeyAuth: []
615615
requestBody:
616616
$ref: '#/components/requestBodies/Patch'
617617
responses:
@@ -652,9 +652,9 @@ paths:
652652
put:
653653
description: Update a patch.
654654
operationId: patches_update
655-
# security:
656-
# - basicAuth: []
657-
# - apiKeyAuth: []
655+
security:
656+
- basicAuth: []
657+
- apiKeyAuth: []
658658
requestBody:
659659
$ref: '#/components/requestBodies/Patch'
660660
responses:
@@ -862,9 +862,9 @@ paths:
862862
post:
863863
description: Create a check.
864864
operationId: checks_create
865-
# security:
866-
# - basicAuth: []
867-
# - apiKeyAuth: []
865+
security:
866+
- basicAuth: []
867+
- apiKeyAuth: []
868868
requestBody:
869869
$ref: '#/components/requestBodies/Check'
870870
responses:
@@ -932,9 +932,9 @@ paths:
932932
get:
933933
description: List people.
934934
operationId: people_list
935-
# security:
936-
# - basicAuth: []
937-
# - apiKeyAuth: []
935+
security:
936+
- basicAuth: []
937+
- apiKeyAuth: []
938938
parameters:
939939
- $ref: '#/components/parameters/Page'
940940
- $ref: '#/components/parameters/PageSize'
@@ -972,9 +972,9 @@ paths:
972972
get:
973973
description: Show a person.
974974
operationId: people_read
975-
# security:
976-
# - basicAuth: []
977-
# - apiKeyAuth: []
975+
security:
976+
- basicAuth: []
977+
- apiKeyAuth: []
978978
responses:
979979
'200':
980980
description: ''
@@ -1050,9 +1050,9 @@ paths:
10501050
patch:
10511051
description: Update a project (partial).
10521052
operationId: projects_partial_update
1053-
# security:
1054-
# - basicAuth: []
1055-
# - apiKeyAuth: []
1053+
security:
1054+
- basicAuth: []
1055+
- apiKeyAuth: []
10561056
requestBody:
10571057
$ref: '#/components/requestBodies/Project'
10581058
responses:
@@ -1085,9 +1085,9 @@ paths:
10851085
put:
10861086
description: Update a project.
10871087
operationId: projects_update
1088-
# security:
1089-
# - basicAuth: []
1090-
# - apiKeyAuth: []
1088+
security:
1089+
- basicAuth: []
1090+
- apiKeyAuth: []
10911091
requestBody:
10921092
$ref: '#/components/requestBodies/Project'
10931093
responses:
@@ -1185,9 +1185,9 @@ paths:
11851185
get:
11861186
description: List users.
11871187
operationId: users_list
1188-
# security:
1189-
# - basicAuth: []
1190-
# - apiKeyAuth: []
1188+
security:
1189+
- basicAuth: []
1190+
- apiKeyAuth: []
11911191
parameters:
11921192
- $ref: '#/components/parameters/Page'
11931193
- $ref: '#/components/parameters/PageSize'
@@ -1225,9 +1225,9 @@ paths:
12251225
get:
12261226
description: Show a user.
12271227
operationId: users_read
1228-
# security:
1229-
# - basicAuth: []
1230-
# - apiKeyAuth: []
1228+
security:
1229+
- basicAuth: []
1230+
- apiKeyAuth: []
12311231
responses:
12321232
'200':
12331233
description: ''
@@ -1256,9 +1256,9 @@ paths:
12561256
patch:
12571257
description: Update a user (partial).
12581258
operationId: users_partial_update
1259-
# security:
1260-
# - basicAuth: []
1261-
# - apiKeyAuth: []
1259+
security:
1260+
- basicAuth: []
1261+
- apiKeyAuth: []
12621262
requestBody:
12631263
$ref: '#/components/requestBodies/User'
12641264
responses:
@@ -1295,9 +1295,9 @@ paths:
12951295
put:
12961296
description: Update a user.
12971297
operationId: users_update
1298-
# security:
1299-
# - basicAuth: []
1300-
# - apiKeyAuth: []
1298+
security:
1299+
- basicAuth: []
1300+
- apiKeyAuth: []
13011301
requestBody:
13021302
$ref: '#/components/requestBodies/User'
13031303
responses:
@@ -1338,7 +1338,15 @@ components:
13381338
scheme: basic
13391339
apiKeyAuth:
13401340
type: http
1341-
scheme: bearer
1341+
scheme: token
1342+
description: |
1343+
Token-based authentication.
1344+
cookieAuth:
1345+
type: apiKey
1346+
in: cookie
1347+
name: JSESSIONID
1348+
description: |
1349+
Cookie-based authentication. This is mainly used for the browsable API.
13421350
parameters:
13431351
Page:
13441352
in: query

0 commit comments

Comments
 (0)