File tree Expand file tree Collapse file tree 5 files changed +7
-8
lines changed
base_rest_auth_api_key/static/description Expand file tree Collapse file tree 5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 11exclude : |
22 (?x)
33 # NOT INSTALLABLE ADDONS
4- ^extendable /|
4+ ^fastapi_auth_jwt_demo /|
55 # END NOT INSTALLABLE ADDONS
66 # Files and folders generated by bots, to avoid loops
77 ^setup/|/static/description/index\.html$|
Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ <h1>Base Rest Auth Api Key</h1>
374374!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375!! source digest: sha256:7c57ea5f8972ccd3fd126f96da0ff252203ec8d51cb0a1f2e4a1b101e730d838
376376!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377- < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Beta " src ="https://img.shields.io/badge/maturity-Beta-yellow.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/license-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/rest-framework/tree/18.0/base_rest_auth_api_key "> < img alt ="OCA/rest-framework " src ="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/rest-framework-18-0/rest-framework-18-0-base_rest_auth_api_key "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=18.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
377+ < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Beta " src ="https://img.shields.io/badge/maturity-Beta-yellow.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/licence-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/rest-framework/tree/18.0/base_rest_auth_api_key "> < img alt ="OCA/rest-framework " src ="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/rest-framework-18-0/rest-framework-18-0-base_rest_auth_api_key "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=18.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
378378< p > This technical addon extend base_rest to add the support for
379379auth_api_key authentication mechanism into the generated openapi
380380documentation.</ p >
Original file line number Diff line number Diff line change 33
44from contextlib import contextmanager
55
6- import odoo
76from odoo import SUPERUSER_ID , api
87from odoo .modules .registry import Registry
98from odoo .tests import common
Original file line number Diff line number Diff line change 99
1010
1111class FastapiEndpoint (models .Model ):
12-
1312 _inherit = "fastapi.endpoint"
1413
1514 app : str = fields .Selection (
Original file line number Diff line number Diff line change 11# Copyright 2023 ACSONE SA/NV
22# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
33
4- from typing import Annotated , Union
4+ from typing import Annotated
5+
6+ from pydantic import BaseModel
57
68from odoo .addons .base .models .res_partner import Partner
79from odoo .addons .fastapi_auth_jwt .dependencies import AuthJwtPartner
810
911from fastapi import APIRouter , Depends
10- from pydantic import BaseModel
1112
1213
1314class TestData (BaseModel ):
14- name : Union [ str , None ] = None
15- email : Union [ str , None ] = None
15+ name : str | None = None
16+ email : str | None = None
1617 uid : int
1718
1819
You can’t perform that action at this time.
0 commit comments