From e9b65cf1ceb30101cdf0d951d29e056a2d2c284a Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 13 Oct 2023 13:08:43 +0000 Subject: [PATCH] [BOT] post-merge updates --- README.md | 4 +- extendable_fastapi/README.rst | 18 ++++++- extendable_fastapi/__manifest__.py | 2 +- extendable_fastapi/readme/HISTORY.rst | 12 +++++ .../readme/newsfragments/380.feature | 7 --- .../static/description/index.html | 44 ++++++++++++---- fastapi/README.rst | 27 ++++++++-- fastapi/__manifest__.py | 2 +- fastapi/readme/HISTORY.rst | 12 +++++ fastapi/readme/newsfragments/380.feature | 7 --- fastapi/static/description/index.html | 51 +++++++++++++------ 11 files changed, 136 insertions(+), 50 deletions(-) create mode 100644 extendable_fastapi/readme/HISTORY.rst delete mode 100644 extendable_fastapi/readme/newsfragments/380.feature create mode 100644 fastapi/readme/HISTORY.rst delete mode 100644 fastapi/readme/newsfragments/380.feature diff --git a/README.md b/README.md index 0779e108..c538184f 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ addon | version | maintainers | summary [base_rest_pydantic](base_rest_pydantic/) | 16.0.2.0.1 | | Pydantic binding for base_rest [datamodel](datamodel/) | 16.0.1.0.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | This addon allows you to define simple data models supporting serialization/deserialization [extendable](extendable/) | 16.0.1.0.1 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Extendable classes registry loader for Odoo -[extendable_fastapi](extendable_fastapi/) | 16.0.2.0.2 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Allows the use of extendable into fastapi apps -[fastapi](fastapi/) | 16.0.1.1.2 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Odoo FastAPI endpoint +[extendable_fastapi](extendable_fastapi/) | 16.0.2.1.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Allows the use of extendable into fastapi apps +[fastapi](fastapi/) | 16.0.1.2.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Odoo FastAPI endpoint [fastapi_auth_jwt](fastapi_auth_jwt/) | 16.0.1.0.1 | [![sbidoul](https://github.com/sbidoul.png?size=30px)](https://github.com/sbidoul) | JWT bearer token authentication for FastAPI. [fastapi_auth_jwt_demo](fastapi_auth_jwt_demo/) | 16.0.2.0.0 | [![sbidoul](https://github.com/sbidoul.png?size=30px)](https://github.com/sbidoul) | Test/demo module for fastapi_auth_jwt. [graphql_base](graphql_base/) | 16.0.1.0.1 | [![sbidoul](https://github.com/sbidoul.png?size=30px)](https://github.com/sbidoul) | Base GraphQL/GraphiQL controller diff --git a/extendable_fastapi/README.rst b/extendable_fastapi/README.rst index 478e7906..90f01100 100644 --- a/extendable_fastapi/README.rst +++ b/extendable_fastapi/README.rst @@ -7,7 +7,7 @@ Extendable Fastapi !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:c7b10b63e31f4c8afde11bbc7a51c20c62fbe212b77decaa194dbe6bfd413c55 + !! source digest: sha256:959cc91eecf414d64d236339357d4322403e81584fb614d58d650f238d69fb93 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -39,6 +39,22 @@ models when defining your endpoint handlers request and response models. .. contents:: :local: +Changelog +========= + +16.0.2.1.0 (2023-10-13) +~~~~~~~~~~~~~~~~~~~~~~~ + +**Features** + +- * New base schemas: *PagedCollection*. This schema is used to define the + the structure of a paged collection of resources. This schema is similar + to the ones defined in the Odoo's **fastapi** addon but works as/with + extendable models. + + * The *StrictExtendableBaseModel* has been moved to the *extendable_pydantic* + python lib. You should consider to import it from there. (`#380 `_) + Bug Tracker =========== diff --git a/extendable_fastapi/__manifest__.py b/extendable_fastapi/__manifest__.py index f4b20592..d8a9541b 100644 --- a/extendable_fastapi/__manifest__.py +++ b/extendable_fastapi/__manifest__.py @@ -5,7 +5,7 @@ "name": "Extendable Fastapi", "summary": """ Allows the use of extendable into fastapi apps""", - "version": "16.0.2.0.2", + "version": "16.0.2.1.0", "license": "LGPL-3", "author": "ACSONE SA/NV,Odoo Community Association (OCA)", "maintainers": ["lmignon"], diff --git a/extendable_fastapi/readme/HISTORY.rst b/extendable_fastapi/readme/HISTORY.rst new file mode 100644 index 00000000..0ce674ea --- /dev/null +++ b/extendable_fastapi/readme/HISTORY.rst @@ -0,0 +1,12 @@ +16.0.2.1.0 (2023-10-13) +~~~~~~~~~~~~~~~~~~~~~~~ + +**Features** + +- * New base schemas: *PagedCollection*. This schema is used to define the + the structure of a paged collection of resources. This schema is similar + to the ones defined in the Odoo's **fastapi** addon but works as/with + extendable models. + + * The *StrictExtendableBaseModel* has been moved to the *extendable_pydantic* + python lib. You should consider to import it from there. (`#380 `_) diff --git a/extendable_fastapi/readme/newsfragments/380.feature b/extendable_fastapi/readme/newsfragments/380.feature deleted file mode 100644 index 2397aa7d..00000000 --- a/extendable_fastapi/readme/newsfragments/380.feature +++ /dev/null @@ -1,7 +0,0 @@ -* New base schemas: *PagedCollection*. This schema is used to define the - the structure of a paged collection of resources. This schema is similar - to the ones defined in the Odoo's **fastapi** addon but works as/with - extendable models. - -* The *StrictExtendableBaseModel* has been moved to the *extendable_pydantic* - python lib. You should consider to import it from there. diff --git a/extendable_fastapi/static/description/index.html b/extendable_fastapi/static/description/index.html index bb2c9f1a..b24ad8f4 100644 --- a/extendable_fastapi/static/description/index.html +++ b/extendable_fastapi/static/description/index.html @@ -367,7 +367,7 @@

Extendable Fastapi

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:c7b10b63e31f4c8afde11bbc7a51c20c62fbe212b77decaa194dbe6bfd413c55 +!! source digest: sha256:959cc91eecf414d64d236339357d4322403e81584fb614d58d650f238d69fb93 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

This addon is a technical addon used to allows the use of @@ -378,17 +378,39 @@

Extendable Fastapi

Table of contents

+
+

Changelog

+
+

16.0.2.1.0 (2023-10-13)

+

Features

+
    +
    • +
    • New base schemas: PagedCollection. This schema is used to define the +the structure of a paged collection of resources. This schema is similar +to the ones defined in the Odoo’s fastapi addon but works as/with +extendable models.
    • +
    • The StrictExtendableBaseModel has been moved to the extendable_pydantic +python lib. You should consider to import it from there. (#380)
    • +
    +
  • +
+
-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -396,22 +418,22 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • ACSONE SA/NV
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose diff --git a/fastapi/README.rst b/fastapi/README.rst index e188b26a..4cb09a87 100644 --- a/fastapi/README.rst +++ b/fastapi/README.rst @@ -7,7 +7,7 @@ Odoo FastAPI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:a4887b42c6065cb1ae8928373e674ecc54ef62902bedcfd96d610a51bca363b4 + !! source digest: sha256:74b10695320a638d007194fffad82fd960d70315de5055461bf3ebe5c09283be !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -1193,8 +1193,9 @@ the app is robust and easy to maintain. Here are some of them: * As a corollary of the previous point, a search handler must always use the pagination mechanism with a reasonable default page size. The result list - must be enclosed in a json document that contains the total number of records - and the list of records. + must be enclosed in a json document that contains the count of records into + the system matching your search criteria and the list of records for the given + page and size. * Use plural for the name of a service. For example, if you provide a service that allows you to manage the sale orders, you must use the name 'sale_orders' @@ -1226,7 +1227,7 @@ you be consistent when writing a route handler for a search route. 1. A dependency method to use to specify the pagination parameters in the same way for all the search route handlers: **'odoo.addons.fastapi.paging'**. 2. A PagedCollection pydantic model to use to return the result of a search route - handler enclosed in a json document that contains the total number of records. + handler enclosed in a json document that contains the count of records. .. code-block:: python @@ -1256,7 +1257,7 @@ you be consistent when writing a route handler for a search route. count = env["sale.order"].search_count([]) orders = env["sale.order"].search([], limit=paging.limit, offset=paging.offset) return PagedCollection[SaleOrder]( - total=count, + count=count, items=[SaleOrder.model_validate(order) for order in orders], ) @@ -1464,6 +1465,22 @@ that convert the WSGI request consumed by odoo to a ASGI request. The question is to know if it is also possible to develop the same kind of bridge for the WebSockets and to stream large responses. +Changelog +========= + +16.0.1.2.0 (2023-10-13) +~~~~~~~~~~~~~~~~~~~~~~~ + +**Features** + +- The field *total* in the *PagedCollection* schema is replaced by the field *count*. + The field *total* is now deprecated and will be removed in the next major version. + This change is backward compatible. The json document returned will now + contain both fields *total* and *count* with the same value. In your python + code the field *total*, if used, will fill the field *count* with the same + value. You are encouraged to use the field *count* instead of *total* and adapt + your code accordingly. (`#380 `_) + Bug Tracker =========== diff --git a/fastapi/__manifest__.py b/fastapi/__manifest__.py index 321e60cb..1a6688c9 100644 --- a/fastapi/__manifest__.py +++ b/fastapi/__manifest__.py @@ -5,7 +5,7 @@ "name": "Odoo FastAPI", "summary": """ Odoo FastAPI endpoint""", - "version": "16.0.1.1.2", + "version": "16.0.1.2.0", "license": "LGPL-3", "author": "ACSONE SA/NV,Odoo Community Association (OCA)", "maintainers": ["lmignon"], diff --git a/fastapi/readme/HISTORY.rst b/fastapi/readme/HISTORY.rst new file mode 100644 index 00000000..94e488a5 --- /dev/null +++ b/fastapi/readme/HISTORY.rst @@ -0,0 +1,12 @@ +16.0.1.2.0 (2023-10-13) +~~~~~~~~~~~~~~~~~~~~~~~ + +**Features** + +- The field *total* in the *PagedCollection* schema is replaced by the field *count*. + The field *total* is now deprecated and will be removed in the next major version. + This change is backward compatible. The json document returned will now + contain both fields *total* and *count* with the same value. In your python + code the field *total*, if used, will fill the field *count* with the same + value. You are encouraged to use the field *count* instead of *total* and adapt + your code accordingly. (`#380 `_) diff --git a/fastapi/readme/newsfragments/380.feature b/fastapi/readme/newsfragments/380.feature deleted file mode 100644 index 384c1959..00000000 --- a/fastapi/readme/newsfragments/380.feature +++ /dev/null @@ -1,7 +0,0 @@ -The field *total* in the *PagedCollection* schema is replaced by the field *count*. -The field *total* is now deprecated and will be removed in the next major version. -This change is backward compatible. The json document returned will now -contain both fields *total* and *count* with the same value. In your python -code the field *total*, if used, will fill the field *count* with the same -value. You are encouraged to use the field *count* instead of *total* and adapt -your code accordingly. diff --git a/fastapi/static/description/index.html b/fastapi/static/description/index.html index 2e9b9aa9..884949ef 100644 --- a/fastapi/static/description/index.html +++ b/fastapi/static/description/index.html @@ -367,7 +367,7 @@

Odoo FastAPI

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:a4887b42c6065cb1ae8928373e674ecc54ef62902bedcfd96d610a51bca363b4 +!! source digest: sha256:74b10695320a638d007194fffad82fd960d70315de5055461bf3ebe5c09283be !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

This addon provides the basis to smoothly integrate the FastAPI @@ -431,11 +431,15 @@

Odoo FastAPI

  • Known issues / Roadmap
  • -
  • Bug Tracker
  • -
  • Credits @@ -1448,8 +1452,9 @@

    Overall considerations when you a reasonable number of records by default.

  • As a corollary of the previous point, a search handler must always use the pagination mechanism with a reasonable default page size. The result list -must be enclosed in a json document that contains the total number of records -and the list of records.
  • +must be enclosed in a json document that contains the count of records into +the system matching your search criteria and the list of records for the given +page and size.
  • Use plural for the name of a service. For example, if you provide a service that allows you to manage the sale orders, you must use the name ‘sale_orders’ and not ‘sale_order’.
  • @@ -1475,7 +1480,7 @@

    Development of a search route ha
  • A dependency method to use to specify the pagination parameters in the same way for all the search route handlers: ‘odoo.addons.fastapi.paging’.
  • A PagedCollection pydantic model to use to return the result of a search route -handler enclosed in a json document that contains the total number of records.
  • +handler enclosed in a json document that contains the count of records.
     from typing import Annotated
    @@ -1504,7 +1509,7 @@ 

    Development of a search route ha count = env["sale.order"].search_count([]) orders = env["sale.order"].search([], limit=paging.limit, offset=paging.offset) return PagedCollection[SaleOrder]( - total=count, + count=count, items=[SaleOrder.model_validate(order) for order in orders], )

    @@ -1691,8 +1696,24 @@

    Known issues / Roadmap

    is to know if it is also possible to develop the same kind of bridge for the WebSockets and to stream large responses.

    +
    +

    Changelog

    +
    +

    16.0.1.2.0 (2023-10-13)

    +

    Features

    +
      +
    • The field total in the PagedCollection schema is replaced by the field count. +The field total is now deprecated and will be removed in the next major version. +This change is backward compatible. The json document returned will now +contain both fields total and count with the same value. In your python +code the field total, if used, will fill the field count with the same +value. You are encouraged to use the field count instead of total and adapt +your code accordingly. (#380)
    • +
    +
    +
    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -1700,21 +1721,21 @@

    Bug Tracker

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • ACSONE SA/NV
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association

    OCA, or the Odoo Community Association, is a nonprofit organization whose