bounswe / 2021SpringGroup4

This is the project repository of Group 4 for Boğaziçi University's Fundamentals of Software Engineering course.
2 stars 1 forks source link

Backend: Set up automatic API documentation generation #121

Closed kerimoglutolga closed 3 years ago

kerimoglutolga commented 3 years ago

Description

In order to allow frontend teams to easily make use of the backend API we need comprehensive documentation that is generated automatically, ideally with an interface that allows manual interaction as well for convenience. We have found this to be a much better solution than manual documentation as it will update itself automatically, leaving no room for any human errors.

kerimoglutolga commented 3 years ago

Done! Find the related PR at: https://github.com/bounswe/2021SpringGroup4/pull/116

Using the rest frameworks .schema and .documentation packages, an initial schema is created in machine-readable openapi format. You can access the schema at /api/schema/. Then, by using the coreapi package the schema is turned into an interface detailing each endpoint and allowing one to send requests directly over the interface. You can access it at /api/docs/.

New dependencies to install: coreapi==2.3.3 coreschema==0.0.4