我想将openAPI 2.0描述文件/v2/api-docs?group=thingsboard
用于Python中的Swagger客户端。
from bravado.client import SwaggerClient
from bravado.requests_client import RequestsClient
http_client = RequestsClient()
client = SwaggerClient.from_url('https://cloud.thingsboard.io/v2/api-docs?group=thingsboard', http_client=http_client)
在我的示例和在线验证器中,我也收到验证错误。应该可以使用此描述文件,是否损坏或我使用的客户端错误?
Traceback (most recent call last):
File "test-swagger.py", line 13, in <module>
http_client=http_client,
File "bravado\client.py", line 107, in from_url
return cls.from_spec(spec_dict, spec_url, http_client, config)
File "bravado\client.py", line 134, in from_spec
spec_dict, origin_url, http_client, config,
File "bravado_core\spec.py", line 180, in from_dict
spec.build()
File "bravado_core\spec.py", line 192, in build
self._validate_spec()
File "bravado_core\spec.py", line 188, in _validate_spec
http_handlers=build_http_handlers(self.http_client),
File "swagger_spec_validator\validator20.py", line 170, in validate_spec
validate_apis(apis, bound_deref)
File "swagger_spec_validator\validator20.py", line 376, in validate_apis
validate_unresolvable_path_params(api_name, all_path_params)
File "swagger_spec_validator\validator20.py", line 602, in validate_unresolvable_path_params
raise SwaggerValidationError(msg)
swagger_spec_validator.common.SwaggerValidationError: Path parameter '?searchStatus,status' used is not documented on '/api/alarm/highestSeverity/{entityType}/{entityId}{?searchStatus,status}'