llama-stack-mirror/docs/openapi_generator
Ashwin Bharambe 0d96070af9
Update OpenAPI generator to add param and field documentation (#896)
We desperately need to document our APIs. This is the basic requirement
of having a Spec :)

This PR updates the OpenAPI generator so documentation for request
parameters and object fields can be properly added to the OpenAPI specs.
From there, this should get picked by Stainless, etc.

## Test Plan:

Updated client-sdk (See
https://github.com/meta-llama/llama-stack-client-python/pull/104) and
then ran:

```bash
cd tests/client-sdk
LLAMA_STACK_CONFIG=../../llama_stack/templates/fireworks/run.yaml pytest -s -v inference/test_inference.py agents/test_agents.py
```
2025-01-29 10:04:30 -08:00
..
pyopenapi Update OpenAPI generator to add param and field documentation (#896) 2025-01-29 10:04:30 -08:00
strong_typing Update OpenAPI generator to add param and field documentation (#896) 2025-01-29 10:04:30 -08:00
generate.py Update OpenAPI generator to add param and field documentation (#896) 2025-01-29 10:04:30 -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>