Commit 95899ac
[ENH] Add OpenAPI spec to Rust server (chroma-core#3815)
## Description of changes
- Improvements & Bug fixes
- Updates `axum` to `0.8`
- New functionality
- Adds `/openapi.json` route that renders an OpenAPI spec
- Adds `/docs/` route that renders Swagger
- Adds code generation of OpenAPI spec with
[`utoipa`](https://github.com/juhaku/utoipa)
- Standardizes path params to be `tenant` (*not tenant_id*) and
`database` (*not database_name*)
Here's a video demo of how it works:
https://github.com/user-attachments/assets/e66d9fc0-8b8b-408f-8b3a-2e975646edf3
Notes:
* The routes and basic functionality mirror current Python functionality
(see: https://api.trychroma.com:8000/docs)
* OpenAPI spec is substantially improved, including: typed errors, typed
responses, security headers1 parent 33fc578 commit 95899ac
File tree
11 files changed
+859
-227
lines changed- rust
- frontend
- src
- types
- python_bindings/src
- types
- src
11 files changed
+859
-227
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
0 commit comments