hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
153 stars 140 forks source link

[FEAT] List products #87

Open Uthmanduro opened 1 month ago

Uthmanduro commented 1 month ago

Description

Develop an API endpoint to list products with pagination support. The endpoint should return basic information about each product, including the product name, price, and category.

Acceptance Criteria

  1. API Endpoint: Create an endpoint /api/products.
  2. Response Structure: The response should include:
  1. Pagination Support: Include pagination parameters in the request:

    • page: Current page number (default is 1)
    • limit: Number of products per page (default is 10)
  2. Response Pagination Info: Include pagination information in the response:

Purpose

To provide a means for clients to retrieve a paginated list of products with essential details, enhancing the user experience by allowing them to browse products efficiently.

Requirements

Request example

GET /api/v1/products?page=1&limit=10

Expected Outcome

theijhay commented 1 month ago

This is a duplicated issue already and it's not following the RESTFUL Api rules GET /api/products?page=1&limit=10

Uthmanduro commented 1 month ago

Link to the approved issue is here

@theijhay Did you read what this endpoint is doing at all? PS: its different from yours

theijhay commented 1 month ago

Then the version your api also. buka said it on the issue ticket