From b883cb5db801843e9c151203f73a0a1832c29981 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Sat, 20 Jan 2024 12:23:05 +0000 Subject: [PATCH] openapi: Remove trailing slashes Signed-off-by: Stephen Finucane --- docs/api/schemas/latest/patchwork.yaml | 44 ++++++++++++------------ docs/api/schemas/patchwork.j2 | 46 ++++++++++++++------------ docs/api/schemas/v1.0/patchwork.yaml | 38 ++++++++++----------- docs/api/schemas/v1.1/patchwork.yaml | 38 ++++++++++----------- docs/api/schemas/v1.2/patchwork.yaml | 38 ++++++++++----------- docs/api/schemas/v1.3/patchwork.yaml | 42 +++++++++++------------ patchwork/tests/api/validator.py | 3 ++ 7 files changed, 128 insertions(+), 121 deletions(-) diff --git a/docs/api/schemas/latest/patchwork.yaml b/docs/api/schemas/latest/patchwork.yaml index 3cbe2fa5..c62b42bf 100644 --- a/docs/api/schemas/latest/patchwork.yaml +++ b/docs/api/schemas/latest/patchwork.yaml @@ -15,7 +15,7 @@ info: url: https://www.gnu.org/licenses/gpl-2.0.html version: '1.3' paths: - /api/: + /api: get: description: List API resources. operationId: api_list @@ -29,7 +29,7 @@ paths: $ref: '#/components/schemas/Index' tags: - api - /api/bundles/: + /api/bundles: get: description: List bundles. operationId: bundles_list @@ -102,7 +102,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/bundles/{id}/: + /api/bundles/{id}: parameters: - in: path name: id @@ -199,7 +199,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/covers/: + /api/covers: get: description: List cover letters. operationId: covers_list @@ -252,7 +252,7 @@ paths: $ref: '#/components/schemas/CoverList' tags: - covers - /api/covers/{id}/: + /api/covers/{id}: parameters: - in: path name: id @@ -279,7 +279,7 @@ paths: $ref: '#/components/schemas/Error' tags: - covers - /api/covers/{id}/comments/: + /api/covers/{id}/comments: parameters: - in: path name: id @@ -317,7 +317,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/covers/{cover_id}/comments/{comment_id}/: + /api/covers/{cover_id}/comments/{comment_id}: parameters: - in: path name: cover_id @@ -383,7 +383,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/events/: + /api/events: get: description: List events. operationId: events_list @@ -479,7 +479,7 @@ paths: patch-comment-created: '#/components/schemas/EventPatchCommentCreated' tags: - events - /api/patches/: + /api/patches: get: description: List patches. operationId: patches_list @@ -560,7 +560,7 @@ paths: $ref: '#/components/schemas/PatchList' tags: - patches - /api/patches/{id}/: + /api/patches/{id}: parameters: - in: path name: id @@ -669,7 +669,7 @@ paths: $ref: '#/components/schemas/Error' tags: - patches - /api/patches/{id}/comments/: + /api/patches/{id}/comments: parameters: - in: path name: id @@ -706,7 +706,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/patches/{patch_id}/comments/{comment_id}/: + /api/patches/{patch_id}/comments/{comment_id}: parameters: - in: path name: patch_id @@ -772,7 +772,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/patches/{patch_id}/checks/: + /api/patches/{patch_id}/checks: parameters: - in: path name: patch_id @@ -869,7 +869,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/patches/{patch_id}/checks/{check_id}/: + /api/patches/{patch_id}/checks/{check_id}: parameters: - in: path name: patch_id @@ -903,7 +903,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/people/: + /api/people: get: description: List people. operationId: people_list @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/people/{id}/: + /api/people/{id}: parameters: - in: path name: id @@ -971,7 +971,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/projects/: + /api/projects: get: description: List projects. operationId: projects_list @@ -994,7 +994,7 @@ paths: $ref: '#/components/schemas/Project' tags: - projects - /api/projects/{id}/: + /api/projects/{id}: parameters: - in: path name: id @@ -1092,7 +1092,7 @@ paths: $ref: '#/components/schemas/Error' tags: - projects - /api/series/: + /api/series: get: description: List series. operationId: series_list @@ -1129,7 +1129,7 @@ paths: $ref: '#/components/schemas/Series' tags: - series - /api/series/{id}/: + /api/series/{id}: parameters: - in: path name: id @@ -1156,7 +1156,7 @@ paths: $ref: '#/components/schemas/Error' tags: - series - /api/users/: + /api/users: get: description: List users. operationId: users_list @@ -1188,7 +1188,7 @@ paths: $ref: '#/components/schemas/Error' tags: - users - /api/users/{id}/: + /api/users/{id}: parameters: - in: path name: id diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2 index d4d9ed02..55f237b0 100644 --- a/docs/api/schemas/patchwork.j2 +++ b/docs/api/schemas/patchwork.j2 @@ -16,7 +16,11 @@ info: url: https://www.gnu.org/licenses/gpl-2.0.html version: '{{ version_str }}' paths: +{% if version_url %} /api/{{ version_url}}: +{% else %} + /api: +{% endif %} get: description: List API resources. operationId: api_list @@ -30,7 +34,7 @@ paths: $ref: '#/components/schemas/Index' tags: - api - /api/{{ version_url}}bundles/: + /api/{{ version_url}}bundles: get: description: List bundles. operationId: bundles_list @@ -105,7 +109,7 @@ paths: tags: - bundles {% endif %} - /api/{{ version_url }}bundles/{id}/: + /api/{{ version_url }}bundles/{id}: parameters: - in: path name: id @@ -204,7 +208,7 @@ paths: tags: - bundles {% endif %} - /api/{{ version_url }}covers/: + /api/{{ version_url }}covers: get: description: List cover letters. operationId: covers_list @@ -259,7 +263,7 @@ paths: $ref: '#/components/schemas/CoverList' tags: - covers - /api/{{ version_url }}covers/{id}/: + /api/{{ version_url }}covers/{id}: parameters: - in: path name: id @@ -286,7 +290,7 @@ paths: $ref: '#/components/schemas/Error' tags: - covers - /api/{{ version_url }}covers/{id}/comments/: + /api/{{ version_url }}covers/{id}/comments: parameters: - in: path name: id @@ -325,7 +329,7 @@ paths: tags: - comments {% if version >= (1, 3) %} - /api/{{ version_url }}covers/{cover_id}/comments/{comment_id}/: + /api/{{ version_url }}covers/{cover_id}/comments/{comment_id}: parameters: - in: path name: cover_id @@ -392,7 +396,7 @@ paths: tags: - comments {% endif %} - /api/{{ version_url }}events/: + /api/{{ version_url }}events: get: description: List events. operationId: events_list @@ -492,7 +496,7 @@ paths: patch-comment-created: '#/components/schemas/EventPatchCommentCreated' tags: - events - /api/{{ version_url }}patches/: + /api/{{ version_url }}patches: get: description: List patches. operationId: patches_list @@ -575,7 +579,7 @@ paths: $ref: '#/components/schemas/PatchList' tags: - patches - /api/{{ version_url }}patches/{id}/: + /api/{{ version_url }}patches/{id}: parameters: - in: path name: id @@ -688,7 +692,7 @@ paths: {% endif %} tags: - patches - /api/{{ version_url }}patches/{id}/comments/: + /api/{{ version_url }}patches/{id}/comments: parameters: - in: path name: id @@ -726,7 +730,7 @@ paths: tags: - comments {% if version >= (1, 3) %} - /api/{{ version_url }}patches/{patch_id}/comments/{comment_id}/: + /api/{{ version_url }}patches/{patch_id}/comments/{comment_id}: parameters: - in: path name: patch_id @@ -793,7 +797,7 @@ paths: tags: - comments {% endif %} - /api/{{ version_url }}patches/{patch_id}/checks/: + /api/{{ version_url }}patches/{patch_id}/checks: parameters: - in: path name: patch_id @@ -890,7 +894,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/{{ version_url }}patches/{patch_id}/checks/{check_id}/: + /api/{{ version_url }}patches/{patch_id}/checks/{check_id}: parameters: - in: path name: patch_id @@ -924,7 +928,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/{{ version_url }}people/: + /api/{{ version_url }}people: get: description: List people. operationId: people_list @@ -956,7 +960,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/{{ version_url }}people/{id}/: + /api/{{ version_url }}people/{id}: parameters: - in: path name: id @@ -992,7 +996,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/{{ version_url }}projects/: + /api/{{ version_url }}projects: get: description: List projects. operationId: projects_list @@ -1015,7 +1019,7 @@ paths: $ref: '#/components/schemas/Project' tags: - projects - /api/{{ version_url }}projects/{id}/: + /api/{{ version_url }}projects/{id}: parameters: - in: path name: id @@ -1113,7 +1117,7 @@ paths: $ref: '#/components/schemas/Error' tags: - projects - /api/{{ version_url }}series/: + /api/{{ version_url }}series: get: description: List series. operationId: series_list @@ -1150,7 +1154,7 @@ paths: $ref: '#/components/schemas/Series' tags: - series - /api/{{ version_url }}series/{id}/: + /api/{{ version_url }}series/{id}: parameters: - in: path name: id @@ -1177,7 +1181,7 @@ paths: $ref: '#/components/schemas/Error' tags: - series - /api/{{ version_url }}users/: + /api/{{ version_url }}users: get: description: List users. operationId: users_list @@ -1209,7 +1213,7 @@ paths: $ref: '#/components/schemas/Error' tags: - users - /api/{{ version_url }}users/{id}/: + /api/{{ version_url }}users/{id}: parameters: - in: path name: id diff --git a/docs/api/schemas/v1.0/patchwork.yaml b/docs/api/schemas/v1.0/patchwork.yaml index 37391f00..d7df5bfb 100644 --- a/docs/api/schemas/v1.0/patchwork.yaml +++ b/docs/api/schemas/v1.0/patchwork.yaml @@ -29,7 +29,7 @@ paths: $ref: '#/components/schemas/Index' tags: - api - /api/1.0/bundles/: + /api/1.0/bundles: get: description: List bundles. operationId: bundles_list @@ -73,7 +73,7 @@ paths: $ref: '#/components/schemas/Bundle' tags: - bundles - /api/1.0/bundles/{id}/: + /api/1.0/bundles/{id}: parameters: - in: path name: id @@ -100,7 +100,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/1.0/covers/: + /api/1.0/covers: get: description: List cover letters. operationId: covers_list @@ -145,7 +145,7 @@ paths: $ref: '#/components/schemas/CoverList' tags: - covers - /api/1.0/covers/{id}/: + /api/1.0/covers/{id}: parameters: - in: path name: id @@ -172,7 +172,7 @@ paths: $ref: '#/components/schemas/Error' tags: - covers - /api/1.0/covers/{id}/comments/: + /api/1.0/covers/{id}/comments: parameters: - in: path name: id @@ -210,7 +210,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.0/events/: + /api/1.0/events: get: description: List events. operationId: events_list @@ -303,7 +303,7 @@ paths: patch-comment-created: '#/components/schemas/EventPatchCommentCreated' tags: - events - /api/1.0/patches/: + /api/1.0/patches: get: description: List patches. operationId: patches_list @@ -369,7 +369,7 @@ paths: $ref: '#/components/schemas/PatchList' tags: - patches - /api/1.0/patches/{id}/: + /api/1.0/patches/{id}: parameters: - in: path name: id @@ -466,7 +466,7 @@ paths: $ref: '#/components/schemas/Error' tags: - patches - /api/1.0/patches/{id}/comments/: + /api/1.0/patches/{id}/comments: parameters: - in: path name: id @@ -503,7 +503,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.0/patches/{patch_id}/checks/: + /api/1.0/patches/{patch_id}/checks: parameters: - in: path name: patch_id @@ -600,7 +600,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.0/patches/{patch_id}/checks/{check_id}/: + /api/1.0/patches/{patch_id}/checks/{check_id}: parameters: - in: path name: patch_id @@ -634,7 +634,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.0/people/: + /api/1.0/people: get: description: List people. operationId: people_list @@ -666,7 +666,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.0/people/{id}/: + /api/1.0/people/{id}: parameters: - in: path name: id @@ -702,7 +702,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.0/projects/: + /api/1.0/projects: get: description: List projects. operationId: projects_list @@ -725,7 +725,7 @@ paths: $ref: '#/components/schemas/Project' tags: - projects - /api/1.0/projects/{id}/: + /api/1.0/projects/{id}: parameters: - in: path name: id @@ -823,7 +823,7 @@ paths: $ref: '#/components/schemas/Error' tags: - projects - /api/1.0/series/: + /api/1.0/series: get: description: List series. operationId: series_list @@ -860,7 +860,7 @@ paths: $ref: '#/components/schemas/Series' tags: - series - /api/1.0/series/{id}/: + /api/1.0/series/{id}: parameters: - in: path name: id @@ -887,7 +887,7 @@ paths: $ref: '#/components/schemas/Error' tags: - series - /api/1.0/users/: + /api/1.0/users: get: description: List users. operationId: users_list @@ -919,7 +919,7 @@ paths: $ref: '#/components/schemas/Error' tags: - users - /api/1.0/users/{id}/: + /api/1.0/users/{id}: parameters: - in: path name: id diff --git a/docs/api/schemas/v1.1/patchwork.yaml b/docs/api/schemas/v1.1/patchwork.yaml index b44766c6..2e9d6259 100644 --- a/docs/api/schemas/v1.1/patchwork.yaml +++ b/docs/api/schemas/v1.1/patchwork.yaml @@ -29,7 +29,7 @@ paths: $ref: '#/components/schemas/Index' tags: - api - /api/1.1/bundles/: + /api/1.1/bundles: get: description: List bundles. operationId: bundles_list @@ -73,7 +73,7 @@ paths: $ref: '#/components/schemas/Bundle' tags: - bundles - /api/1.1/bundles/{id}/: + /api/1.1/bundles/{id}: parameters: - in: path name: id @@ -100,7 +100,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/1.1/covers/: + /api/1.1/covers: get: description: List cover letters. operationId: covers_list @@ -145,7 +145,7 @@ paths: $ref: '#/components/schemas/CoverList' tags: - covers - /api/1.1/covers/{id}/: + /api/1.1/covers/{id}: parameters: - in: path name: id @@ -172,7 +172,7 @@ paths: $ref: '#/components/schemas/Error' tags: - covers - /api/1.1/covers/{id}/comments/: + /api/1.1/covers/{id}/comments: parameters: - in: path name: id @@ -210,7 +210,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.1/events/: + /api/1.1/events: get: description: List events. operationId: events_list @@ -303,7 +303,7 @@ paths: patch-comment-created: '#/components/schemas/EventPatchCommentCreated' tags: - events - /api/1.1/patches/: + /api/1.1/patches: get: description: List patches. operationId: patches_list @@ -369,7 +369,7 @@ paths: $ref: '#/components/schemas/PatchList' tags: - patches - /api/1.1/patches/{id}/: + /api/1.1/patches/{id}: parameters: - in: path name: id @@ -466,7 +466,7 @@ paths: $ref: '#/components/schemas/Error' tags: - patches - /api/1.1/patches/{id}/comments/: + /api/1.1/patches/{id}/comments: parameters: - in: path name: id @@ -503,7 +503,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.1/patches/{patch_id}/checks/: + /api/1.1/patches/{patch_id}/checks: parameters: - in: path name: patch_id @@ -600,7 +600,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.1/patches/{patch_id}/checks/{check_id}/: + /api/1.1/patches/{patch_id}/checks/{check_id}: parameters: - in: path name: patch_id @@ -634,7 +634,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.1/people/: + /api/1.1/people: get: description: List people. operationId: people_list @@ -666,7 +666,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.1/people/{id}/: + /api/1.1/people/{id}: parameters: - in: path name: id @@ -702,7 +702,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.1/projects/: + /api/1.1/projects: get: description: List projects. operationId: projects_list @@ -725,7 +725,7 @@ paths: $ref: '#/components/schemas/Project' tags: - projects - /api/1.1/projects/{id}/: + /api/1.1/projects/{id}: parameters: - in: path name: id @@ -823,7 +823,7 @@ paths: $ref: '#/components/schemas/Error' tags: - projects - /api/1.1/series/: + /api/1.1/series: get: description: List series. operationId: series_list @@ -860,7 +860,7 @@ paths: $ref: '#/components/schemas/Series' tags: - series - /api/1.1/series/{id}/: + /api/1.1/series/{id}: parameters: - in: path name: id @@ -887,7 +887,7 @@ paths: $ref: '#/components/schemas/Error' tags: - series - /api/1.1/users/: + /api/1.1/users: get: description: List users. operationId: users_list @@ -919,7 +919,7 @@ paths: $ref: '#/components/schemas/Error' tags: - users - /api/1.1/users/{id}/: + /api/1.1/users/{id}: parameters: - in: path name: id diff --git a/docs/api/schemas/v1.2/patchwork.yaml b/docs/api/schemas/v1.2/patchwork.yaml index d19fd842..799606d4 100644 --- a/docs/api/schemas/v1.2/patchwork.yaml +++ b/docs/api/schemas/v1.2/patchwork.yaml @@ -29,7 +29,7 @@ paths: $ref: '#/components/schemas/Index' tags: - api - /api/1.2/bundles/: + /api/1.2/bundles: get: description: List bundles. operationId: bundles_list @@ -102,7 +102,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/1.2/bundles/{id}/: + /api/1.2/bundles/{id}: parameters: - in: path name: id @@ -199,7 +199,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/1.2/covers/: + /api/1.2/covers: get: description: List cover letters. operationId: covers_list @@ -252,7 +252,7 @@ paths: $ref: '#/components/schemas/CoverList' tags: - covers - /api/1.2/covers/{id}/: + /api/1.2/covers/{id}: parameters: - in: path name: id @@ -279,7 +279,7 @@ paths: $ref: '#/components/schemas/Error' tags: - covers - /api/1.2/covers/{id}/comments/: + /api/1.2/covers/{id}/comments: parameters: - in: path name: id @@ -317,7 +317,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.2/events/: + /api/1.2/events: get: description: List events. operationId: events_list @@ -411,7 +411,7 @@ paths: patch-comment-created: '#/components/schemas/EventPatchCommentCreated' tags: - events - /api/1.2/patches/: + /api/1.2/patches: get: description: List patches. operationId: patches_list @@ -492,7 +492,7 @@ paths: $ref: '#/components/schemas/PatchList' tags: - patches - /api/1.2/patches/{id}/: + /api/1.2/patches/{id}: parameters: - in: path name: id @@ -601,7 +601,7 @@ paths: $ref: '#/components/schemas/Error' tags: - patches - /api/1.2/patches/{id}/comments/: + /api/1.2/patches/{id}/comments: parameters: - in: path name: id @@ -638,7 +638,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.2/patches/{patch_id}/checks/: + /api/1.2/patches/{patch_id}/checks: parameters: - in: path name: patch_id @@ -735,7 +735,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.2/patches/{patch_id}/checks/{check_id}/: + /api/1.2/patches/{patch_id}/checks/{check_id}: parameters: - in: path name: patch_id @@ -769,7 +769,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.2/people/: + /api/1.2/people: get: description: List people. operationId: people_list @@ -801,7 +801,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.2/people/{id}/: + /api/1.2/people/{id}: parameters: - in: path name: id @@ -837,7 +837,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.2/projects/: + /api/1.2/projects: get: description: List projects. operationId: projects_list @@ -860,7 +860,7 @@ paths: $ref: '#/components/schemas/Project' tags: - projects - /api/1.2/projects/{id}/: + /api/1.2/projects/{id}: parameters: - in: path name: id @@ -958,7 +958,7 @@ paths: $ref: '#/components/schemas/Error' tags: - projects - /api/1.2/series/: + /api/1.2/series: get: description: List series. operationId: series_list @@ -995,7 +995,7 @@ paths: $ref: '#/components/schemas/Series' tags: - series - /api/1.2/series/{id}/: + /api/1.2/series/{id}: parameters: - in: path name: id @@ -1022,7 +1022,7 @@ paths: $ref: '#/components/schemas/Error' tags: - series - /api/1.2/users/: + /api/1.2/users: get: description: List users. operationId: users_list @@ -1054,7 +1054,7 @@ paths: $ref: '#/components/schemas/Error' tags: - users - /api/1.2/users/{id}/: + /api/1.2/users/{id}: parameters: - in: path name: id diff --git a/docs/api/schemas/v1.3/patchwork.yaml b/docs/api/schemas/v1.3/patchwork.yaml index 11a62ef5..ba853206 100644 --- a/docs/api/schemas/v1.3/patchwork.yaml +++ b/docs/api/schemas/v1.3/patchwork.yaml @@ -29,7 +29,7 @@ paths: $ref: '#/components/schemas/Index' tags: - api - /api/1.3/bundles/: + /api/1.3/bundles: get: description: List bundles. operationId: bundles_list @@ -102,7 +102,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/1.3/bundles/{id}/: + /api/1.3/bundles/{id}: parameters: - in: path name: id @@ -199,7 +199,7 @@ paths: $ref: '#/components/schemas/Error' tags: - bundles - /api/1.3/covers/: + /api/1.3/covers: get: description: List cover letters. operationId: covers_list @@ -252,7 +252,7 @@ paths: $ref: '#/components/schemas/CoverList' tags: - covers - /api/1.3/covers/{id}/: + /api/1.3/covers/{id}: parameters: - in: path name: id @@ -279,7 +279,7 @@ paths: $ref: '#/components/schemas/Error' tags: - covers - /api/1.3/covers/{id}/comments/: + /api/1.3/covers/{id}/comments: parameters: - in: path name: id @@ -317,7 +317,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.3/covers/{cover_id}/comments/{comment_id}/: + /api/1.3/covers/{cover_id}/comments/{comment_id}: parameters: - in: path name: cover_id @@ -383,7 +383,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.3/events/: + /api/1.3/events: get: description: List events. operationId: events_list @@ -479,7 +479,7 @@ paths: patch-comment-created: '#/components/schemas/EventPatchCommentCreated' tags: - events - /api/1.3/patches/: + /api/1.3/patches: get: description: List patches. operationId: patches_list @@ -560,7 +560,7 @@ paths: $ref: '#/components/schemas/PatchList' tags: - patches - /api/1.3/patches/{id}/: + /api/1.3/patches/{id}: parameters: - in: path name: id @@ -669,7 +669,7 @@ paths: $ref: '#/components/schemas/Error' tags: - patches - /api/1.3/patches/{id}/comments/: + /api/1.3/patches/{id}/comments: parameters: - in: path name: id @@ -706,7 +706,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.3/patches/{patch_id}/comments/{comment_id}/: + /api/1.3/patches/{patch_id}/comments/{comment_id}: parameters: - in: path name: patch_id @@ -772,7 +772,7 @@ paths: $ref: '#/components/schemas/Error' tags: - comments - /api/1.3/patches/{patch_id}/checks/: + /api/1.3/patches/{patch_id}/checks: parameters: - in: path name: patch_id @@ -869,7 +869,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.3/patches/{patch_id}/checks/{check_id}/: + /api/1.3/patches/{patch_id}/checks/{check_id}: parameters: - in: path name: patch_id @@ -903,7 +903,7 @@ paths: $ref: '#/components/schemas/Error' tags: - checks - /api/1.3/people/: + /api/1.3/people: get: description: List people. operationId: people_list @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.3/people/{id}/: + /api/1.3/people/{id}: parameters: - in: path name: id @@ -971,7 +971,7 @@ paths: $ref: '#/components/schemas/Error' tags: - people - /api/1.3/projects/: + /api/1.3/projects: get: description: List projects. operationId: projects_list @@ -994,7 +994,7 @@ paths: $ref: '#/components/schemas/Project' tags: - projects - /api/1.3/projects/{id}/: + /api/1.3/projects/{id}: parameters: - in: path name: id @@ -1092,7 +1092,7 @@ paths: $ref: '#/components/schemas/Error' tags: - projects - /api/1.3/series/: + /api/1.3/series: get: description: List series. operationId: series_list @@ -1129,7 +1129,7 @@ paths: $ref: '#/components/schemas/Series' tags: - series - /api/1.3/series/{id}/: + /api/1.3/series/{id}: parameters: - in: path name: id @@ -1156,7 +1156,7 @@ paths: $ref: '#/components/schemas/Error' tags: - series - /api/1.3/users/: + /api/1.3/users: get: description: List users. operationId: users_list @@ -1188,7 +1188,7 @@ paths: $ref: '#/components/schemas/Error' tags: - users - /api/1.3/users/{id}/: + /api/1.3/users/{id}: parameters: - in: path name: id diff --git a/patchwork/tests/api/validator.py b/patchwork/tests/api/validator.py index 482b2b5b..88ba2061 100644 --- a/patchwork/tests/api/validator.py +++ b/patchwork/tests/api/validator.py @@ -102,6 +102,9 @@ def validate_data( if response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED: return + # FIXME: this shouldn't matter + request.path = request.path.rstrip('/') + spec = _load_spec(resolve(path).kwargs.get('version')) request = DjangoOpenAPIRequest(request) response = DjangoOpenAPIResponse(response) -- 2.47.3