chore: re-add deprecated routes to the combined spec

Matches https://github.com/llamastack/llama-stack/pull/4156

Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han 2025-11-14 10:05:49 +01:00
parent 2a257dbdea
commit bb34f7a4d4
No known key found for this signature in database
6 changed files with 676 additions and 20 deletions

View file

@ -276,7 +276,7 @@ def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]:
def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]:
"""
Filter OpenAPI schema to include both stable (v1) and experimental (v1alpha, v1beta) APIs.
Excludes deprecated endpoints. This is used for the combined "stainless" spec.
Includes deprecated endpoints. This is used for the combined "stainless" spec.
"""
filtered_schema = openapi_schema.copy()
@ -299,10 +299,6 @@ def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]:
if not isinstance(operation, dict):
continue
# Skip deprecated operations
if operation.get("deprecated", False):
continue
filtered_path_item[method] = operation
# Only include path if it has at least one operation after filtering