forked from OCA/rest-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ef25cf
commit db8104d
Showing
22 changed files
with
3,536 additions
and
3,367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Laurent Mignon \<<laurent.mignon@acsone.eu>\> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
This addon provides the basis to smoothly integrate the | ||
[FastAPI](https://fastapi.tiangolo.com/) framework into Odoo. | ||
|
||
This integration allows you to use all the goodies from | ||
[FastAPI](https://fastapi.tiangolo.com/) to build custom APIs for your | ||
Odoo server based on standard Python type hints. | ||
|
||
**What is building an API?** | ||
|
||
An API is a set of functions that can be called from the outside world. | ||
The goal of an API is to provide a way to interact with your application | ||
from the outside world without having to know how it works internally. A | ||
common mistake when you are building an API is to expose all the | ||
internal functions of your application and therefore create a tight | ||
coupling between the outside world and your internal datamodel and | ||
business logic. This is not a good idea because it makes it very hard to | ||
change your internal datamodel and business logic without breaking the | ||
outside world. | ||
|
||
When you are building an API, you define a contract between the outside | ||
world and your application. This contract is defined by the functions | ||
that you expose and the parameters that you accept. This contract is the | ||
API. When you change your internal datamodel and business logic, you can | ||
still keep the same API contract and therefore you don't break the | ||
outside world. Even if you change your implementation, as long as you | ||
keep the same API contract, the outside world will still work. This is | ||
the beauty of an API and this is why it is so important to design a good | ||
API. | ||
|
||
A good API is designed to be stable and to be easy to use. It's designed | ||
to provide high-level functions related to a specific use case. It's | ||
designed to be easy to use by hiding the complexity of the internal | ||
datamodel and business logic. A common mistake when you are building an | ||
API is to expose all the internal functions of your application and let | ||
the oustide world deal with the complexity of your internal datamodel | ||
and business logic. Don't forget that on a transactional point of view, | ||
each call to an API function is a transaction. This means that if a | ||
specific use case requires multiple calls to your API, you should | ||
provide a single function that does all the work in a single | ||
transaction. This why APIs methods are called high-level and atomic | ||
functions. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## 16.0.1.2.3 (2023-12-21) | ||
|
||
**Bugfixes** | ||
|
||
- In case of exception in endpoint execution, close the database cursor | ||
after rollback. | ||
|
||
This is to ensure that the *retrying* method in *service/model.py* | ||
does not try to flush data to the database. | ||
([\#405](https://github.com/OCA/rest-framework/issues/405)) | ||
|
||
## 16.0.1.2.2 (2023-12-12) | ||
|
||
**Bugfixes** | ||
|
||
- When using the 'FastAPITransactionCase' class, allows to specify a | ||
specific override of the 'authenticated_partner_impl' method into the | ||
list of overrides to apply. Before this change, the | ||
'authenticated_partner_impl' override given in the 'overrides' | ||
parameter was always overridden in the '\_create_test_client' method | ||
of the 'FastAPITransactionCase' class. It's now only overridden if the | ||
'authenticated_partner_impl' method is not already present in the list | ||
of overrides to apply and no specific partner is given. If a specific | ||
partner is given at same time of an override for the | ||
'authenticated_partner_impl' method, an error is raised. | ||
([\#396](https://github.com/OCA/rest-framework/issues/396)) | ||
|
||
## 16.0.1.2.1 (2023-11-03) | ||
|
||
**Bugfixes** | ||
|
||
- Fix a typo in the Field declaration of the 'count' attribute of the | ||
'PagedCollection' schema. | ||
|
||
Misspelt parameter was triggering a deprecation warning due to recent | ||
versions of Pydantic seeing it as an arbitrary parameter. | ||
([\#389](https://github.com/OCA/rest-framework/issues/389)) | ||
|
||
## 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](https://github.com/OCA/rest-framework/issues/380)) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
The | ||
[roadmap](https://github.com/OCA/rest-framework/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement+label%3Afastapi) | ||
and [known | ||
issues](https://github.com/OCA/rest-framework/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Afastapi) | ||
can be found on GitHub. | ||
|
||
The **FastAPI** module provides an easy way to use WebSockets. | ||
Unfortunately, this support is not 'yet' available in the **Odoo** | ||
framework. The challenge is high because the integration of the fastapi | ||
is based on the use of a specific middleware 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. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.