Skip to content

Conversation

@mkurkar
Copy link
Collaborator

@mkurkar mkurkar commented Oct 29, 2025

Related Issue:

This pull request introduces a comprehensive set of serializers for the dashboard API, organizing them by theme (common, learners, courses, roles, config, and statistics). It establishes a unified structure for serialization, permission handling, and read-only endpoints, which will help standardize API responses and improve maintainability.

Core API Structure

  • Created an __init__.py in the serializers package to aggregate and expose all serializers, grouped by their respective themes (common, learners, courses, roles, config, statistics), and defined the __all__ list for explicit exports.

Common Serializers & Mixins

  • Added DataExportTaskSerializer, ReadOnlySerializer, and FxPermissionInfoSerializerMixin in common.py to provide reusable serialization logic, permission information fields, and HTML sanitization for notes.

Config Serializers

  • Implemented serializers for configuration-related objects, including file upload validation, tenant asset management, and tenant configuration details, with custom permission checks and validation logic.

Role Serializers

  • Developed UserRolesSerializer to serialize user role information, including global and tenant-specific roles, and added logic for filtering and constructing role data based on permissions and query parameters.

Statistics Serializers

  • Added serializers for statistics endpoints, supporting read-only access and structured representation of aggregated counts and query settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants