-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Feature/openapi #4710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/openapi #4710
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR enhances OpenAPI functionality and API documentation across the Onyx codebase, focusing on standardizing endpoint naming and schema generation.
- Added new script
backend/scripts/onyx_openapi_schema.py
to generate OpenAPI schema without starting the web server - Introduced
use_route_function_names_as_operation_ids
inbackend/onyx/main.py
to simplify OpenAPI operation IDs - Renamed API functions across multiple files for better clarity (e.g.,
put_settings
toadmin_ee_put_settings
) - Added
/generated
directory with README and updated.gitignore
to exclude generated files - Added explicit FastAPI type hints in test files for improved type safety
12 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
// First check if provider name directly matches an icon | ||
if (providerName.toLowerCase() in iconMap) { | ||
return iconMap[providerName.toLowerCase()]; | ||
const lowerProviderName = providerName.toLowerCase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like it could be slightly simpler
selectedFiles.map((file) => file.id), | ||
selectedFolders.map((folder) => folder.id) | ||
selectedFiles.map((file) => file.id) | ||
// selectedFolders.map((folder) => folder.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove
* starting openapi support * fix app / app_fn * send gitignore * dedupe function names * add readme * modify gitignore * update launch template * fix unused path param * fix mypy * local tests pass * first pass at making integration tests work * fixes * fix script path * set python path * try full path * fix output dir * fix integration test * more build fixes * add generated directory * use the config * add a comment * add * modify tsconfig.json * fix index linting bugs * tons of lint fixes * new gitignore * remove generated dir * add tasks template * check for undefined explicitly * fix hooks.ts * refactor destructureValue * improve readme --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
* starting openapi support * fix app / app_fn * send gitignore * dedupe function names * add readme * modify gitignore * update launch template * fix unused path param * fix mypy * local tests pass * first pass at making integration tests work * fixes * fix script path * set python path * try full path * fix output dir * fix integration test * more build fixes * add generated directory * use the config * add a comment * add * modify tsconfig.json * fix index linting bugs * tons of lint fixes * new gitignore * remove generated dir * add tasks template * check for undefined explicitly * fix hooks.ts * refactor destructureValue * improve readme --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
* starting openapi support * fix app / app_fn * send gitignore * dedupe function names * add readme * modify gitignore * update launch template * fix unused path param * fix mypy * local tests pass * first pass at making integration tests work * fixes * fix script path * set python path * try full path * fix output dir * fix integration test * more build fixes * add generated directory * use the config * add a comment * add * modify tsconfig.json * fix index linting bugs * tons of lint fixes * new gitignore * remove generated dir * add tasks template * check for undefined explicitly * fix hooks.ts * refactor destructureValue * improve readme --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
* starting openapi support * fix app / app_fn * send gitignore * dedupe function names * add readme * modify gitignore * update launch template * fix unused path param * fix mypy * local tests pass * first pass at making integration tests work * fixes * fix script path * set python path * try full path * fix output dir * fix integration test * more build fixes * add generated directory * use the config * add a comment * add * modify tsconfig.json * fix index linting bugs * tons of lint fixes * new gitignore * remove generated dir * add tasks template * check for undefined explicitly * fix hooks.ts * refactor destructureValue * improve readme --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
Description
Fixes https://linear.app/danswer/issue/DAN-166/build-frontend-models-based-on-fastapi-autogenerated-openapi-docs
Part 1.
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.