Skip to content

Commit b883cb5

Browse files
committed
openapi: Remove trailing slashes
Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent d86c4f8 commit b883cb5

7 files changed

Lines changed: 128 additions & 121 deletions

File tree

docs/api/schemas/latest/patchwork.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ info:
1515
url: https://www.gnu.org/licenses/gpl-2.0.html
1616
version: '1.3'
1717
paths:
18-
/api/:
18+
/api:
1919
get:
2020
description: List API resources.
2121
operationId: api_list
@@ -29,7 +29,7 @@ paths:
2929
$ref: '#/components/schemas/Index'
3030
tags:
3131
- api
32-
/api/bundles/:
32+
/api/bundles:
3333
get:
3434
description: List bundles.
3535
operationId: bundles_list
@@ -102,7 +102,7 @@ paths:
102102
$ref: '#/components/schemas/Error'
103103
tags:
104104
- bundles
105-
/api/bundles/{id}/:
105+
/api/bundles/{id}:
106106
parameters:
107107
- in: path
108108
name: id
@@ -199,7 +199,7 @@ paths:
199199
$ref: '#/components/schemas/Error'
200200
tags:
201201
- bundles
202-
/api/covers/:
202+
/api/covers:
203203
get:
204204
description: List cover letters.
205205
operationId: covers_list
@@ -252,7 +252,7 @@ paths:
252252
$ref: '#/components/schemas/CoverList'
253253
tags:
254254
- covers
255-
/api/covers/{id}/:
255+
/api/covers/{id}:
256256
parameters:
257257
- in: path
258258
name: id
@@ -279,7 +279,7 @@ paths:
279279
$ref: '#/components/schemas/Error'
280280
tags:
281281
- covers
282-
/api/covers/{id}/comments/:
282+
/api/covers/{id}/comments:
283283
parameters:
284284
- in: path
285285
name: id
@@ -317,7 +317,7 @@ paths:
317317
$ref: '#/components/schemas/Error'
318318
tags:
319319
- comments
320-
/api/covers/{cover_id}/comments/{comment_id}/:
320+
/api/covers/{cover_id}/comments/{comment_id}:
321321
parameters:
322322
- in: path
323323
name: cover_id
@@ -383,7 +383,7 @@ paths:
383383
$ref: '#/components/schemas/Error'
384384
tags:
385385
- comments
386-
/api/events/:
386+
/api/events:
387387
get:
388388
description: List events.
389389
operationId: events_list
@@ -479,7 +479,7 @@ paths:
479479
patch-comment-created: '#/components/schemas/EventPatchCommentCreated'
480480
tags:
481481
- events
482-
/api/patches/:
482+
/api/patches:
483483
get:
484484
description: List patches.
485485
operationId: patches_list
@@ -560,7 +560,7 @@ paths:
560560
$ref: '#/components/schemas/PatchList'
561561
tags:
562562
- patches
563-
/api/patches/{id}/:
563+
/api/patches/{id}:
564564
parameters:
565565
- in: path
566566
name: id
@@ -669,7 +669,7 @@ paths:
669669
$ref: '#/components/schemas/Error'
670670
tags:
671671
- patches
672-
/api/patches/{id}/comments/:
672+
/api/patches/{id}/comments:
673673
parameters:
674674
- in: path
675675
name: id
@@ -706,7 +706,7 @@ paths:
706706
$ref: '#/components/schemas/Error'
707707
tags:
708708
- comments
709-
/api/patches/{patch_id}/comments/{comment_id}/:
709+
/api/patches/{patch_id}/comments/{comment_id}:
710710
parameters:
711711
- in: path
712712
name: patch_id
@@ -772,7 +772,7 @@ paths:
772772
$ref: '#/components/schemas/Error'
773773
tags:
774774
- comments
775-
/api/patches/{patch_id}/checks/:
775+
/api/patches/{patch_id}/checks:
776776
parameters:
777777
- in: path
778778
name: patch_id
@@ -869,7 +869,7 @@ paths:
869869
$ref: '#/components/schemas/Error'
870870
tags:
871871
- checks
872-
/api/patches/{patch_id}/checks/{check_id}/:
872+
/api/patches/{patch_id}/checks/{check_id}:
873873
parameters:
874874
- in: path
875875
name: patch_id
@@ -903,7 +903,7 @@ paths:
903903
$ref: '#/components/schemas/Error'
904904
tags:
905905
- checks
906-
/api/people/:
906+
/api/people:
907907
get:
908908
description: List people.
909909
operationId: people_list
@@ -935,7 +935,7 @@ paths:
935935
$ref: '#/components/schemas/Error'
936936
tags:
937937
- people
938-
/api/people/{id}/:
938+
/api/people/{id}:
939939
parameters:
940940
- in: path
941941
name: id
@@ -971,7 +971,7 @@ paths:
971971
$ref: '#/components/schemas/Error'
972972
tags:
973973
- people
974-
/api/projects/:
974+
/api/projects:
975975
get:
976976
description: List projects.
977977
operationId: projects_list
@@ -994,7 +994,7 @@ paths:
994994
$ref: '#/components/schemas/Project'
995995
tags:
996996
- projects
997-
/api/projects/{id}/:
997+
/api/projects/{id}:
998998
parameters:
999999
- in: path
10001000
name: id
@@ -1092,7 +1092,7 @@ paths:
10921092
$ref: '#/components/schemas/Error'
10931093
tags:
10941094
- projects
1095-
/api/series/:
1095+
/api/series:
10961096
get:
10971097
description: List series.
10981098
operationId: series_list
@@ -1129,7 +1129,7 @@ paths:
11291129
$ref: '#/components/schemas/Series'
11301130
tags:
11311131
- series
1132-
/api/series/{id}/:
1132+
/api/series/{id}:
11331133
parameters:
11341134
- in: path
11351135
name: id
@@ -1156,7 +1156,7 @@ paths:
11561156
$ref: '#/components/schemas/Error'
11571157
tags:
11581158
- series
1159-
/api/users/:
1159+
/api/users:
11601160
get:
11611161
description: List users.
11621162
operationId: users_list
@@ -1188,7 +1188,7 @@ paths:
11881188
$ref: '#/components/schemas/Error'
11891189
tags:
11901190
- users
1191-
/api/users/{id}/:
1191+
/api/users/{id}:
11921192
parameters:
11931193
- in: path
11941194
name: id

