Page MenuHomePhabricator

Document All API Endpoints in the README
Closed, ResolvedPublic

Description

Domain: Documentation

Difficulty: Beginner

Description:
The README.md in the API folder lacks detailed endpoint documentation. Add a comprehensive API section documenting:

  • All available endpoints (GET, POST, etc.)
  • URL paths and query parameters
  • Example requests and responses
  • Required vs optional parameters
  • Error response formats
  • Base URL information

Example format:

### GET /actors/search
Search for actors by name
- Query Parameters: `name` (required, string)
- Example: `/actors/search?name=Tom Hanks`
- Response: Array of actor objects with id, label, description, and imageUrl

Expected Outcome:

  • Complete API documentation in README.md
  • Frontend developers can understand API contracts
  • Clear parameter and response formats documented
  • Example curl commands for each endpoint

Setup Steps:

Clone code

  1. Open src/server.js to identify all routes
  2. Open README.md.
  3. Add section: "## API Endpoints."
  4. Document each endpoint from:
    • /actors routes
    • /productions routes
    • /collaborators routes
  5. Include example requests and responses
  6. Add parameter descriptions

Links/References:

  • File: README.md
  • Routes defined in:
    • src/routers/actorsRoutes.ts
    • src/routers/productionRouters.ts
    • src/routers/collaborationRouters.ts

Event Timeline

Collins edited subscribers, added: Fweshpreci; removed: Bovimacoco.

Change #1218334 had a related patch set uploaded (by Wandji collins; author: Ologuie Arlette):

[labs/tools/WdTmCollab@main] document api endpoint in the readme file to facilitate users understanding

https://gerrit.wikimedia.org/r/1218334

Change #1218334 merged by jenkins-bot:

[labs/tools/WdTmCollab@main] document api endpoint in the readme file to facilitate users understanding

https://gerrit.wikimedia.org/r/1218334