This commit is contained in:
Xi Yan 2025-02-12 20:16:27 -08:00
parent 1e975e88ec
commit 0afa62884a
3 changed files with 6 additions and 3 deletions

View file

@ -765,7 +765,7 @@
] ]
} }
}, },
"/v1/models/{model_id:path}": { "/v1/models/{model_id}": {
"get": { "get": {
"responses": { "responses": {
"200": { "200": {

View file

@ -460,7 +460,7 @@ paths:
required: true required: true
schema: schema:
type: string type: string
/v1/models/{model_id:path}: /v1/models/{model_id}:
get: get:
responses: responses:
'200': '200':

View file

@ -644,7 +644,9 @@ class Generator:
else: else:
callbacks = None 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( return Operation(
tags=[op.defining_class.__name__], tags=[op.defining_class.__name__],
summary=None, summary=None,
@ -681,6 +683,7 @@ class Generator:
raise NotImplementedError(f"unknown HTTP method: {op.http_method}") raise NotImplementedError(f"unknown HTTP method: {op.http_method}")
route = op.get_route() route = op.get_route()
route = route.replace(":path", "")
print(f"route: {route}") print(f"route: {route}")
if route in paths: if route in paths:
paths[route].update(pathItem) paths[route].update(pathItem)