Skip to content

Commit 9cab051

Browse files
committed
chore: sync from pve-openapi@466feb3
fix(sdk-gen): repair 16 generator bugs flagged by live SDK E2E suite
1 parent f6a90c6 commit 9cab051

666 files changed

Lines changed: 13830 additions & 149 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.openapi-generator-ignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.github/workflows/python.yml
22
.gitignore
33
.gitlab-ci.yml
4-
.openapi-generator-ignore
54
.travis.yml
65
README.md
76
clientapi_pbs/__init__.py

clientapi_pbs/api/access_acl_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,13 @@ def _update_acl_serialize(
602602
)
603603

604604
# set the HTTP header `Content-Type`
605+
# Only emit Content-Type when there's actually a body/form/file to send.
606+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
607+
# application/json ("malformed JSON string"); other Proxmox products are
608+
# equally fussy. An explicit `_content_type` override always wins.
605609
if _content_type:
606610
_header_params['Content-Type'] = _content_type
607-
else:
611+
elif _body_params is not None or _form_params or _files:
608612
_default_content_type = (
609613
self.api_client.select_header_content_type(
610614
[

clientapi_pbs/api/access_api.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,13 @@ def _create_vncticket_serialize(
303303
)
304304

305305
# set the HTTP header `Content-Type`
306+
# Only emit Content-Type when there's actually a body/form/file to send.
307+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
308+
# application/json ("malformed JSON string"); other Proxmox products are
309+
# equally fussy. An explicit `_content_type` override always wins.
306310
if _content_type:
307311
_header_params['Content-Type'] = _content_type
308-
else:
312+
elif _body_params is not None or _form_params or _files:
309313
_default_content_type = (
310314
self.api_client.select_header_content_type(
311315
[
@@ -1439,9 +1443,13 @@ def _update_password_serialize(
14391443
)
14401444

14411445
# set the HTTP header `Content-Type`
1446+
# Only emit Content-Type when there's actually a body/form/file to send.
1447+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
1448+
# application/json ("malformed JSON string"); other Proxmox products are
1449+
# equally fussy. An explicit `_content_type` override always wins.
14421450
if _content_type:
14431451
_header_params['Content-Type'] = _content_type
1444-
else:
1452+
elif _body_params is not None or _form_params or _files:
14451453
_default_content_type = (
14461454
self.api_client.select_header_content_type(
14471455
[

clientapi_pbs/api/access_domains_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,13 @@ def _create_sync_serialize(
314314
)
315315

316316
# set the HTTP header `Content-Type`
317+
# Only emit Content-Type when there's actually a body/form/file to send.
318+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
319+
# application/json ("malformed JSON string"); other Proxmox products are
320+
# equally fussy. An explicit `_content_type` override always wins.
317321
if _content_type:
318322
_header_params['Content-Type'] = _content_type
319-
else:
323+
elif _body_params is not None or _form_params or _files:
320324
_default_content_type = (
321325
self.api_client.select_header_content_type(
322326
[

clientapi_pbs/api/access_openid_api.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,13 @@ def _create_auth_url_serialize(
298298
)
299299

300300
# set the HTTP header `Content-Type`
301+
# Only emit Content-Type when there's actually a body/form/file to send.
302+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
303+
# application/json ("malformed JSON string"); other Proxmox products are
304+
# equally fussy. An explicit `_content_type` override always wins.
301305
if _content_type:
302306
_header_params['Content-Type'] = _content_type
303-
else:
307+
elif _body_params is not None or _form_params or _files:
304308
_default_content_type = (
305309
self.api_client.select_header_content_type(
306310
[
@@ -593,9 +597,13 @@ def _create_login_serialize(
593597
)
594598

595599
# set the HTTP header `Content-Type`
600+
# Only emit Content-Type when there's actually a body/form/file to send.
601+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
602+
# application/json ("malformed JSON string"); other Proxmox products are
603+
# equally fussy. An explicit `_content_type` override always wins.
596604
if _content_type:
597605
_header_params['Content-Type'] = _content_type
598-
else:
606+
elif _body_params is not None or _form_params or _files:
599607
_default_content_type = (
600608
self.api_client.select_header_content_type(
601609
[

clientapi_pbs/api/access_tfa_api.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,13 @@ def _create_tfa_serialize(
319319
)
320320

321321
# set the HTTP header `Content-Type`
322+
# Only emit Content-Type when there's actually a body/form/file to send.
323+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
324+
# application/json ("malformed JSON string"); other Proxmox products are
325+
# equally fussy. An explicit `_content_type` override always wins.
322326
if _content_type:
323327
_header_params['Content-Type'] = _content_type
324-
else:
328+
elif _body_params is not None or _form_params or _files:
325329
_default_content_type = (
326330
self.api_client.select_header_content_type(
327331
[
@@ -1815,9 +1819,13 @@ def _update_tfa_serialize(
18151819
)
18161820

18171821
# set the HTTP header `Content-Type`
1822+
# Only emit Content-Type when there's actually a body/form/file to send.
1823+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
1824+
# application/json ("malformed JSON string"); other Proxmox products are
1825+
# equally fussy. An explicit `_content_type` override always wins.
18181826
if _content_type:
18191827
_header_params['Content-Type'] = _content_type
1820-
else:
1828+
elif _body_params is not None or _form_params or _files:
18211829
_default_content_type = (
18221830
self.api_client.select_header_content_type(
18231831
[

clientapi_pbs/api/access_ticket_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,13 @@ def _create_ticket_serialize(
296296
)
297297

298298
# set the HTTP header `Content-Type`
299+
# Only emit Content-Type when there's actually a body/form/file to send.
300+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
301+
# application/json ("malformed JSON string"); other Proxmox products are
302+
# equally fussy. An explicit `_content_type` override always wins.
299303
if _content_type:
300304
_header_params['Content-Type'] = _content_type
301-
else:
305+
elif _body_params is not None or _form_params or _files:
302306
_default_content_type = (
303307
self.api_client.select_header_content_type(
304308
[

clientapi_pbs/api/access_users_api.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,13 @@ def _create_token_serialize(
341341
)
342342

343343
# set the HTTP header `Content-Type`
344+
# Only emit Content-Type when there's actually a body/form/file to send.
345+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
346+
# application/json ("malformed JSON string"); other Proxmox products are
347+
# equally fussy. An explicit `_content_type` override always wins.
344348
if _content_type:
345349
_header_params['Content-Type'] = _content_type
346-
else:
350+
elif _body_params is not None or _form_params or _files:
347351
_default_content_type = (
348352
self.api_client.select_header_content_type(
349353
[
@@ -639,9 +643,13 @@ def _create_users_serialize(
639643
)
640644

641645
# set the HTTP header `Content-Type`
646+
# Only emit Content-Type when there's actually a body/form/file to send.
647+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
648+
# application/json ("malformed JSON string"); other Proxmox products are
649+
# equally fussy. An explicit `_content_type` override always wins.
642650
if _content_type:
643651
_header_params['Content-Type'] = _content_type
644-
else:
652+
elif _body_params is not None or _form_params or _files:
645653
_default_content_type = (
646654
self.api_client.select_header_content_type(
647655
[
@@ -2737,9 +2745,13 @@ def _update_token_serialize(
27372745
)
27382746

27392747
# set the HTTP header `Content-Type`
2748+
# Only emit Content-Type when there's actually a body/form/file to send.
2749+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
2750+
# application/json ("malformed JSON string"); other Proxmox products are
2751+
# equally fussy. An explicit `_content_type` override always wins.
27402752
if _content_type:
27412753
_header_params['Content-Type'] = _content_type
2742-
else:
2754+
elif _body_params is not None or _form_params or _files:
27432755
_default_content_type = (
27442756
self.api_client.select_header_content_type(
27452757
[
@@ -3334,9 +3346,13 @@ def _update_users_serialize(
33343346
)
33353347

33363348
# set the HTTP header `Content-Type`
3349+
# Only emit Content-Type when there's actually a body/form/file to send.
3350+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
3351+
# application/json ("malformed JSON string"); other Proxmox products are
3352+
# equally fussy. An explicit `_content_type` override always wins.
33373353
if _content_type:
33383354
_header_params['Content-Type'] = _content_type
3339-
else:
3355+
elif _body_params is not None or _form_params or _files:
33403356
_default_content_type = (
33413357
self.api_client.select_header_content_type(
33423358
[

clientapi_pbs/api/admin_datastore_api.py

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,13 @@ def _create_change_owner_serialize(
360360
)
361361

362362
# set the HTTP header `Content-Type`
363+
# Only emit Content-Type when there's actually a body/form/file to send.
364+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
365+
# application/json ("malformed JSON string"); other Proxmox products are
366+
# equally fussy. An explicit `_content_type` override always wins.
363367
if _content_type:
364368
_header_params['Content-Type'] = _content_type
365-
else:
369+
elif _body_params is not None or _form_params or _files:
366370
_default_content_type = (
367371
self.api_client.select_header_content_type(
368372
[
@@ -1241,9 +1245,13 @@ def _create_move_group_serialize(
12411245
)
12421246

12431247
# set the HTTP header `Content-Type`
1248+
# Only emit Content-Type when there's actually a body/form/file to send.
1249+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
1250+
# application/json ("malformed JSON string"); other Proxmox products are
1251+
# equally fussy. An explicit `_content_type` override always wins.
12441252
if _content_type:
12451253
_header_params['Content-Type'] = _content_type
1246-
else:
1254+
elif _body_params is not None or _form_params or _files:
12471255
_default_content_type = (
12481256
self.api_client.select_header_content_type(
12491257
[
@@ -1554,9 +1562,13 @@ def _create_move_namespace_serialize(
15541562
)
15551563

15561564
# set the HTTP header `Content-Type`
1565+
# Only emit Content-Type when there's actually a body/form/file to send.
1566+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
1567+
# application/json ("malformed JSON string"); other Proxmox products are
1568+
# equally fussy. An explicit `_content_type` override always wins.
15571569
if _content_type:
15581570
_header_params['Content-Type'] = _content_type
1559-
else:
1571+
elif _body_params is not None or _form_params or _files:
15601572
_default_content_type = (
15611573
self.api_client.select_header_content_type(
15621574
[
@@ -1867,9 +1879,13 @@ def _create_namespace_serialize(
18671879
)
18681880

18691881
# set the HTTP header `Content-Type`
1882+
# Only emit Content-Type when there's actually a body/form/file to send.
1883+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
1884+
# application/json ("malformed JSON string"); other Proxmox products are
1885+
# equally fussy. An explicit `_content_type` override always wins.
18701886
if _content_type:
18711887
_header_params['Content-Type'] = _content_type
1872-
else:
1888+
elif _body_params is not None or _form_params or _files:
18731889
_default_content_type = (
18741890
self.api_client.select_header_content_type(
18751891
[
@@ -2180,9 +2196,13 @@ def _create_prune_serialize(
21802196
)
21812197

21822198
# set the HTTP header `Content-Type`
2199+
# Only emit Content-Type when there's actually a body/form/file to send.
2200+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
2201+
# application/json ("malformed JSON string"); other Proxmox products are
2202+
# equally fussy. An explicit `_content_type` override always wins.
21832203
if _content_type:
21842204
_header_params['Content-Type'] = _content_type
2185-
else:
2205+
elif _body_params is not None or _form_params or _files:
21862206
_default_content_type = (
21872207
self.api_client.select_header_content_type(
21882208
[
@@ -2493,9 +2513,13 @@ def _create_prune_datastore_serialize(
24932513
)
24942514

24952515
# set the HTTP header `Content-Type`
2516+
# Only emit Content-Type when there's actually a body/form/file to send.
2517+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
2518+
# application/json ("malformed JSON string"); other Proxmox products are
2519+
# equally fussy. An explicit `_content_type` override always wins.
24962520
if _content_type:
24972521
_header_params['Content-Type'] = _content_type
2498-
else:
2522+
elif _body_params is not None or _form_params or _files:
24992523
_default_content_type = (
25002524
self.api_client.select_header_content_type(
25012525
[
@@ -3090,9 +3114,13 @@ def _create_upload_backup_log_serialize(
30903114
)
30913115

30923116
# set the HTTP header `Content-Type`
3117+
# Only emit Content-Type when there's actually a body/form/file to send.
3118+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
3119+
# application/json ("malformed JSON string"); other Proxmox products are
3120+
# equally fussy. An explicit `_content_type` override always wins.
30933121
if _content_type:
30943122
_header_params['Content-Type'] = _content_type
3095-
else:
3123+
elif _body_params is not None or _form_params or _files:
30963124
_default_content_type = (
30973125
self.api_client.select_header_content_type(
30983126
[
@@ -3403,9 +3431,13 @@ def _create_verify_serialize(
34033431
)
34043432

34053433
# set the HTTP header `Content-Type`
3434+
# Only emit Content-Type when there's actually a body/form/file to send.
3435+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
3436+
# application/json ("malformed JSON string"); other Proxmox products are
3437+
# equally fussy. An explicit `_content_type` override always wins.
34063438
if _content_type:
34073439
_header_params['Content-Type'] = _content_type
3408-
else:
3440+
elif _body_params is not None or _form_params or _files:
34093441
_default_content_type = (
34103442
self.api_client.select_header_content_type(
34113443
[
@@ -10367,9 +10399,13 @@ def _update_group_notes_serialize(
1036710399
)
1036810400

1036910401
# set the HTTP header `Content-Type`
10402+
# Only emit Content-Type when there's actually a body/form/file to send.
10403+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
10404+
# application/json ("malformed JSON string"); other Proxmox products are
10405+
# equally fussy. An explicit `_content_type` override always wins.
1037010406
if _content_type:
1037110407
_header_params['Content-Type'] = _content_type
10372-
else:
10408+
elif _body_params is not None or _form_params or _files:
1037310409
_default_content_type = (
1037410410
self.api_client.select_header_content_type(
1037510411
[
@@ -10680,9 +10716,13 @@ def _update_notes_serialize(
1068010716
)
1068110717

1068210718
# set the HTTP header `Content-Type`
10719+
# Only emit Content-Type when there's actually a body/form/file to send.
10720+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
10721+
# application/json ("malformed JSON string"); other Proxmox products are
10722+
# equally fussy. An explicit `_content_type` override always wins.
1068310723
if _content_type:
1068410724
_header_params['Content-Type'] = _content_type
10685-
else:
10725+
elif _body_params is not None or _form_params or _files:
1068610726
_default_content_type = (
1068710727
self.api_client.select_header_content_type(
1068810728
[
@@ -10993,9 +11033,13 @@ def _update_protected_serialize(
1099311033
)
1099411034

1099511035
# set the HTTP header `Content-Type`
11036+
# Only emit Content-Type when there's actually a body/form/file to send.
11037+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
11038+
# application/json ("malformed JSON string"); other Proxmox products are
11039+
# equally fussy. An explicit `_content_type` override always wins.
1099611040
if _content_type:
1099711041
_header_params['Content-Type'] = _content_type
10998-
else:
11042+
elif _body_params is not None or _form_params or _files:
1099911043
_default_content_type = (
1100011044
self.api_client.select_header_content_type(
1100111045
[

0 commit comments

Comments
 (0)