fortran-lang / registry

Registry for Fortran package manager
MIT License
8 stars 3 forks source link

Documentation for the APIs #11

Closed arteevraina closed 1 year ago

arteevraina commented 1 year ago

Since I and @henilp105 have already started working on implementing the APIs in the backend. @minhqdao suggested that we should document the APIs very well so that it will be easier to develop asynchronously without having the need to ping me and @henilp105 in the backend.

I am thinking we can maintain a markdown file inside the project in which we can list endpoints and describe how it receives the request and send json response and other things related to the API.

But, if anyone has any easier / better approach that will work please feel free to suggest in the comments.

@henilp105 @minhqdao @perazz @fortran-lang/fpm

milancurcic commented 1 year ago

FastAPI has built-in support for automatic API docs generation using Swagger UI. There's a Swagger UI blueprint for Flask: https://github.com/sveint/flask-swagger-ui. Using this requires first generating the openapi.json schema file from the Flask server. There seem to be quite a few solutions out there, but an obvious choice is less clear. Perhaps this: https://github.com/marshmallow-code/apispec.

I can't recommend this enough for API development and documentation. I use it to make all my test requests during prototyping. Example: https://petstore.swagger.io/#/

arteevraina commented 1 year ago

Thank you @milancurcic for your suggestions. We have written the API documentation here using swagger.