Skip to content

[17.0][FW][IMP] fastapi: expose FastAPI docs only if field is set - #678

Open
chaule97 wants to merge 1 commit into
OCA:17.0from
chaule97:17.0-fw-fastapi-expose-docs
Open

chaule97 wants to merge 1 commit into
OCA:17.0from
chaule97:17.0-fw-fastapi-expose-docs

Conversation

@chaule97

Copy link
Copy Markdown

Forward port of #537 from 16.0.

Right now the FastAPI documentation endpoints (Swagger, Redoc, OpenAPI) of every endpoint can be reached by anyone. Some deployments don't need them, and some aren't allowed to expose them.

This PR adds an Expose FastAPI docs checkbox (expose_doc_urls) to the FastAPI endpoint form. When it is unticked,
docs_url, redoc_url and openapi_url are set to None on the FastAPI app, so those routes return 404. Changing the field rebuilds the app.

@oca-cla-bot

oca-cla-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @lmignon,
some modules you are maintaining are being modified, check this out!

@chaule97
chaule97 force-pushed the 17.0-fw-fastapi-expose-docs branch 2 times, most recently from 8c4f902 to bae021e Compare October 26, 2026 07:30
@chaule97

Copy link
Copy Markdown
Author

Hi @PicchiSeba, this is a forward port of your #537 to 17.0. The OCA CLA bot reports that picchiseba+git@gmail.com is not covered by a CLA. Could you sign it (or add this email to your existing CLA) at https://odoo-community.org/cla? Thanks!

@PicchiSeba

Copy link
Copy Markdown
Contributor

@chaule97
I'm unable to sign because the page says the following

For 1 commits across 1 repositories with email address picchiseba@gmail.com.

Cannot proceed, picchiseba@gmail.com is not verified with GitHub. Please complete verification and return here to sign.

Which points me to the docs https://docs.github.com/en/account-and-profile/how-tos/email-preferences/verifying-your-email-address

But my email is verified
image

I think the underlying issue is the fact that my GH email is
picchiseba**+git**@gmail.com

and not picchiseba@gmail.com as it's stated in the CLA page.

I will try to contact the OCA administrators to fix this

@chaule97
chaule97 force-pushed the 17.0-fw-fastapi-expose-docs branch from bae021e to 10d2f84 Compare October 26, 2026 09:23
@chaule97

Copy link
Copy Markdown
Author

Hi @PicchiSeba, I have updated the author's email to picchiseba@gmail.com. is this okay?

@PicchiSeba PicchiSeba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: LGTM

@PicchiSeba

PicchiSeba commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

@chaule97

Hi @PicchiSeba, I have updated the author's email to picchiseba@gmail.com. is this okay?

I have workflows setup with my email depending on the value after the "+" character and I can't easily change them rn. I wrote to the administrators to see if we can find a solution.
If it's not a problem I would ask you to wait until they answer me. But if in a week the issue is still not resolved, this weekend I'll update my email and verify the CLA with it

@chaule97
chaule97 force-pushed the 17.0-fw-fastapi-expose-docs branch from 10d2f84 to 3836057 Compare October 26, 2026 09:44
@PicchiSeba

PicchiSeba commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

@chaule97
I applied a temporary fix by submitting the CLA with my company email.
You can re-commit provided you replace the email starting with "picchiseba" with sebastiano.picchi@pytech.it.

I don't want to keep us both waiting

@chaule97
chaule97 force-pushed the 17.0-fw-fastapi-expose-docs branch from 3836057 to 63452e1 Compare October 27, 2026 02:00
@chaule97

Copy link
Copy Markdown
Author

@chaule97 I applied a temporary fix by submitting the CLA with my company email. You can re-commit provided you replace the email starting with "picchiseba" with sebastiano.picchi@pytech.it.

I don't want to keep us both waiting

Thanks @PicchiSeba , it worked. Please review both version 18.0 and 19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants