Browse Source

chore(api): Make `List Issues to be Resolved in a Particular Release` Endpoint Experimental (#64886)

https://docs.sentry.io/api/releases/list-issues-to-be-resolved-in-a-particular-release/
should not be public. The endpoint file has publish status to private
but these (incomplete) docs come from the old documentation system with
JSON. This PR removes the outdated documentation to line up with the
status in the endpoint file.
Isabella Enriquez 1 year ago
parent
commit
7c008d6abf

+ 0 - 3
api-docs/openapi.json

@@ -195,9 +195,6 @@
     "/api/0/organizations/{organization_slug}/releases/{version}/commitfiles/": {
       "$ref": "paths/releases/organization-release-commit-files.json"
     },
-    "/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/resolved/": {
-      "$ref": "paths/releases/project-issues-resolved-in-release.json"
-    },
     "/api/0/organizations/{organization_slug}/releases/{version}/deploys/": {
       "$ref": "paths/releases/deploys.json"
     },

+ 0 - 52
api-docs/paths/releases/project-issues-resolved-in-release.json

@@ -1,52 +0,0 @@
-{
-  "get": {
-    "tags": ["Releases"],
-    "description": "List issues to be resolved in a particular release.",
-    "operationId": "List Issues to be Resolved in a Particular Release",
-    "parameters": [
-      {
-        "name": "organization_slug",
-        "in": "path",
-        "description": "The slug of the organization.",
-        "required": true,
-        "schema": {
-          "type": "string"
-        }
-      },
-      {
-        "name": "project_slug",
-        "in": "path",
-        "description": "The slug of the project.",
-        "required": true,
-        "schema": {
-          "type": "string"
-        }
-      },
-      {
-        "name": "version",
-        "in": "path",
-        "description": "The version identifier of the release.",
-        "required": true,
-        "schema": {
-          "type": "string"
-        }
-      }
-    ],
-    "responses": {
-      "200": {
-        "description": "Success"
-      },
-      "403": {
-        "description": "Forbidden"
-      },
-      "404": {
-        "description": "Not Found"
-      }
-    },
-    "security": [
-      {
-        "auth_token": ["project:releases"]
-      }
-    ]
-  }
-}

+ 1 - 1
src/sentry/api/endpoints/project_issues_resolved_in_release.py

@@ -15,7 +15,7 @@ from sentry.models.group import Group
 class ProjectIssuesResolvedInReleaseEndpoint(ProjectEndpoint, EnvironmentMixin):
     owner = ApiOwner.ISSUES
     publish_status = {
-        "GET": ApiPublishStatus.PRIVATE,
+        "GET": ApiPublishStatus.EXPERIMENTAL,
     }
     permission_classes = (ProjectPermission,)
 

+ 0 - 70
tests/apidocs/endpoints/releases/test_project_issues_solved_in_release.py

@@ -1,70 +0,0 @@
-from uuid import uuid1
-
-from django.test.client import RequestFactory
-from django.urls import reverse
-
-from fixtures.apidocs_test_case import APIDocsTestCase
-from sentry.models.commit import Commit
-from sentry.models.grouplink import GroupLink
-from sentry.models.groupresolution import GroupResolution
-from sentry.models.releasecommit import ReleaseCommit
-from sentry.models.repository import Repository
-from sentry.testutils.silo import region_silo_test
-
-
-@region_silo_test
-class ProjectIssuesResolvedInReleaseEndpointTest(APIDocsTestCase):
-    endpoint = "sentry-api-0-project-release-resolved"
-    method = "get"
-
-    def setUp(self):
-        super().setUp()
-        self.user = self.create_user()
-        self.org = self.create_organization()
-        self.team = self.create_team(organization=self.org)
-        self.create_member(organization=self.org, user=self.user, teams=[self.team])
-        self.project = self.create_project(teams=[self.team])
-        self.release = self.create_release(project=self.project)
-        self.group = self.create_group(project=self.project)
-        self.login_as(self.user)
-
-        repo = Repository.objects.create(organization_id=self.org.id, name=self.project.name)
-        commit = Commit.objects.create(
-            organization_id=self.org.id, repository_id=repo.id, key=uuid1().hex
-        )
-        commit2 = Commit.objects.create(
-            organization_id=self.org.id, repository_id=repo.id, key=uuid1().hex
-        )
-        ReleaseCommit.objects.create(
-            organization_id=self.org.id, release=self.release, commit=commit, order=1
-        )
-        ReleaseCommit.objects.create(
-            organization_id=self.org.id, release=self.release, commit=commit2, order=0
-        )
-        GroupLink.objects.create(
-            group_id=self.group.id,
-            project_id=self.group.project_id,
-            linked_type=GroupLink.LinkedType.commit,
-            relationship=GroupLink.Relationship.resolves,
-            linked_id=commit.id,
-        )
-
-        GroupResolution.objects.create(
-            group=self.group,
-            release=self.release,
-            type=GroupResolution.Type.in_release,
-        )
-        self.url = reverse(
-            "sentry-api-0-project-release-resolved",
-            kwargs={
-                "organization_slug": self.project.organization.slug,
-                "project_slug": self.project.slug,
-                "version": self.release.version,
-            },
-        )
-
-    def test_get(self):
-        response = self.client.get(self.url)
-        request = RequestFactory().get(self.url)
-
-        self.validate_schema(request, response)