endpoint_route_handler
This module provides a base handler for adding and removing controller routes on the fly in Odoo.
Key Features
- endpoint.route.handler: Defines fields for route properties including name, route path, authentication type, HTTP method, and content type.
- endpoint.route.handler: Generates unique endpoint hashes based on routing-impacting fields for identification.
- endpoint.route.handler: Enforces route uniqueness across all models inheriting the mixin to prevent conflicts.
- endpoint.route.handler: Supports route prefixes and automatic route cleaning for consistency.
- endpoint.route.handler: Validates routes against blacklists and ensures required content types for POST/PUT methods.
- endpoint.route.handler.tool: Enables creation of transient route handlers without database persistence for temporary use.
- endpoint.route.sync.mixin: Manages synchronization state with the registry using a registry_sync flag.
- endpoint.route.sync.mixin: Automatically registers and unregisters controllers on record write or unlink operations.
- endpoint.route.sync.mixin: Handles post-commit hooks to update the registry after database transactions.
- ir.http: Integrates custom endpoint rules into Odoo's HTTP routing system by extending ir.http.
- registry: Stores endpoint rules in a database table with versioning and timestamp tracking.
- registry: Provides methods to add, update, and drop endpoint rules efficiently.
- registry: Supports grouping of routes for better organization and management.
- controllers: Offers a fallback controller that raises NotFound exceptions for unregistered endpoints.