apps/api/plane/utils/openapi/README.md
This module provides a well-organized structure for OpenAPI/drf-spectacular utilities, replacing the monolithic openapi_spec_helpers.py file with a more maintainable modular approach.
plane/utils/openapi/
├── __init__.py # Main module that re-exports everything
├── auth.py # Authentication extensions
├── parameters.py # Common OpenAPI parameters
├── responses.py # Common OpenAPI responses
├── examples.py # Common OpenAPI examples
├── decorators.py # Helper decorators for different endpoint types
└── hooks.py # Schema processing hooks (pre/post processing)
from plane.utils.openapi import (
asset_docs,
ASSET_ID_PARAMETER,
UNAUTHORIZED_RESPONSE,
# ... other imports
)
from plane.utils.openapi.decorators import asset_docs
from plane.utils.openapi.parameters import ASSET_ID_PARAMETER
from plane.utils.openapi.responses import UNAUTHORIZED_RESPONSE
APIKeyAuthenticationExtension - X-API-Key authenticationAPITokenAuthenticationExtension - Bearer token authenticationWORKSPACE_SLUG_PARAMETER, PROJECT_ID_PARAMETER, ISSUE_ID_PARAMETER, ASSET_ID_PARAMETERCURSOR_PARAMETER, PER_PAGE_PARAMETERUNAUTHORIZED_RESPONSE, FORBIDDEN_RESPONSENOT_FOUND_RESPONSE, VALIDATION_ERROR_RESPONSEPRESIGNED_URL_SUCCESS_RESPONSE, ASSET_UPDATED_RESPONSE, etc.GENERIC_ASSET_UPLOAD_SUCCESS_RESPONSE, ASSET_DOWNLOAD_SUCCESS_RESPONSE, etc.FILE_UPLOAD_EXAMPLE, WORKSPACE_EXAMPLE, PROJECT_EXAMPLE, ISSUE_EXAMPLEworkspace_docs() - For workspace endpointsproject_docs() - For project endpointsissue_docs() - For issue/work item endpointsasset_docs() - For asset endpointspreprocess_filter_api_v1_paths() - Filters API v1 pathspostprocess_assign_tags() - Assigns tags based on URL patternsgenerate_operation_summary() - Generates operation summaries✅ FULLY COMPLETE - All components from the legacy openapi_spec_helpers.py have been successfully migrated to this modular structure and the old file has been completely removed. All imports have been updated to use the new modular structure.
plane/api/views/asset.py - All methods use new @asset_docs helpersplane/api/views/project.py - Import updatedplane/api/views/user.py - Import updatedplane/api/views/state.py - Import updatedplane/api/views/intake.py - Import updatedplane/api/views/member.py - Import updatedplane/api/views/module.py - Import updatedplane/api/views/cycle.py - Import updatedplane/api/views/issue.py - Import updatedplane/settings/common.py - Hook paths updatedplane/api/apps.py - Auth extension import updated