Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

A guest or an authenticated user can list answers of a question #32

@josepostiga

Description

@josepostiga

Scenario

Given I'm a guest or an authenticated user of any type
When I send a GET request to /discussions/questions/{questionId}/answers
I expect to receive a list of paginated, non-deleted, answers resources (15 per page)

Given I'm a guest or an authenticated user of any type
When I send a GET request to /discussions/questions/{questionId}/answers with any searchable properties
I expect to receive a list of paginated, non-deleted, answers resources that match the query param (15 per page)

Given I'm a guest user
When I send more than 30 GET requests to /discussions/questions/{questionId}/answers within a single minute
I expect to receive a 429 Too Many Requests status code until the next minute

Searchable properties

  • author_id: mapped to an author query param (?author={id}).
  • created_at: mapped to a created[] period type query param (?created[from]={start-period}&created[to]={end-period}).

Additional requirements

The list should be ordered from the most recent resources to the eldest.

This builds on the features of #25, which introduces the storage of questions resources.

Metadata

Metadata

Assignees

Labels

storyNew feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions