Browse Source

feat(dashboard-filters): Expose id in release endpoint (#37760)

Nar Saynorath 2 years ago
parent
commit
e6dcaa321f

+ 2 - 0
api-docs/paths/releases/organization-release.json

@@ -32,6 +32,7 @@
               "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
             },
             "example": {
+              "id": 2,
               "authors": [],
               "commitCount": 0,
               "data": {},
@@ -146,6 +147,7 @@
               "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
             },
             "example": {
+              "id": 2,
               "authors": [],
               "commitCount": 0,
               "data": {},

+ 3 - 0
api-docs/paths/releases/organization-releases.json

@@ -35,6 +35,7 @@
             },
             "example": [
               {
+                "id": 2,
                 "authors": [],
                 "commitCount": 0,
                 "data": {},
@@ -59,6 +60,7 @@
                 "version": "2.0rc2"
               },
               {
+                "id": 1,
                 "authors": [],
                 "commitCount": 0,
                 "data": {},
@@ -241,6 +243,7 @@
               "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
             },
             "example": {
+              "id": 2,
               "authors": [],
               "commitCount": 0,
               "data": {},

+ 1 - 0
src/sentry/api/serializers/models/release.py

@@ -511,6 +511,7 @@ class ReleaseSerializer(Serializer):
             return rv
 
         d = {
+            "id": obj.id,
             "version": obj.version,
             "status": ReleaseStatus.to_string(obj.status),
             "shortVersion": obj.version,