llama-stack-mirror/docs/openapi_generator
Sébastien Han 44e36ce48d
chore: use JSON instead of YAML for openapi generation
JSON has a few advantages over YAML in this context:

* No extra dependency: Removed ruamel.yaml; using the standard library
  json module.
* Simpler code: No YAML formatting configuration (indent, flow style,
  string presentation, etc.). JSON serialization is straightforward.
* Faster generation: JSON serialization is typically faster and more
  predictable than YAML formatting.
* Native OpenAPI format: JSON is the native OpenAPI format. Many tools
  prefer JSON, reducing potential compatibility issues.
* Better tooling support: JSON is widely supported. Tools like oasdiff,
  OpenAPI validators, and code generators work well with JSON.
* Fewer formatting edge cases: YAML can have edge cases (multiline
  strings, special characters, quoting, scalars etc). JSON avoids these.

All the tools consumming the YAMLs have been updated namely oasdiff for
conformance tests, docusaurus config and the genrator.

Signed-off-by: Sébastien Han <seb@redhat.com>
2025-11-03 18:05:48 +01:00
..
pyopenapi revert: "chore(cleanup)!: remove tool_runtime.rag_tool" (#3877) 2025-10-21 11:22:06 -07:00
generate.py chore: use JSON instead of YAML for openapi generation 2025-11-03 18:05:48 +01:00
README.md chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
run_openapi_generator.sh chore: use JSON instead of YAML for openapi generation 2025-11-03 18:05:48 +01:00

The RFC Specification (OpenAPI format) is generated from the set of API endpoints located in llama_stack.core/server/endpoints.py using the generate.py utility.