Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance documentation/API documentation and examples #267

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

nifedara
Copy link

@nifedara nifedara commented Aug 14, 2024

What type of PR is this?

  • 📝 Documentation

Related Issue :

What does this PR do?

  • Makes updates to Auth, Extract, Tasks, Custom Exports, Stats, HDX and S3 endpoints

  • Adds top-level security

  • Adds API description

  • Adds endpoints description

  • Adds path and query parameters description

  • Adds an error message model

  • Updates the HTTPException response to match the error model

  • Adds 200, 401, 403, 404, 429, & 500 responses and examples to endpoints

  • Removes trailing slashes from endpoints

Consideration :

  • The top-level security will save users from repeatedly entering the access code for every protected endpoint
  • Having parameters defined helps the users understand the API better.
  • The error model helps maintain the consistency of error that the user expects and it is also recommended for API security that response schemas be used hence why I added a model for Error messages.
  • Removing the trailing slashes is good practice that ensures consistency in the endpoints
  • I was proactive in getting the responses from each endpoint.
  • Increases the API score from 54 to 69. I still intend to improve it more.

How to test?

Screenshots :

Before:

image
image

After my changes:

image
image

Checklists:

Checklist before requesting a review :

  • 📖 Read the HOT Code of Conduct: https://docs.hotosm.org/code-of-conduct
  • 👷‍♀️ Create small PRs. In most cases, this will be possible.
  • ✅ Provide tests for your changes.
  • 📝 Use descriptive commit messages.
  • 📗 Update any related documentation and include any relevant screenshots.

[optional] What gif best describes this PR or how it makes you feel?

@nifedara nifedara changed the title Enhance documentation/APIdocumentation and examples Enhance documentation/API documentation and examples Aug 21, 2024
@nifedara nifedara marked this pull request as ready for review August 21, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant