fix: api tool encoding (#2296)

This commit is contained in:
Yeuoly authored and GitHub committed 2024-01-30 22:22:58 +08:00
1 parent 0a4dfaeaf9
commit 6d24a2cb87
3 files changed
+29 -6

No files matched your search

+4
View File
@@ -114,6 +114,10 @@ class ApiBasedToolSchemaParser:
if count > 1:
warning['duplicated_parameter'] = f'Parameter {name} is duplicated.'
# check if there is a operation id, use $path_$method as operation id if not
if 'operationId' not in interface['operation']:
interface['operation']['operationId'] = f'{interface["path"]}_{interface["method"]}'
bundles.append(ApiBasedToolBundle(
server_url=server_url + interface['path'],
method=interface['method'],