docs/api/schemas/patchwork.j2

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ info:
1616
url: https://www.gnu.org/licenses/gpl-2.0.html
1717
version: '{{ version_str }}'
1818
paths:
19+
{% if version_url %}
1920
/api/{{ version_url}}:
21+
{% else %}
22+
/api:
23+
{% endif %}
2024
get:
2125
description: List API resources.
2226
operationId: api_list
@@ -30,7 +34,7 @@ paths:
3034
$ref: '#/components/schemas/Index'
3135
tags:
3236
- api
33-
/api/{{ version_url}}bundles/:
37+
/api/{{ version_url}}bundles:
3438
get:
3539
description: List bundles.
3640
operationId: bundles_list
@@ -105,7 +109,7 @@ paths:
105109
tags:
106110
- bundles
107111
{% endif %}
108-
/api/{{ version_url }}bundles/{id}/:
112+
/api/{{ version_url }}bundles/{id}:
109113
parameters:
110114
- in: path
111115
name: id
@@ -204,7 +208,7 @@ paths:
204208
tags:
205209
- bundles
206210
{% endif %}
207-
/api/{{ version_url }}covers/:
211+
/api/{{ version_url }}covers:
208212
get:
209213
description: List cover letters.
210214
operationId: covers_list
@@ -259,7 +263,7 @@ paths:
259263
$ref: '#/components/schemas/CoverList'
260264
tags:
261265
- covers
262-
/api/{{ version_url }}covers/{id}/:
266+
/api/{{ version_url }}covers/{id}:
263267
parameters:
264268
- in: path
265269
name: id
@@ -286,7 +290,7 @@ paths:
286290
$ref: '#/components/schemas/Error'
287291
tags:
288292
- covers
289-
/api/{{ version_url }}covers/{id}/comments/:
293+
/api/{{ version_url }}covers/{id}/comments:
290294
parameters:
291295
- in: path
292296
name: id
@@ -325,7 +329,7 @@ paths:
325329
tags:
326330
- comments
327331
{% if version >= (1, 3) %}
328-
/api/{{ version_url }}covers/{cover_id}/comments/{comment_id}/:
332+
/api/{{ version_url }}covers/{cover_id}/comments/{comment_id}:
329333
parameters:
330334
- in: path
331335
name: cover_id
@@ -392,7 +396,7 @@ paths:
392396
tags:
393397
- comments
394398
{% endif %}
395-
/api/{{ version_url }}events/:
399+
/api/{{ version_url }}events:
396400
get:
397401
description: List events.
398402
operationId: events_list
@@ -492,7 +496,7 @@ paths:
492496
patch-comment-created: '#/components/schemas/EventPatchCommentCreated'
493497
tags:
494498
- events
495-
/api/{{ version_url }}patches/:
499+
/api/{{ version_url }}patches:
496500
get:
497501
description: List patches.
498502
operationId: patches_list
@@ -575,7 +579,7 @@ paths:
575579
$ref: '#/components/schemas/PatchList'
576580
tags:
577581
- patches
578-
/api/{{ version_url }}patches/{id}/:
582+
/api/{{ version_url }}patches/{id}:
579583
parameters:
580584
- in: path
581585
name: id
@@ -688,7 +692,7 @@ paths:
688692
{% endif %}
689693
tags:
690694
- patches
691-
/api/{{ version_url }}patches/{id}/comments/:
695+
/api/{{ version_url }}patches/{id}/comments:
692696
parameters:
693697
- in: path
694698
name: id
@@ -726,7 +730,7 @@ paths:
726730
tags:
727731
- comments
728732
{% if version >= (1, 3) %}
729-
/api/{{ version_url }}patches/{patch_id}/comments/{comment_id}/:
733+
/api/{{ version_url }}patches/{patch_id}/comments/{comment_id}:
730734
parameters:
731735
- in: path
732736
name: patch_id
@@ -793,7 +797,7 @@ paths:
793797
tags:
794798
- comments
795799
{% endif %}
796-
/api/{{ version_url }}patches/{patch_id}/checks/:
800+
/api/{{ version_url }}patches/{patch_id}/checks:
797801
parameters:
798802
- in: path
799803
name: patch_id
@@ -890,7 +894,7 @@ paths:
890894
$ref: '#/components/schemas/Error'
891895
tags:
892896
- checks
893-
/api/{{ version_url }}patches/{patch_id}/checks/{check_id}/:
897+
/api/{{ version_url }}patches/{patch_id}/checks/{check_id}:
894898
parameters:
895899
- in: path
896900
name: patch_id
@@ -924,7 +928,7 @@ paths:
924928
$ref: '#/components/schemas/Error'
925929
tags:
926930
- checks
927-
/api/{{ version_url }}people/:
931+
/api/{{ version_url }}people:
928932
get:
929933
description: List people.
930934
operationId: people_list
@@ -956,7 +960,7 @@ paths:
956960
$ref: '#/components/schemas/Error'
957961
tags:
958962
- people
959-
/api/{{ version_url }}people/{id}/:
963+
/api/{{ version_url }}people/{id}:
960964
parameters:
961965
- in: path
962966
name: id
@@ -992,7 +996,7 @@ paths:
992996
$ref: '#/components/schemas/Error'
993997
tags:
994998
- people
995-
/api/{{ version_url }}projects/:
999+
/api/{{ version_url }}projects:
9961000
get:
9971001
description: List projects.
9981002
operationId: projects_list
@@ -1015,7 +1019,7 @@ paths:
10151019
$ref: '#/components/schemas/Project'
10161020
tags:
10171021
- projects
1018-
/api/{{ version_url }}projects/{id}/:
1022+
/api/{{ version_url }}projects/{id}:
10191023
parameters:
10201024
- in: path
10211025
name: id
@@ -1113,7 +1117,7 @@ paths:
11131117
$ref: '#/components/schemas/Error'
11141118
tags:
11151119
- projects
1116-
/api/{{ version_url }}series/:
1120+
/api/{{ version_url }}series:
11171121
get:
11181122
description: List series.
11191123
operationId: series_list
@@ -1150,7 +1154,7 @@ paths:
11501154
$ref: '#/components/schemas/Series'
11511155
tags:
11521156
- series
1153-
/api/{{ version_url }}series/{id}/:
1157+
/api/{{ version_url }}series/{id}:
11541158
parameters:
11551159
- in: path
11561160
name: id
@@ -1177,7 +1181,7 @@ paths:
11771181
$ref: '#/components/schemas/Error'
11781182
tags:
11791183
- series
1180-
/api/{{ version_url }}users/:
1184+
/api/{{ version_url }}users:
11811185
get:
11821186
description: List users.
11831187
operationId: users_list
@@ -1209,7 +1213,7 @@ paths:
12091213
$ref: '#/components/schemas/Error'
12101214
tags:
12111215
- users
1212-
/api/{{ version_url }}users/{id}/:
1216+
/api/{{ version_url }}users/{id}:
12131217
parameters:
12141218
- in: path
12151219
name: id

0 commit comments

Comments
 (0)