Skip to content

Commit 5abdfe1

Browse files
committed
Update openapi-python-client
1 parent 8e620d5 commit 5abdfe1

17 files changed

+205
-13
lines changed

generator/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# TODO: replace with upstream openapi-python-client when PR #375 is merged and released
2-
https://github.com/ramnes/openapi-python-client/archive/797b76fd98d3546510ac52946056eaa745d7c685.zip
1+
# TODO: replace with upstream openapi-python-client when PR #375 and #376 are merged and released
2+
https://github.com/ramnes/openapi-python-client/archive/0b448149a440254cebe9561073972bc1c97cd85f.zip

sftpgo_client/base/api/admins/delete_admin.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
def _get_kwargs(
1111
*,
1212
client: Client,
13+
username: str,
1314
) -> Dict[str, Any]:
14-
url = "{}/admins/{username}".format(client.base_url)
15+
url = "{}/admins/{username}".format(client.base_url, username=username)
1516

1617
headers: Dict[str, Any] = client.get_headers()
1718
cookies: Dict[str, Any] = client.get_cookies()
@@ -68,9 +69,11 @@ def _build_response(
6869
def sync_detailed(
6970
*,
7071
client: Client,
72+
username: str,
7173
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
7274
kwargs = _get_kwargs(
7375
client=client,
76+
username=username,
7477
)
7578

7679
response = httpx.delete(
@@ -83,20 +86,24 @@ def sync_detailed(
8386
def sync(
8487
*,
8588
client: Client,
89+
username: str,
8690
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
8791
""" Deletes an existing admin """
8892

8993
return sync_detailed(
9094
client=client,
95+
username=username,
9196
).parsed
9297

9398

9499
async def asyncio_detailed(
95100
*,
96101
client: Client,
102+
username: str,
97103
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
98104
kwargs = _get_kwargs(
99105
client=client,
106+
username=username,
100107
)
101108

102109
async with httpx.AsyncClient() as _client:
@@ -108,11 +115,13 @@ async def asyncio_detailed(
108115
async def asyncio(
109116
*,
110117
client: Client,
118+
username: str,
111119
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
112120
""" Deletes an existing admin """
113121

114122
return (
115123
await asyncio_detailed(
116124
client=client,
125+
username=username,
117126
)
118127
).parsed

sftpgo_client/base/api/admins/get_admin_by_username.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
def _get_kwargs(
1111
*,
1212
client: Client,
13+
username: str,
1314
) -> Dict[str, Any]:
14-
url = "{}/admins/{username}".format(client.base_url)
15+
url = "{}/admins/{username}".format(client.base_url, username=username)
1516

1617
headers: Dict[str, Any] = client.get_headers()
1718
cookies: Dict[str, Any] = client.get_cookies()
@@ -68,9 +69,11 @@ def _build_response(
6869
def sync_detailed(
6970
*,
7071
client: Client,
72+
username: str,
7173
) -> Response[Union[Admin, None, None, None, None, None]]:
7274
kwargs = _get_kwargs(
7375
client=client,
76+
username=username,
7477
)
7578

7679
response = httpx.get(
@@ -83,20 +86,24 @@ def sync_detailed(
8386
def sync(
8487
*,
8588
client: Client,
89+
username: str,
8690
) -> Optional[Union[Admin, None, None, None, None, None]]:
8791
""" Returns the admin with the given username, if it exists. For security reasons the hashed password is omitted in the response """
8892

8993
return sync_detailed(
9094
client=client,
95+
username=username,
9196
).parsed
9297

9398

9499
async def asyncio_detailed(
95100
*,
96101
client: Client,
102+
username: str,
97103
) -> Response[Union[Admin, None, None, None, None, None]]:
98104
kwargs = _get_kwargs(
99105
client=client,
106+
username=username,
100107
)
101108

102109
async with httpx.AsyncClient() as _client:
@@ -108,11 +115,13 @@ async def asyncio_detailed(
108115
async def asyncio(
109116
*,
110117
client: Client,
118+
username: str,
111119
) -> Optional[Union[Admin, None, None, None, None, None]]:
112120
""" Returns the admin with the given username, if it exists. For security reasons the hashed password is omitted in the response """
113121

114122
return (
115123
await asyncio_detailed(
116124
client=client,
125+
username=username,
117126
)
118127
).parsed

sftpgo_client/base/api/admins/update_admin.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
def _get_kwargs(
1212
*,
1313
client: Client,
14+
username: str,
1415
json_body: Admin,
1516
) -> Dict[str, Any]:
16-
url = "{}/admins/{username}".format(client.base_url)
17+
url = "{}/admins/{username}".format(client.base_url, username=username)
1718

1819
headers: Dict[str, Any] = client.get_headers()
1920
cookies: Dict[str, Any] = client.get_cookies()
@@ -73,10 +74,12 @@ def _build_response(
7374
def sync_detailed(
7475
*,
7576
client: Client,
77+
username: str,
7678
json_body: Admin,
7779
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
7880
kwargs = _get_kwargs(
7981
client=client,
82+
username=username,
8083
json_body=json_body,
8184
)
8285

@@ -90,23 +93,27 @@ def sync_detailed(
9093
def sync(
9194
*,
9295
client: Client,
96+
username: str,
9397
json_body: Admin,
9498
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
9599
""" Updates an existing admin """
96100

97101
return sync_detailed(
98102
client=client,
103+
username=username,
99104
json_body=json_body,
100105
).parsed
101106

102107

103108
async def asyncio_detailed(
104109
*,
105110
client: Client,
111+
username: str,
106112
json_body: Admin,
107113
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
108114
kwargs = _get_kwargs(
109115
client=client,
116+
username=username,
110117
json_body=json_body,
111118
)
112119

@@ -119,13 +126,15 @@ async def asyncio_detailed(
119126
async def asyncio(
120127
*,
121128
client: Client,
129+
username: str,
122130
json_body: Admin,
123131
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
124132
""" Updates an existing admin """
125133

126134
return (
127135
await asyncio_detailed(
128136
client=client,
137+
username=username,
129138
json_body=json_body,
130139
)
131140
).parsed

sftpgo_client/base/api/folders/delete_folder.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
def _get_kwargs(
1111
*,
1212
client: Client,
13+
name: str,
1314
) -> Dict[str, Any]:
14-
url = "{}/folders/{name}".format(client.base_url)
15+
url = "{}/folders/{name}".format(client.base_url, name=name)
1516

1617
headers: Dict[str, Any] = client.get_headers()
1718
cookies: Dict[str, Any] = client.get_cookies()
@@ -68,9 +69,11 @@ def _build_response(
6869
def sync_detailed(
6970
*,
7071
client: Client,
72+
name: str,
7173
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
7274
kwargs = _get_kwargs(
7375
client=client,
76+
name=name,
7477
)
7578

7679
response = httpx.delete(
@@ -83,20 +86,24 @@ def sync_detailed(
8386
def sync(
8487
*,
8588
client: Client,
89+
name: str,
8690
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
8791
""" Deletes an existing folder """
8892

8993
return sync_detailed(
9094
client=client,
95+
name=name,
9196
).parsed
9297

9398

9499
async def asyncio_detailed(
95100
*,
96101
client: Client,
102+
name: str,
97103
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
98104
kwargs = _get_kwargs(
99105
client=client,
106+
name=name,
100107
)
101108

102109
async with httpx.AsyncClient() as _client:
@@ -108,11 +115,13 @@ async def asyncio_detailed(
108115
async def asyncio(
109116
*,
110117
client: Client,
118+
name: str,
111119
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
112120
""" Deletes an existing folder """
113121

114122
return (
115123
await asyncio_detailed(
116124
client=client,
125+
name=name,
117126
)
118127
).parsed

sftpgo_client/base/api/folders/get_folder_by_name.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
def _get_kwargs(
1111
*,
1212
client: Client,
13+
name: str,
1314
) -> Dict[str, Any]:
14-
url = "{}/folders/{name}".format(client.base_url)
15+
url = "{}/folders/{name}".format(client.base_url, name=name)
1516

1617
headers: Dict[str, Any] = client.get_headers()
1718
cookies: Dict[str, Any] = client.get_cookies()
@@ -68,9 +69,11 @@ def _build_response(
6869
def sync_detailed(
6970
*,
7071
client: Client,
72+
name: str,
7173
) -> Response[Union[BaseVirtualFolder, None, None, None, None, None]]:
7274
kwargs = _get_kwargs(
7375
client=client,
76+
name=name,
7477
)
7578

7679
response = httpx.get(
@@ -83,20 +86,24 @@ def sync_detailed(
8386
def sync(
8487
*,
8588
client: Client,
89+
name: str,
8690
) -> Optional[Union[BaseVirtualFolder, None, None, None, None, None]]:
8791
""" Returns the folder with the given name if it exists. """
8892

8993
return sync_detailed(
9094
client=client,
95+
name=name,
9196
).parsed
9297

9398

9499
async def asyncio_detailed(
95100
*,
96101
client: Client,
102+
name: str,
97103
) -> Response[Union[BaseVirtualFolder, None, None, None, None, None]]:
98104
kwargs = _get_kwargs(
99105
client=client,
106+
name=name,
100107
)
101108

102109
async with httpx.AsyncClient() as _client:
@@ -108,11 +115,13 @@ async def asyncio_detailed(
108115
async def asyncio(
109116
*,
110117
client: Client,
118+
name: str,
111119
) -> Optional[Union[BaseVirtualFolder, None, None, None, None, None]]:
112120
""" Returns the folder with the given name if it exists. """
113121

114122
return (
115123
await asyncio_detailed(
116124
client=client,
125+
name=name,
117126
)
118127
).parsed

sftpgo_client/base/api/folders/update_folder.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
def _get_kwargs(
1212
*,
1313
client: Client,
14+
name: str,
1415
json_body: BaseVirtualFolder,
1516
) -> Dict[str, Any]:
16-
url = "{}/folders/{name}".format(client.base_url)
17+
url = "{}/folders/{name}".format(client.base_url, name=name)
1718

1819
headers: Dict[str, Any] = client.get_headers()
1920
cookies: Dict[str, Any] = client.get_cookies()
@@ -73,10 +74,12 @@ def _build_response(
7374
def sync_detailed(
7475
*,
7576
client: Client,
77+
name: str,
7678
json_body: BaseVirtualFolder,
7779
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
7880
kwargs = _get_kwargs(
7981
client=client,
82+
name=name,
8083
json_body=json_body,
8184
)
8285

@@ -90,23 +93,27 @@ def sync_detailed(
9093
def sync(
9194
*,
9295
client: Client,
96+
name: str,
9397
json_body: BaseVirtualFolder,
9498
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
9599
""" Updates an existing folder """
96100

97101
return sync_detailed(
98102
client=client,
103+
name=name,
99104
json_body=json_body,
100105
).parsed
101106

102107

103108
async def asyncio_detailed(
104109
*,
105110
client: Client,
111+
name: str,
106112
json_body: BaseVirtualFolder,
107113
) -> Response[Union[ApiResponse, None, None, None, None, None]]:
108114
kwargs = _get_kwargs(
109115
client=client,
116+
name=name,
110117
json_body=json_body,
111118
)
112119

@@ -119,13 +126,15 @@ async def asyncio_detailed(
119126
async def asyncio(
120127
*,
121128
client: Client,
129+
name: str,
122130
json_body: BaseVirtualFolder,
123131
) -> Optional[Union[ApiResponse, None, None, None, None, None]]:
124132
""" Updates an existing folder """
125133

126134
return (
127135
await asyncio_detailed(
128136
client=client,
137+
name=name,
129138
json_body=json_body,
130139
)
131140
).parsed

0 commit comments

Comments
 (0)