Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ psycopg2-binary
python-dotenv
dj-database-url
requests
django-cors-headers
django-cors-headers
drf_yasg
1 change: 1 addition & 0 deletions warehouse_managment/warehouse_managment/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
'rest_framework', # Django REST framework
'django.contrib.postgres',
'corsheaders', # CORS headers
'drf_yasg'
]

MIDDLEWARE = [
Expand Down
19 changes: 19 additions & 0 deletions warehouse_managment/warehouse_managment/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,29 @@
from django.contrib import admin
from django.urls import path, include

from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
openapi.Info(
title="Your API",

Copilot AI May 8, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider updating the API title to more specifically reflect the service name for clearer documentation.

Suggested change
title="Your API",
title="Warehouse Management API",

Copilot uses AI. Check for mistakes.
default_version='v1',
description="API documentation",
),
public=True,
permission_classes=[permissions.AllowAny],
)


urlpatterns = [
path('admin/', admin.site.urls),

path('api/product/', include('product.urls')),

path('api/warehouse/', include('warehouse.urls')),

path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
path('swagger.json', schema_view.without_ui(cache_timeout=0), name='schema-json'),
]