Commit f1881951 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '35527-add-created-at-to-package' into 'master'

Adds created at to package

See merge request gitlab-org/gitlab!20816
parents c0d1383c 227c0c11
---
title: Adds created_at object to package api response
merge_request: 20816
author:
type: added
......@@ -31,13 +31,15 @@ Example response:
"id": 1,
"name": "com/mycompany/my-app",
"version": "1.0-SNAPSHOT",
"package_type": "maven"
"package_type": "maven",
"created_at": "2019-11-27T03:37:38.711Z"
},
{
"id": 2,
"name": "@foo/bar",
"version": "1.0.3",
"package_type": "npm"
"package_type": "npm",
"created_at": "2019-11-27T03:37:38.711Z"
}
]
```
......@@ -76,7 +78,8 @@ Example response:
"_links": {
"web_path": "/namespace1/project1/-/packages/1",
"delete_api_path": "/namespace1/project1/-/packages/1"
}
},
"created_at": "2019-11-27T03:37:38.711Z"
},
{
"id": 2,
......@@ -86,7 +89,8 @@ Example response:
"_links": {
"web_path": "/namespace1/project1/-/packages/1",
"delete_api_path": "/namespace1/project1/-/packages/1"
}
},
"created_at": "2019-11-27T03:37:38.711Z"
}
]
```
......@@ -128,7 +132,8 @@ Example response:
"_links": {
"web_path": "/namespace1/project1/-/packages/1",
"delete_api_path": "/namespace1/project1/-/packages/1"
}
},
"created_at": "2019-11-27T03:37:38.711Z"
}
```
......
......@@ -870,6 +870,8 @@ module EE
expose_url api_v4_projects_packages_path(package_id: package.id, id: package.project_id)
end
end
expose :created_at
end
class PackageFile < Grape::Entity
......
......@@ -26,6 +26,9 @@
"type": "string"
}
}
},
"created_at": {
"type": "string"
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment