accounts and config: add user list api, configurate swagger docs
This commit is contained in:
@@ -10,11 +10,46 @@ from rest_framework import permissions
|
||||
from drf_yasg.views import get_schema_view
|
||||
from drf_yasg import openapi
|
||||
|
||||
description = """
|
||||
This API provides backend services for the application, allowing users to authenticate, manage their profiles, and interact with various system resources.
|
||||
|
||||
Authentication:
|
||||
- The API uses JWT-based authentication.
|
||||
- To access protected endpoints, include the header: `Authorization: Bearer <access_token>`.
|
||||
- Tokens can be obtained from the authentication endpoints (login, refresh).
|
||||
|
||||
Request Format:
|
||||
- All requests must be sent in JSON format unless otherwise specified.
|
||||
- File uploads should use multipart/form-data.
|
||||
|
||||
Response Format:
|
||||
- All responses follow a unified structure containing:
|
||||
- status_code
|
||||
- status (success, failure, error, not_found, created, deleted)
|
||||
- message
|
||||
- data (optional)
|
||||
- Error responses include detailed validation messages if applicable.
|
||||
|
||||
Pagination:
|
||||
- Pagination is supported using `limit` and `offset` query parameters.
|
||||
- Default limit and maximum allowed limit may vary per endpoint.
|
||||
|
||||
Versioning:
|
||||
- Current API version: v1.
|
||||
|
||||
Notes:
|
||||
- Some endpoints require elevated permissions (e.g., admin access).
|
||||
- All timestamps are returned in ISO 8601 format.
|
||||
- For secure token storage, avoid exposing refresh tokens on client-side environments.
|
||||
|
||||
Use this documentation to explore available endpoints, inspect request/response formats, and test API calls interactively.
|
||||
"""
|
||||
|
||||
schema_view = get_schema_view(
|
||||
openapi.Info(
|
||||
title="Qurilish Boshqaruv API",
|
||||
default_version='v1',
|
||||
description="Qurilish boshqaruv api",
|
||||
description=description,
|
||||
terms_of_service="https://www.google.com/policies/terms/",
|
||||
contact=openapi.Contact(email="xoliqberdiyevbehruz12@gmail.com"),
|
||||
license=openapi.License(name="Behruz's-Organization License"),
|
||||
|
||||
Reference in New Issue
Block a user