Repository navigation
Conversation
Document all 11 endpoints with curl examples, sample responses, request fields and limits, and error messages. Link the new page from the README. Refs NxtLabTech#29
Some examples change data, so their results depend on the examples run before them. List the order that gives the results shown in the document, and tell readers to run the closed sessions example after closing session 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Adds
docs/api.md, an API reference for all 11 endpoints, and links it from the "API endpoints" section of the README.Each endpoint has a
curlexample, a sample JSON response, the required fields and limits (255 and 2000 characters), and the possible error statuses (400, 404, 409) with example messages. The page also explains thepositionfield and the date format (UTC,Y-m-d H:i:s).The document describes the current behavior of
main(commita84e812). If #40, #41, or #42 are merged, the queue, error, and close sections will need updating.Which issue does this address?
Fixes #29
How was it tested?
No code changed, so I did not run
composer testor the Flutter tests.I ran all 28
curlcommands from the document against a fresh SQLite database started withcomposer start, and compared each result with the document. The status codes, headers, field names, and error messages all matched. Ids and timestamps differ from the samples, as expected.I also checked these by hand:
title,mentor_name,student_name, andtopic, and exactly 2000 characters forquestion.student_email, an address of 254 characters is accepted and one of 255 characters is rejected as not a valid email address.skippedon a waiting doubt returns 400, likesolved.WAITING.