HTTP API dispatcher
http_api_dispatcher · OCA/rest-framework
Health
60/100
fair
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.09 MB
Module directory on disk
Code analysis
0 migration notes
1 model
0 views
0 HTTP endpoints
Description
Technical module providing a generic dispatcher for JSON APIs: routes of type http_api.
It takes care of the plumbing common to any API endpoint:
- parse params from the query string and the body (JSON, forms) once
- set the language from the
Accept-Languageheader - validate and convert input params and results via pluggable params
declared on the route (see
http_api_cerberusfor Cerberus schemas) - serialize results as JSON (dates as ISO strings, decimals as floats)
- turn exceptions into JSON error responses with proper status codes
- provide hooks to extend each step via standard Odoo inheritance
To declare endpoints on classes that are not controllers (eg: services)
whose routes are generated, see endpoint_spec.
The error format and the main behaviors are compatible with base_rest
to ease the migration of existing APIs.
Dependencies
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 0
No views found for this module.
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 1
New fields (0)
No new fields.
Public methods (0)No public methods.