Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 28 additions & 23 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ on:
branches: [ main ]
types: [opened, synchronize, reopened, edited]
paths:
- 'docs/static/llama-stack-spec.yaml' # Legacy monolithic spec
- 'docs/static/stable-llama-stack-spec.yaml' # Stable APIs spec
- 'docs/static/experimental-llama-stack-spec.yaml' # Experimental APIs spec
- 'docs/static/deprecated-llama-stack-spec.yaml' # Deprecated APIs spec
- 'docs/static/llama-stack-spec.json' # Legacy monolithic spec
- 'docs/static/stable-llama-stack-spec.json' # Stable APIs spec
- 'docs/static/experimental-llama-stack-spec.json' # Experimental APIs spec
- 'docs/static/deprecated-llama-stack-spec.json' # Deprecated APIs spec
- '.github/workflows/conformance.yml' # This workflow itself

concurrency:
Expand Down Expand Up @@ -87,40 +87,45 @@ jobs:
sudo cp ~/oasdiff /usr/local/bin/oasdiff
sudo chmod +x /usr/local/bin/oasdiff

# Install yq for YAML processing
- name: Install yq
run: |
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq

# Verify API specs exist for conformance testing
- name: Check API Specs
if: steps.skip-check.outputs.skip != 'true'
run: |
echo "Checking for API specification files..."

# Check current branch
if [ -f "docs/static/stable-llama-stack-spec.yaml" ]; then
if [ -f "docs/static/stable-llama-stack-spec.json" ]; then
echo "✓ Found stable API spec in current branch"
CURRENT_SPEC="docs/static/stable-llama-stack-spec.yaml"
elif [ -f "docs/static/llama-stack-spec.yaml" ]; then
CURRENT_SPEC="docs/static/stable-llama-stack-spec.json"
elif [ -f "docs/static/llama-stack-spec.json" ]; then
echo "✓ Found monolithic API spec in current branch"
CURRENT_SPEC="docs/static/llama-stack-spec.yaml"
CURRENT_SPEC="docs/static/llama-stack-spec.json"
else
echo "❌ No API specs found in current branch"
exit 1
fi

# Check base branch
if [ -f "base/docs/static/stable-llama-stack-spec.yaml" ]; then
echo "✓ Found stable API spec in base branch"
BASE_SPEC="base/docs/static/stable-llama-stack-spec.yaml"
elif [ -f "base/docs/static/llama-stack-spec.yaml" ]; then
echo "✓ Found monolithic API spec in base branch"
BASE_SPEC="base/docs/static/llama-stack-spec.yaml"

# Handles old YAML specs
# TODO: remove this once the JSON specs are merged
if [ -f "docs/static/stable-llama-stack-spec.yaml" ]; then
echo "✓ Found legacy YAML format stable API spec in current branch"
BASE_SPEC="docs/static/stable-llama-stack-spec.yaml"
elif [ -f "docs/static/llama-stack-spec.yaml" ]; then
echo "✓ Found legacy YAML format monolithic API spec in current branch"
BASE_SPEC="docs/static/llama-stack-spec.yaml"
else
echo "❌ No API specs found in base branch"
exit 1
echo "No legacy YAML format API specs found in current branch, trying JSON specs"
if [ -f "base/docs/static/stable-llama-stack-spec.json" ]; then
echo "✓ Found stable API spec in base branch"
BASE_SPEC="base/docs/static/stable-llama-stack-spec.json"
elif [ -f "base/docs/static/llama-stack-spec.json" ]; then
echo "✓ Found monolithic API spec in base branch"
BASE_SPEC="base/docs/static/llama-stack-spec.json"
else
echo "❌ No API specs found in base branch"
exit 1
fi
fi

# Export for next step
Expand Down
6 changes: 3 additions & 3 deletions client-sdks/stainless/README.md
Original file line number Diff line number Diff line change
@@ -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.
Loading
Loading