Closed theGaryLarson closed 1 year ago
@lloydchang I added in-line docs for the api folder to start. Created this as a draft to get some feedback first though.
Thanks, @theGaryLarson
See https://github.com/freeCodeCamp/classroom/pull/366#issuecomment-1652616915 and https://github.com/freeCodeCamp/classroom/pull/396#issuecomment-1652403604
as they relate to:
Some checks were not successful 1 failing and 2 successful checks
❌ Classroom ci / Build and test (16.14.2) (pull_request) Failing after 43s Details
below.
lgtm
:shipit: :ship: :it:
While Mintlify Writer AI generated documentation is lengthy, I agree with @theGaryLarson that:
This would benefit many people like myself who are new to the codebase and want to gain a better understanding.
• In a professional setting, experienced software engineers would find the documentation too verbose.
• In this classroom setting, the target audience of this codebase is students who are learning the basics of software engineering and computer programming.
To use a basic example:
res.status(200).end();
is documented by Mintlify Writer as:
/ The line
res.status(200).end();
is setting the HTTP response status code to 200 (OK) and ending the response. This indicates that the request was successful and there is no additional data to be sent in the response body. / res.status(200).end();
• Some students have not learned that 200 is OK.
• Other students and experienced software engineers learned from experience that 200 is OK.
• Most students and experienced software engineers have not read the official HTTP standard at https://datatracker.ietf.org/doc/html/rfc9110
• The Mintlify Writer-generated documentation tries to split the difference by adding lengthy documentation, which would be too verbose for experienced software engineers but is just the right temperature for students who are new to the codebase and want to understand better.
For reference, HTTP standard:
• 200 OK
from the Hypertext Transfer Protocol (HTTP) standard by Internet Engineering Task Force (IETF) at https://datatracker.ietf.org/doc/html/rfc9110#section-15.3
Hey @lloydchang given the state of tests and route changes in API. I am going to leave this as a draft until tests pass. Then will sync and repush to this branch once they are resolved.
Checklist:
Update index.md
)Starting on #391
I am keeping this as a draft PR until we can get the paths updated between tests and the API routes. Then will resubmit once tests clear.
I am using the AI tool Mintlify to help me understand the codebase and document it along the way. I believe this would benefit many people like myself who are new to the codebase and want to gain a better understanding.