From 0afa62884ac7c1d060fd63b4f57fec330a3e65f9 Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Wed, 12 Feb 2025 20:16:27 -0800 Subject: [PATCH] fix --- docs/_static/llama-stack-spec.html | 2 +- docs/_static/llama-stack-spec.yaml | 2 +- docs/openapi_generator/pyopenapi/generator.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/_static/llama-stack-spec.html b/docs/_static/llama-stack-spec.html index ee467e58b..98270f7b8 100644 --- a/docs/_static/llama-stack-spec.html +++ b/docs/_static/llama-stack-spec.html @@ -765,7 +765,7 @@ ] } }, - "/v1/models/{model_id:path}": { + "/v1/models/{model_id}": { "get": { "responses": { "200": { diff --git a/docs/_static/llama-stack-spec.yaml b/docs/_static/llama-stack-spec.yaml index 6137717e0..a646d7e08 100644 --- a/docs/_static/llama-stack-spec.yaml +++ b/docs/_static/llama-stack-spec.yaml @@ -460,7 +460,7 @@ paths: required: true schema: type: string - /v1/models/{model_id:path}: + /v1/models/{model_id}: get: responses: '200': diff --git a/docs/openapi_generator/pyopenapi/generator.py b/docs/openapi_generator/pyopenapi/generator.py index f0d30a0e6..a0385cae0 100644 --- a/docs/openapi_generator/pyopenapi/generator.py +++ b/docs/openapi_generator/pyopenapi/generator.py @@ -644,7 +644,9 @@ class Generator: else: callbacks = None - description = "\n".join(filter(None, [doc_string.short_description, doc_string.long_description])) + description = "\n".join( + filter(None, [doc_string.short_description, doc_string.long_description]) + ) return Operation( tags=[op.defining_class.__name__], summary=None, @@ -681,6 +683,7 @@ class Generator: raise NotImplementedError(f"unknown HTTP method: {op.http_method}") route = op.get_route() + route = route.replace(":path", "") print(f"route: {route}") if route in paths: paths[route].update(pathItem)