mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 04:00:42 +00:00
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>
This commit is contained in:
parent
d4aa348b60
commit
44e36ce48d
15 changed files with 71155 additions and 29137 deletions
|
|
@ -1,8 +1,8 @@
|
|||
These are the source-of-truth configuration files used to generate the Stainless client SDKs via Stainless.
|
||||
|
||||
- `openapi.yml`: this is the OpenAPI specification for the Llama Stack API.
|
||||
- `openapi.json`: this is the OpenAPI specification for the Llama Stack API (JSON format).
|
||||
- `openapi.stainless.yml`: this is the Stainless _configuration_ which instructs Stainless how to generate the client SDKs.
|
||||
|
||||
A small side note: notice the `.yml` suffixes since Stainless uses that suffix typically for its configuration files.
|
||||
A small side note: the OpenAPI spec uses `.json` format, while the Stainless configuration uses `.yml` suffix since Stainless uses that suffix typically for its configuration files.
|
||||
|
||||
These files go hand-in-hand. As of now, only the `openapi.yml` file is automatically generated using the `run_openapi_generator.sh` script.
|
||||
These files go hand-in-hand. As of now, only the `openapi.json` file is automatically generated using the `run_openapi_generator.sh` script.
|
||||
|
|
|
|||
18706
client-sdks/stainless/openapi.json
Normal file
18706
client-sdks/stainless/openapi.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue