Commit f6419cc
authored
feat: add top-level description field to OAS (#268)
#### Description of changes
Added a description field to `RuntimeConfig` with a default of `""`, and
set a kwarg in the `FastAPI()` constructor called in
`runtime.serve.create_restapi()` of `description=config.description`.
This inserts the Tesseract description from `tesseract_config.yaml`,
already present as an environment variable `TESSERACT_DESCRIPTION` in
built Tesseract containers, into the top-level of the OpenAPI
Specification.
#### To do
- [x] Investigate why newline characters appear to have their
backslashes escaped in the description field
#### Testing done
Manually tested.
<img width="1920" height="511" alt="image"
src="https://github.com/user-attachments/assets/984e2d7f-d030-4ce8-8725-91995b4b8fad"
/>
<img width="1898" height="519" alt="image"
src="https://github.com/user-attachments/assets/8b55356e-c591-4504-9a0d-42d697a55ae1"
/>1 parent cdadc25 commit f6419cc
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments