tilburgsciencehub / music-to-scrape

A fictitious music streaming service with a real website and API so you can learn how to scrape!
https://music-to-scrape.org
3 stars 6 forks source link

change documentation to Swagger #9

Closed hannesdatta closed 1 year ago

hannesdatta commented 1 year ago

I don't like the looks of Swagger. Can we change the documentation to ReDoc?

Deliverable:

How to get started:

thierrylahaije commented 1 year ago

Documentation is now changed from Swagger to Redoc. There is only still one issue we need to solve.

To convert Swagger to Redoc, app routes are being used, but FastAPI sees these routes as endpoints. I tried to solve this issue by creating a function to disable them from the docs, but this has not worked out yet. We need to check how to solve this.

hannesdatta commented 1 year ago

@thierrylahaije - can you describe how you've tackled this issue? Please then close this, as I think this has been done.

thierrylahaije commented 1 year ago

Summary:

This issue has been tackled by changing a part of the code as follows:

from: app = FastAPI()

to: app = FastAPI(docs_url=None, redoc_url="/docs")

The code now specifies that the original docs page changes to redoc.