-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EES-5427 Add file info to data set version summaries in admin #5167
Conversation
@@ -42,7 +42,7 @@ public abstract class DataSetVersionsControllerTests( | |||
{ | |||
private const string BaseUrl = "api/public-data/data-set-versions"; | |||
|
|||
public class ListLiveVersionsTests( | |||
public class ListVersionsTests( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename this back to ListLiveVersionsTests
as we've kept the logic to only return the live ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change on purpose as it felt too specific a name for an endpoint that lists versions.
IMO, filtering on 'live' statuses makes sense as a default, but it'd be a good idea to keep the naming more generic to keep the endpoint open to extension for other statuses (e.g. with a query parameter or something) in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel too strongly either way. Happy to approve :)
[Produces("application/json")] | ||
public async Task<ActionResult<PaginatedListViewModel<DataSetLiveVersionSummaryViewModel>>> ListLiveVersions( | ||
public async Task<ActionResult<PaginatedListViewModel<DataSetLiveVersionSummaryViewModel>>> ListVersions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename this back to ListLiveVersions
as we've kept the logic to only return the live ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above comment
This PR changes data set version summaries in the admin to return file info:
DataSetVersionSummary.File.Id
(mapped fromReleaseFile.File.DataSetFileId
)DataSetVersionSummary.File.Title
(mapped fromReleaseFile.Name
)This can then be used in the frontend to link through to the data set page in the public frontend.
Relevant changes
ListVersions
endpoint to use adataSetId
query parameter instead of the parameter being inside of the URL. This was previously inconsistent with other data set version endpoints.ListVersions
endpoint not 404ing if the data set can't be found.