As developer
I want an api endpoint
So that when I send a GET request, hateoas, paginated list of all studies associated with Sumstats is returned in JSON Format
Management Rules:
Rule 1: Endpoint - /v2/summaryStatistics/studies
Rule 2: HTTP Request Method - GET
Rule 3: HATEOAS, with filer, sorting, pagination, and sizing
Rule 4: Endpoint should accept filter, and sort parameters as in /studies?accession=...&page=0&size=20&sort=...
Rule 5: Search filter should be available for: accession, reported-trait, trait, background-trait, discovery-sample-number, replication-sample-number
Rule 6: Sort feature should be available for: discovery-sample-number, replication-sample-number, association-count, summary-statistics
Rule 7: Returned Study JSON entity must include: Study accession, Reported trait, Trait, Background trait, Discovery sample number and ancestry, Replication sample number and ancestry, Association count, and Summary statistics Availability
Acceptance Tests:
Given no parameter
When the front end sends a GET request to the endpoint
Hateoas compliant list of studies is returned in the specified JSON Format
Given sorting, pagination, and/or some search and filter parameters
When the front end sends a GET request to thesame endpoint
Hateoas compliant filtered list of studies satisfying the conditions in the url parameter must be returned
As developer I want an api endpoint So that when I send a GET request, hateoas, paginated list of all studies associated with Sumstats is returned in JSON Format
Management Rules: Rule 1: Endpoint - /v2/summaryStatistics/studies Rule 2: HTTP Request Method - GET Rule 3: HATEOAS, with filer, sorting, pagination, and sizing Rule 4: Endpoint should accept filter, and sort parameters as in /studies?accession=...&page=0&size=20&sort=...
Rule 5: Search filter should be available for: accession, reported-trait, trait, background-trait, discovery-sample-number, replication-sample-number
Rule 6: Sort feature should be available for: discovery-sample-number, replication-sample-number, association-count, summary-statistics
Rule 7: Returned Study JSON entity must include: Study accession, Reported trait, Trait, Background trait, Discovery sample number and ancestry, Replication sample number and ancestry, Association count, and Summary statistics Availability
Acceptance Tests: Given no parameter When the front end sends a GET request to the endpoint Hateoas compliant list of studies is returned in the specified JSON Format
Given sorting, pagination, and/or some search and filter parameters When the front end sends a GET request to thesame endpoint Hateoas compliant filtered list of studies satisfying the conditions in the url parameter must be returned