base_rest_pydantic
This module enables the use of Pydantic models for input parameters and output responses in REST API methods within Odoo.
Key Features
- REST API: Enables the use of Pydantic models as input parameters for REST service methods.
- REST API: Enables the use of Pydantic models as output parameters for REST service methods.
- Pydantic: Provides validation for input data using Pydantic models, raising errors for invalid data.
- Pydantic: Provides validation for output data using Pydantic models to ensure response integrity.
- OpenAPI: Generates query parameters in OpenAPI specifications from Pydantic model schemas.
- OpenAPI: Generates request body schemas in OpenAPI specifications from Pydantic models.
- OpenAPI: Generates response schemas in OpenAPI specifications from Pydantic models.
- Pydantic: Supports handling lists of Pydantic models with configurable constraints like minimum and maximum items.