Browse Source

feat(api-idorslug): Rename Path paramaters to `project_id_or_slug` (#69716)

I am working on making our APIs work with slug and id in our path
parameters. Over the path month, we have updated the endpoints so they
can support both parameters. As a final step, we are renaming the
parameters from `{resource}.slug` to `{resource}.id_or_slug`.

There will be a similar PR for `organization_slug`

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Raj Joshi 10 months ago
parent
commit
8ec16e1fa4

+ 13 - 13
api-docs/openapi.json

@@ -114,34 +114,34 @@
     "/api/0/projects/": {
     "/api/0/projects/": {
       "$ref": "paths/projects/index.json"
       "$ref": "paths/projects/index.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/files/dsyms/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/files/dsyms/": {
       "$ref": "paths/projects/dsyms.json"
       "$ref": "paths/projects/dsyms.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/users/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/users/": {
       "$ref": "paths/projects/users.json"
       "$ref": "paths/projects/users.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/tags/{key}/values/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/tags/{key}/values/": {
       "$ref": "paths/projects/tag-values.json"
       "$ref": "paths/projects/tag-values.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/stats/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/stats/": {
       "$ref": "paths/projects/stats.json"
       "$ref": "paths/projects/stats.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/user-feedback/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/user-feedback/": {
       "$ref": "paths/projects/user-feedback.json"
       "$ref": "paths/projects/user-feedback.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/hooks/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/hooks/": {
       "$ref": "paths/projects/service-hooks.json"
       "$ref": "paths/projects/service-hooks.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/hooks/{hook_id}/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/hooks/{hook_id}/": {
       "$ref": "paths/projects/service-hook-details.json"
       "$ref": "paths/projects/service-hook-details.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/events/{event_id}/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/events/{event_id}/": {
       "$ref": "paths/events/project-event-details.json"
       "$ref": "paths/events/project-event-details.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/events/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/events/": {
       "$ref": "paths/events/project-events.json"
       "$ref": "paths/events/project-events.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/issues/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/issues/": {
       "$ref": "paths/events/project-issues.json"
       "$ref": "paths/events/project-issues.json"
     },
     },
     "/api/0/organizations/{organization_slug}/issues/{issue_id}/tags/{key}/values/": {
     "/api/0/organizations/{organization_slug}/issues/{issue_id}/tags/{key}/values/": {
@@ -174,19 +174,19 @@
     "/api/0/organizations/{organization_slug}/releases/{version}/files/": {
     "/api/0/organizations/{organization_slug}/releases/{version}/files/": {
       "$ref": "paths/releases/release-files.json"
       "$ref": "paths/releases/release-files.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/files/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/releases/{version}/files/": {
       "$ref": "paths/releases/project-release-files.json"
       "$ref": "paths/releases/project-release-files.json"
     },
     },
     "/api/0/organizations/{organization_slug}/releases/{version}/files/{file_id}/": {
     "/api/0/organizations/{organization_slug}/releases/{version}/files/{file_id}/": {
       "$ref": "paths/releases/release-file.json"
       "$ref": "paths/releases/release-file.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/files/{file_id}/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/": {
       "$ref": "paths/releases/project-release-file.json"
       "$ref": "paths/releases/project-release-file.json"
     },
     },
     "/api/0/organizations/{organization_slug}/releases/{version}/commits/": {
     "/api/0/organizations/{organization_slug}/releases/{version}/commits/": {
       "$ref": "paths/releases/organization-release-commits.json"
       "$ref": "paths/releases/organization-release-commits.json"
     },
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/commits/": {
+    "/api/0/projects/{organization_slug}/{project_id_or_slug}/releases/{version}/commits/": {
       "$ref": "paths/releases/project-release-commits.json"
       "$ref": "paths/releases/project-release-commits.json"
     },
     },
     "/api/0/organizations/{organization_slug}/releases/{version}/commitfiles/": {
     "/api/0/organizations/{organization_slug}/releases/{version}/commitfiles/": {

+ 8 - 26
api-docs/paths/events/project-event-details.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the event belongs to.",
+        "description": "The id or slug of the project the event belongs to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -154,10 +154,7 @@
                                   71,
                                   71,
                                   "            return fn.apply(this, wrappedArguments);"
                                   "            return fn.apply(this, wrappedArguments);"
                                 ],
                                 ],
-                                [
-                                  72,
-                                  "            // tslint:enable:no-unsafe-any"
-                                ],
+                                [72, "            // tslint:enable:no-unsafe-any"],
                                 [73, "        }"],
                                 [73, "        }"],
                                 [74, "        catch (ex) {"],
                                 [74, "        catch (ex) {"],
                                 [75, "            ignoreNextOnError();"],
                                 [75, "            ignoreNextOnError();"],
@@ -182,10 +179,7 @@
                               "instructionAddr": null,
                               "instructionAddr": null,
                               "context": [
                               "context": [
                                 [69, "     */"],
                                 [69, "     */"],
-                                [
-                                  70,
-                                  "    triggerAsync: function triggerAsync() {"
-                                ],
+                                [70, "    triggerAsync: function triggerAsync() {"],
                                 [71, "        var args = arguments,"],
                                 [71, "        var args = arguments,"],
                                 [72, "            me = this;"],
                                 [72, "            me = this;"],
                                 [73, "        _.nextTick(function () {"],
                                 [73, "        _.nextTick(function () {"],
@@ -227,14 +221,8 @@
                               "context": [
                               "context": [
                                 [76, "/*!"],
                                 [76, "/*!"],
                                 [77, "  Copyright (c) 2018 Jed Watson."],
                                 [77, "  Copyright (c) 2018 Jed Watson."],
-                                [
-                                  78,
-                                  "  Licensed under the MIT License (MIT), see"
-                                ],
-                                [
-                                  79,
-                                  "  http://jedwatson.github.io/react-select"
-                                ],
+                                [78, "  Licensed under the MIT License (MIT), see"],
+                                [79, "  http://jedwatson.github.io/react-select"],
                                 [80, "*/"],
                                 [80, "*/"],
                                 [
                                 [
                                   81,
                                   81,
@@ -242,15 +230,9 @@
                                 ],
                                 ],
                                 [82, "/*!"],
                                 [82, "/*!"],
                                 [83, " * JavaScript Cookie v2.2.1"],
                                 [83, " * JavaScript Cookie v2.2.1"],
-                                [
-                                  84,
-                                  " * https://github.com/js-cookie/js-cookie"
-                                ],
+                                [84, " * https://github.com/js-cookie/js-cookie"],
                                 [85, " *"],
                                 [85, " *"],
-                                [
-                                  86,
-                                  " * Copyright 2006, 2015 Klaus Hartl & Fagner Brack"
-                                ]
+                                [86, " * Copyright 2006, 2015 Klaus Hartl & Fagner Brack"]
                               ],
                               ],
                               "symbolAddr": null,
                               "symbolAddr": null,
                               "trust": null,
                               "trust": null,

+ 2 - 2
api-docs/paths/events/project-events.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the events belong to.",
+        "description": "The id or slug of the project the events belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

+ 6 - 6
api-docs/paths/events/project-issues.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the issues belong to.",
+        "description": "The id or slug of the project the issues belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -152,9 +152,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the issues belong to.",
+        "description": "The id or slug of the project the issues belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -313,9 +313,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the issues belong to.",
+        "description": "The id or slug of the project the issues belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

+ 6 - 6
api-docs/paths/projects/dsyms.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project to list the DIFs of.",
+        "description": "The id or slug of the project to list the DIFs of.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -58,9 +58,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project to upload a file to.",
+        "description": "The id or slug of the project to upload a file to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -126,9 +126,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project to delete the DIF.",
+        "description": "The id or slug of the project to delete the DIF.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

+ 6 - 6
api-docs/paths/projects/service-hook-details.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the client keys belong to.",
+        "description": "The id or slug of the project the client keys belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -79,9 +79,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the client keys belong to.",
+        "description": "The id or slug of the project the client keys belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -175,9 +175,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the client keys belong to.",
+        "description": "The id or slug of the project the client keys belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

+ 4 - 4
api-docs/paths/projects/service-hooks.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the client keys belong to.",
+        "description": "The id or slug of the project the client keys belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -75,9 +75,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project the client keys belong to.",
+        "description": "The id or slug of the project the client keys belong to.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

+ 2 - 2
api-docs/paths/projects/stats.json

@@ -15,9 +15,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project.",
+        "description": "The id or slug of the project.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

+ 2 - 2
api-docs/paths/projects/tag-values.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project.",
+        "description": "The id or slug of the project.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

+ 4 - 4
api-docs/paths/projects/user-feedback.json

@@ -14,9 +14,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project.",
+        "description": "The id or slug of the project.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"
@@ -81,9 +81,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "project_slug",
+        "name": "project_id_or_slug",
         "in": "path",
         "in": "path",
-        "description": "The slug of the project.",
+        "description": "The id or slug of the project.",
         "required": true,
         "required": true,
         "schema": {
         "schema": {
           "type": "string"
           "type": "string"

Some files were not shown because too many files changed in this diff