llama-stack-mirror/docs/openapi_generator
Ashwin Bharambe 2e5bfcd42a
Update Telemetry API so OpenAPI generation can work (#640)
We cannot use recursive types because not only does our OpenAPI
generator not like them, even if it did, it is not easy for all client
languages to automatically construct proper APIs (especially considering
garbage collection) around them. For now, we can return a `Dict[str,
SpanWithStatus]` instead of `SpanWithChildren` and rely on the client to
reconstruct the tree.

Also fixed a super subtle issue with the OpenAPI generation process
(monkey-patching of json_schema_type wasn't working because of import
reordering.)
2024-12-16 13:00:14 -08:00
..
pyopenapi [docs] add openapi spec to docs (#508) 2024-11-22 17:54:32 -08:00
strong_typing Fix openapi generator and regenerator OpenAPI types 2024-11-11 18:44:38 -08:00
generate.py Update Telemetry API so OpenAPI generation can work (#640) 2024-12-16 13:00:14 -08:00
README.md move openapi from rfcs->docs 2024-09-18 16:09:17 -07:00
run_openapi_generator.sh [API Updates] Model / shield / memory-bank routing + agent persistence + support for private headers (#92) 2024-09-23 14:22:22 -07:00

The RFC Specification (OpenAPI format) is generated from the set of API endpoints located in llama_stack/[<subdir>]/api/endpoints.py using the generate.py utility.

Please install the following packages before running the script:

pip install python-openapi json-strong-typing fire PyYAML llama-models

Then simply run sh run_openapi_generator.sh <OUTPUT_DIR>