docs: README "API Design" lists endpoints that do not exist

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Domain
api, documentation

Research direction

Read the README's API Design section and compare it with the auth and course route files under routes/*.js, which define 33 routes. The suggested fix calls for an OpenAPI spec and CI checks, so first map the documented endpoints to the mounted routes and decide how the spec will be checked against them. Done means the README links an accurate spec and CI detects routes missing from either side.

Written by the indexing model from the issue text.

Description

documentation

The README's API Design section lists ten endpoints such as POST /api/auth/signup, POST /api/auth/verify-otp, GET /api/courses/:id and POST /api/courses/:id/rate. None of them exists in the code: the real routes are mounted under /api/v1/… and use action names, for example POST /api/v1/auth/signup, GET /api/v1/course/getAllCourses and POST /api/v1/course/getCourseDetails. The auth and course route files alone define 33 routes.

Suggested fix

  • Replace the list with an OpenAPI spec (openapi.yaml) generated from or checked against routes/*.js, and link a rendered version (Redocly or Swagger UI) from the README.
  • Add a CI step that fails when a route exists in the code but not in the spec, or the other way round.

Found while reviewing StudyNotion with Claude Code.

Dominant language
JavaScript
Stars
23
Forks
8
Avg merge
11m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from khemssharma/StudyNotion

All issues in khemssharma/StudyNotion

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.