llama-stack/docs/openapi_generator
Dinesh Yeduguru 7fb2c1c48d
More idiomatic REST API (#765)
# What does this PR do?

This PR changes our API to follow more idiomatic REST API approaches of
having paths being resources and methods indicating the action being
performed.

Changes made to generator:
1) removed the prefix check of "get" as its not required and is actually
needed for other method types too
2) removed _ check on path since variables can have "_"



## Test Plan

LLAMA_STACK_BASE_URL=http://localhost:5000 pytest -v
tests/client-sdk/agents/test_agents.py
2025-01-15 13:20:09 -08:00
..
pyopenapi More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
strong_typing llama-stack version alpha -> v1 2025-01-15 05:58:09 -08:00
generate.py Update the "InterleavedTextMedia" type (#635) 2024-12-17 11:18:31 -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>