Skip to content

Commit 01b1bff

Browse files
authored
docs: Reword README SSL verification notes.
1 parent 1e9a40b commit 01b1bff

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

end_to_end_tests/golden-record/README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,25 @@ my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
4141
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
4242
```
4343

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.
44+
By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
4745

4846
```python
49-
client = AuthenticatedClient(base_url="https://internal_api.example.com",
50-
token="SuperSecretToken",
51-
verify_ssl='/path/to/certificate_bundle.pem')
47+
client = AuthenticatedClient(
48+
base_url="https://internal_api.example.com",
49+
token="SuperSecretToken",
50+
verify_ssl="/path/to/certificate_bundle.pem",
51+
)
5252
```
5353

54-
or even disable ssl verification altogether, despite the fact that it can cause security risks.
54+
You can also disable certificate validation altogether, but beware that **this is a security risk**.
5555

5656
```python
57-
client = AuthenticatedClient(base_url="https://internal_api.example.com",
58-
token="SuperSecretToken",
59-
verify_ssl=False)
57+
client = AuthenticatedClient(
58+
base_url="https://internal_api.example.com",
59+
token="SuperSecretToken",
60+
verify_ssl=False
61+
)
6062
```
61-
but be careful with it.
6263

6364
Things to know:
6465
1. Every path/method combo becomes a Python module with four functions:

openapi_python_client/templates/README.md.jinja

+12-11
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,25 @@ my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
4141
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
4242
```
4343

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.
44+
By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
4745

4846
```python
49-
client = AuthenticatedClient(base_url="https://internal_api.example.com",
50-
token="SuperSecretToken",
51-
verify_ssl='/path/to/certificate_bundle.pem')
47+
client = AuthenticatedClient(
48+
base_url="https://internal_api.example.com",
49+
token="SuperSecretToken",
50+
verify_ssl="/path/to/certificate_bundle.pem",
51+
)
5252
```
5353

54-
or even disable ssl verification altogether, despite the fact that it can cause security risks.
54+
You can also disable certificate validation altogether, but beware that **this is a security risk**.
5555

5656
```python
57-
client = AuthenticatedClient(base_url="https://internal_api.example.com",
58-
token="SuperSecretToken",
59-
verify_ssl=False)
57+
client = AuthenticatedClient(
58+
base_url="https://internal_api.example.com",
59+
token="SuperSecretToken",
60+
verify_ssl=False
61+
)
6062
```
61-
but be careful with it.
6263

6364
Things to know:
6465
1. Every path/method combo becomes a Python module with four functions:

0 commit comments

Comments
 (0)