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

Improve the generated openapi schema #3

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

Conversation

tony-nyagah
Copy link
Owner

What type of PR is this?

Check all applicable

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue :

What does this PR do?

This PR improves the OpenAPI schema documentation generated by the FastAPI code. Most of the code is generated after taking into account issues raised by Rate My OpenAPI and going through the documentation section of the generated report.

Consideration :

I have looked at resolving most of the issues but the one that states OpenAPI object must have non-empty "tags" array. proved to be a challenge. It seems that one requires rewriting a lot of code.

How to test?

  • Clone the repo.
  • Install by following the steps in docs/src/installation/docker.md or docs/src/installation/docker.md.
  • Run locally and view routes at http://localhost:8000/v1/docs

Screenshots :

Original Rate My OpenAPI score: https://ratemyopenapi.com/report/e16d5882-ea59
original score

Rate My OpenAPI score after modifications: https://ratemyopenapi.com/report/bee9539a-df5b-4f5d-8d15-c75d396a2dd9

New Score

Checklists:

Checklist before requesting 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant