[FIX] 14.0 pydantic: generate schema using field name
ref: https://pydantic-docs.helpmanual.io/usage/schema/
The schema is generated by default using aliases as keys, but it can be generated using model property names instead by calling MainModel.schema/schema_json(by_alias=False).
Before:
generated schema uses aliases (odoo's internal naming) to name fields.
The schema does not correspond to what's effectively returned.

After:
generated schema uses the field's name, masking odoo's internal naming.
The schema corresponds to what's effectively returned.

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
I second the need for this change. Should we also change it for the params?
https://github.com/OCA/rest-framework/blob/6cf2dc90bd0f9a21f0385d3acc51273d8bbfb8f1/base_rest_pydantic/restapi.py#L56-L59
I second the need for this change. Should we also change it for the params?
https://github.com/OCA/rest-framework/blob/6cf2dc90bd0f9a21f0385d3acc51273d8bbfb8f1/base_rest_pydantic/restapi.py#L56-L59
I don't think so because I don't notice this problem on query parameters

/ocabot merge patch
On my way to merge this fine PR! Prepared branch 14.0-ocabot-merge-pr-277-by-lmignon-bump-patch, awaiting test results.
Congratulations, your PR was merged at 9338361be3fe0cde6d6ab61fd67f6fb1b224902d. Thanks a lot for contributing to OCA. ❤️