File tree 1 file changed +19
-0
lines changed
openapi_python_client/templates
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,25 @@ my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
41
41
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
42
42
```
43
43
44
+ By default when you're calling an https api it will attempt to verify that ssl is working correctly.
45
+ Using certificate verification is highly recommended most of the time and is the default.
46
+ But sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
47
+
48
+ ```python
49
+ client = AuthenticatedClient(base_url="https://internal_api.example.com",
50
+ token="SuperSecretToken",
51
+ verify_ssl='/path/to/certificate_bundle.pem')
52
+ ```
53
+
54
+ or even disable ssl verification altogether, despite the fact that it can cause security risks.
55
+
56
+ ```python
57
+ client = AuthenticatedClient(base_url="https://internal_api.example.com",
58
+ token="SuperSecretToken",
59
+ verify_ssl=False)
60
+ ```
61
+ but be careful with it.
62
+
44
63
Things to know:
45
64
1. Every path/method combo becomes a Python module with four functions:
46
65
1. `sync`: Blocking request that returns parsed data (if successful) or `None`
You can’t perform that action at this time.
0 commit comments