fix: openapi docs authorization
Add HTTPBearer Authorization to OpenAPI docs.
- [x] id_token authorization for all protected endpoints.
- [x] api_key authorization for app integration endpoints.
1/ does your changes compatible with the current backend functionalities ? 2/ could you re-base with the main branch ?
@theedigerati
1/ does your changes compatible with the current backend functionalities ? 2/ could you re-base with the main branch ?
@theedigerati
Yes, the changes are compatible with the current backend functionalities.
Code changes:
- A handler (from FastAPI) for authorization headers . This is needed because OpenAPI 3 spec does not allow authorization headers be passed directly to endpoints in the docs
- Edits on the integration endpoints for api_key extraction from authorization header.
man @theedigerati
just a gentle reminder, you PR is a bit dirty haha. please clean it by reducing the unnecessary changes. (as 2/)
then just share me a bit about your tests (follow up with 1/)
@aaravgarg could you help with following up on this ticket, feel free to ask for a merge if you think everything looks good.
man @theedigerati
just a gentle reminder, you PR is a bit dirty haha. please clean it by reducing the unnecessary changes. (as 2/)
then just share me a bit about your tests (follow up with 1/)
Hello @beastoin,
I realised that my default editor formatting obscured the important changes, along with some edits I had intended as improvements. My apologies.
For testing, I used the Swagger docs to try out all the integration endpoints, as well as the ones for creating and enabling an app. Everything worked as expected, which covered the areas where I made changes.
Just curious — is there any particular reason there's no formatter or test suite set up for the Python codebase?
cool man, lets us verify it a bit then will let you know / @mdmohsin7 could you please help on testing it :)
Closing due to inactivity @theedigerati, pls feel free to open it again when you push the fixes