-
Notifications
You must be signed in to change notification settings - Fork 0
A Comprehensive Tutorial to Swagger
In the terminal of the IDE you are using, write the following commands one by one
pip install pyyaml
pip install uritemplate
from rest_framework.schemas import get_schema_view
path('api_schema',get_schema_view(title = 'API Schema', description = 'API documentation'), name = 'api_schema'),
Use the link http://127.0.0.1:8000/api/api_schema
pip install django-rest-swagger
In the TEMPLATES list, insert the following line into DIR os.path.join(BASE_DIR, 'templates')
Copy the code in the link "Check the third step."
from django.views.generic import TemplateView
path('docs/', TemplateView.as_view( template_name='docs.html', extra_context={'schema_url':'api_schema'}), name='swagger-ui'),
Use the link http://127.0.0.1:8000/api/docs/
Please refer to this video and this repo if you have additional questions. They were immensely helpful in preparing the guide.
- Meeting 1 - 03/03/2023
- Meeting 2 - 09/03/2023
- Meeting 3 - 10/03/2023
- Meeting 4 - 16/03/2023
- Meeting 5 - 18/03/2023
- Meeting 6 - 23/03/2023
- Meeting 7 - 25/03/2023
- Meeting 8 - 30/03/2023
- Meeting 9 - 01/04/2023
- Meeting 10 - 06/04/2023
- Meeting 11 - 08/04/2023
- Meeting 12 - 27/04/2023
- Meeting 13 - 29/04/2023
- Meeting 14 - 04/05/2023
- Meeting 15 - 10/05/2023