Swagger Editorを使用して、私のAPIについて説明し、API解説に基づいてSwagger Pythonクライアントをダウンロードして、RESTサービス(HTTPSのWildflyで動作)に対してテストしました。 (テスト目的のために)Swagger - Pythonクライアント - SSL検証を無効にする
self.verify_ssl = True
私はこの値をfalseに設定しているが、私はまだ受信し続ける:私はPythonクライアントが付属していますconfiguration.pyで見
は、次のコードブロックがあります:
例外PApi-> example_response_post呼び出す:(0) 理由:SSLError [SSL:CERTIFICATE_VERIFY_FAILED]証明書が失敗した検証(_ssl.c:590)
をすると、次のテストクライアントを使用する場合:
# create an instance of the API class
api_instance = swagger_client.PApi()
body = swagger_client.exampleRequestBody("some stuff")
http_client_timeout = 5.4 # float | Set the value of the http request timeout (optional)
try:
# Product Types
api_response = api_instance.example_response_post(body=body)
pprint(api_response)
except ApiException as e:
print "Exception when calling PApi->example_response_post: %s\n" % e
は実際に、私はこのconfiguration.pyファイルは、これまでロードされていると思ういけません。この仕事をするにはどうすればいいですか?
ありがとうございます!