loiane / copilot-demo

9 stars 0 forks source link

Create GET endpoint for Products #3

Closed loiane closed 5 months ago

loiane commented 5 months ago

As a customer browsing an e-commerce website or app, I want to see a list of all available products So that I can find items I'm interested in buying.

Acceptance Criteria

  1. The API endpoint should return a list of all products in the system.
  2. Each product in the list should include at least the following information:
    • Unique product ID
    • Name
    • Description (brief summary)
    • Price
  3. The response should be formatted in a standard way, such as JSON.
  4. The API should be well-documented so that developers know how to use it.

Additional Considerations

Technical Notes

Example API Endpoint

GET /api/products

Example Response (JSON)

[
  {
    "id": 12345,
    "name": "Awesome T-Shirt",
    "description": "The most comfortable t-shirt you'll ever wear.",
    "price": 19.99,
  },
  {
    "id": 54321,
    "name": "Stylish Jeans",
    "description": "Classic denim jeans with a modern fit.",
    "price": 49.99,
  },
  // ... more products
]
loiane commented 5 months ago

Don't forget to write unit tests using Junit 5!