@@ -21,13 +21,13 @@ Base Rest
2121 :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
2222 :alt: License: LGPL-3
2323.. |badge3 | image :: https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github
24- :target: https://github.com/OCA/rest-framework/tree/18 .0/base_rest
24+ :target: https://github.com/OCA/rest-framework/tree/19 .0/base_rest
2525 :alt: OCA/rest-framework
2626.. |badge4 | image :: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27- :target: https://translation.odoo-community.org/projects/rest-framework-18 -0/rest-framework-18 -0-base_rest
27+ :target: https://translation.odoo-community.org/projects/rest-framework-19 -0/rest-framework-19 -0-base_rest
2828 :alt: Translate me on Weblate
2929.. |badge5 | image :: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30- :target: https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=18 .0
30+ :target: https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=19 .0
3131 :alt: Try me on Runboat
3232
3333|badge1 | |badge2 | |badge3 | |badge4 | |badge5 |
8989
9090To add your own REST service you must provides at least 2 classes.
9191
92- - A Component providing the business logic of your service,
93- - A Controller to register your service.
92+ - A Component providing the business logic of your service,
93+ - A Controller to register your service.
9494
9595The business logic of your service must be implemented into a component
9696(``odoo.addons.component.core.Component ``) that inherit from
@@ -99,22 +99,22 @@ The business logic of your service must be implemented into a component
9999Initially, base_rest expose by default all public methods defined in a
100100service. The conventions for accessing methods via HTTP were as follows:
101101
102- - The method ``def get(self, _id) `` if defined, is accessible via HTTP
103- GET routes ``<string:_service_name>/<int:_id> `` and
104- ``<string:_service_name>/<int:_id>/get ``.
105- - The method ``def search(self, **params) `` if defined, is accessible
106- via the HTTP GET routes ``<string:_service_name>/ `` and
107- ``<string:_service_name>/search ``.
108- - The method ``def delete(self, _id) `` if defined, is accessible via the
109- HTTP DELETE route ``<string:_service_name>/<int:_id> ``.
110- - The ``def update(self, _id, **params) `` method, if defined, is
111- accessible via the HTTP PUT route
112- ``<string:_service_name>/<int:_id> ``.
113- - Other methods are only accessible via HTTP POST routes
114- ``<string:_service_name> `` or
115- ``<string:_service_name>/<string:method_name> `` or
116- ``<string:_service_name>/<int:_id> `` or
117- ``<string:_service_name>/<int:_id>/<string:method_name> ``
102+ - The method ``def get(self, _id) `` if defined, is accessible via HTTP
103+ GET routes ``<string:_service_name>/<int:_id> `` and
104+ ``<string:_service_name>/<int:_id>/get ``.
105+ - The method ``def search(self, **params) `` if defined, is accessible
106+ via the HTTP GET routes ``<string:_service_name>/ `` and
107+ ``<string:_service_name>/search ``.
108+ - The method ``def delete(self, _id) `` if defined, is accessible via
109+ the HTTP DELETE route ``<string:_service_name>/<int:_id> ``.
110+ - The ``def update(self, _id, **params) `` method, if defined, is
111+ accessible via the HTTP PUT route
112+ ``<string:_service_name>/<int:_id> ``.
113+ - Other methods are only accessible via HTTP POST routes
114+ ``<string:_service_name> `` or
115+ ``<string:_service_name>/<string:method_name> `` or
116+ ``<string:_service_name>/<int:_id> `` or
117+ ``<string:_service_name>/<int:_id>/<string:method_name> ``
118118
119119.. code :: python
120120
@@ -231,10 +231,10 @@ schemas <https://docs.python-cerberus.org/en/stable/>`__ and associated
231231to the methods using the following naming convention. For a method
232232\` my_method\` :
233233
234- - ``def _validator_my_method(self): `` will be called to get the schema
235- required to validate the input parameters.
236- - ``def _validator_return_my_method(self): `` if defined, will be called
237- to get the schema used to validate the response.
234+ - ``def _validator_my_method(self): `` will be called to get the schema
235+ required to validate the input parameters.
236+ - ``def _validator_return_my_method(self): `` if defined, will be called
237+ to get the schema used to validate the response.
238238
239239In order to offer even more flexibility, a new API has been developed.
240240
@@ -363,32 +363,33 @@ Changelog
363363
364364**Features **
365365
366- - Add support for oauth2 security scheme in the Swagger UI. If your
367- openapi specification contains a security scheme of type oauth2, the
368- Swagger UI will display a login button in the top right corner. In
369- order to finalize the login process, a redirect URL must be provided
370- when initializing the Swagger UI. The Swagger UI is now initialized
371- with a oauth2RedirectUrl option that references a oauth2-redirect.html
372- file provided by the swagger-ui lib and served by the current addon.
373- (`#379 <https://github.com/OCA/rest-framework/issues/379 >`__)
366+ - Add support for oauth2 security scheme in the Swagger UI. If your
367+ openapi specification contains a security scheme of type oauth2, the
368+ Swagger UI will display a login button in the top right corner. In
369+ order to finalize the login process, a redirect URL must be provided
370+ when initializing the Swagger UI. The Swagger UI is now initialized
371+ with a oauth2RedirectUrl option that references a
372+ oauth2-redirect.html file provided by the swagger-ui lib and served
373+ by the current addon.
374+ (`#379 <https://github.com/OCA/rest-framework/issues/379 >`__)
374375
37537612.0.2.0.1
376377----------
377378
378- - validator\_ ...() methods can now return a cerberus ``Validator ``
379- object instead of a schema dictionnary, for additional flexibility
380- (e.g. allowing validator options such as ``allow_unknown ``).
379+ - validator\_ ...() methods can now return a cerberus ``Validator ``
380+ object instead of a schema dictionnary, for additional flexibility
381+ (e.g. allowing validator options such as ``allow_unknown ``).
381382
38238312.0.2.0.0
383384----------
384385
385- - Licence changed from AGPL-3 to LGPL-3
386+ - Licence changed from AGPL-3 to LGPL-3
386387
38738812.0.1.0.1
388389----------
389390
390- - Fix issue when rendering the jsonapi documentation if no documentation
391- is provided on a method part of the REST api.
391+ - Fix issue when rendering the jsonapi documentation if no
392+ documentation is provided on a method part of the REST api.
392393
39339412.0.1.0.0
394395----------
@@ -404,7 +405,7 @@ Bug Tracker
404405Bugs are tracked on `GitHub Issues <https://github.com/OCA/rest-framework/issues >`_.
405406In case of trouble, please check there if your issue has already been reported.
406407If you spotted it first, help us to smash it by providing a detailed and welcomed
407- `feedback <https://github.com/OCA/rest-framework/issues/new?body=module:%20base_rest%0Aversion:%2018 .0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior** >`_.
408+ `feedback <https://github.com/OCA/rest-framework/issues/new?body=module:%20base_rest%0Aversion:%2019 .0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior** >`_.
408409
409410Do not contact contributors directly about support or help with technical issues.
410411
@@ -419,8 +420,8 @@ Authors
419420Contributors
420421------------
421422
422- - Laurent Mignon <laurent.mignon@acsone.eu>
423- - Sébastien Beau <sebastien.beau@akretion.com>
423+ - Laurent Mignon <laurent.mignon@acsone.eu>
424+ - Sébastien Beau <sebastien.beau@akretion.com>
424425
425426Maintainers
426427-----------
@@ -435,6 +436,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
435436mission is to support the collaborative development of Odoo features and
436437promote its widespread use.
437438
438- This module is part of the `OCA/rest-framework <https://github.com/OCA/rest-framework/tree/18 .0/base_rest >`_ project on GitHub.
439+ This module is part of the `OCA/rest-framework <https://github.com/OCA/rest-framework/tree/19 .0/base_rest >`_ project on GitHub.
439440
440441You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
0 commit comments