Skip to content

Commit eeb7b34

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

484 files changed

Lines changed: 12710 additions & 63 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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.github/workflows/python.yml
22
.gitignore
33
.gitlab-ci.yml
4+
.openapi-generator-ignore
45
.travis.yml
56
README.md
67
clientapi_pdm/__init__.py

clientapi_pdm/api/access_acl_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,13 @@ def _update_acl_serialize(
619619
)
620620

621621
# set the HTTP header `Content-Type`
622+
# Only emit Content-Type when there's actually a body/form/file to send.
623+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
624+
# application/json ("malformed JSON string"); other Proxmox products are
625+
# equally fussy. An explicit `_content_type` override always wins.
622626
if _content_type:
623627
_header_params['Content-Type'] = _content_type
624-
else:
628+
elif _body_params is not None or _form_params or _files:
625629
_default_content_type = (
626630
self.api_client.select_header_content_type(
627631
[

clientapi_pdm/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_pdm/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_pdm/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_pdm/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_pdm/api/access_users_api.py

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

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

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

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

30513063
# set the HTTP header `Content-Type`
3064+
# Only emit Content-Type when there's actually a body/form/file to send.
3065+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
3066+
# application/json ("malformed JSON string"); other Proxmox products are
3067+
# equally fussy. An explicit `_content_type` override always wins.
30523068
if _content_type:
30533069
_header_params['Content-Type'] = _content_type
3054-
else:
3070+
elif _body_params is not None or _form_params or _files:
30553071
_default_content_type = (
30563072
self.api_client.select_header_content_type(
30573073
[

clientapi_pdm/api/config_access_api.py

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,13 @@ def _create_ad_serialize(
322322
)
323323

324324
# set the HTTP header `Content-Type`
325+
# Only emit Content-Type when there's actually a body/form/file to send.
326+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
327+
# application/json ("malformed JSON string"); other Proxmox products are
328+
# equally fussy. An explicit `_content_type` override always wins.
325329
if _content_type:
326330
_header_params['Content-Type'] = _content_type
327-
else:
331+
elif _body_params is not None or _form_params or _files:
328332
_default_content_type = (
329333
self.api_client.select_header_content_type(
330334
[
@@ -620,9 +624,13 @@ def _create_ldap_serialize(
620624
)
621625

622626
# set the HTTP header `Content-Type`
627+
# Only emit Content-Type when there's actually a body/form/file to send.
628+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
629+
# application/json ("malformed JSON string"); other Proxmox products are
630+
# equally fussy. An explicit `_content_type` override always wins.
623631
if _content_type:
624632
_header_params['Content-Type'] = _content_type
625-
else:
633+
elif _body_params is not None or _form_params or _files:
626634
_default_content_type = (
627635
self.api_client.select_header_content_type(
628636
[
@@ -918,9 +926,13 @@ def _create_openid_serialize(
918926
)
919927

920928
# set the HTTP header `Content-Type`
929+
# Only emit Content-Type when there's actually a body/form/file to send.
930+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
931+
# application/json ("malformed JSON string"); other Proxmox products are
932+
# equally fussy. An explicit `_content_type` override always wins.
921933
if _content_type:
922934
_header_params['Content-Type'] = _content_type
923-
else:
935+
elif _body_params is not None or _form_params or _files:
924936
_default_content_type = (
925937
self.api_client.select_header_content_type(
926938
[
@@ -4600,9 +4612,13 @@ def _update_ad_serialize(
46004612
)
46014613

46024614
# set the HTTP header `Content-Type`
4615+
# Only emit Content-Type when there's actually a body/form/file to send.
4616+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
4617+
# application/json ("malformed JSON string"); other Proxmox products are
4618+
# equally fussy. An explicit `_content_type` override always wins.
46034619
if _content_type:
46044620
_header_params['Content-Type'] = _content_type
4605-
else:
4621+
elif _body_params is not None or _form_params or _files:
46064622
_default_content_type = (
46074623
self.api_client.select_header_content_type(
46084624
[
@@ -4913,9 +4929,13 @@ def _update_ldap_serialize(
49134929
)
49144930

49154931
# set the HTTP header `Content-Type`
4932+
# Only emit Content-Type when there's actually a body/form/file to send.
4933+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
4934+
# application/json ("malformed JSON string"); other Proxmox products are
4935+
# equally fussy. An explicit `_content_type` override always wins.
49164936
if _content_type:
49174937
_header_params['Content-Type'] = _content_type
4918-
else:
4938+
elif _body_params is not None or _form_params or _files:
49194939
_default_content_type = (
49204940
self.api_client.select_header_content_type(
49214941
[
@@ -5226,9 +5246,13 @@ def _update_openid_serialize(
52265246
)
52275247

52285248
# set the HTTP header `Content-Type`
5249+
# Only emit Content-Type when there's actually a body/form/file to send.
5250+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
5251+
# application/json ("malformed JSON string"); other Proxmox products are
5252+
# equally fussy. An explicit `_content_type` override always wins.
52295253
if _content_type:
52305254
_header_params['Content-Type'] = _content_type
5231-
else:
5255+
elif _body_params is not None or _form_params or _files:
52325256
_default_content_type = (
52335257
self.api_client.select_header_content_type(
52345258
[
@@ -5524,9 +5548,13 @@ def _update_webauthn_serialize(
55245548
)
55255549

55265550
# set the HTTP header `Content-Type`
5551+
# Only emit Content-Type when there's actually a body/form/file to send.
5552+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
5553+
# application/json ("malformed JSON string"); other Proxmox products are
5554+
# equally fussy. An explicit `_content_type` override always wins.
55275555
if _content_type:
55285556
_header_params['Content-Type'] = _content_type
5529-
else:
5557+
elif _body_params is not None or _form_params or _files:
55305558
_default_content_type = (
55315559
self.api_client.select_header_content_type(
55325560
[

clientapi_pdm/api/config_acme_api.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,13 @@ def _create_account_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
[
@@ -612,9 +616,13 @@ def _create_plugins_serialize(
612616
)
613617

614618
# set the HTTP header `Content-Type`
619+
# Only emit Content-Type when there's actually a body/form/file to send.
620+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
621+
# application/json ("malformed JSON string"); other Proxmox products are
622+
# equally fussy. An explicit `_content_type` override always wins.
615623
if _content_type:
616624
_header_params['Content-Type'] = _content_type
617-
else:
625+
elif _body_params is not None or _form_params or _files:
618626
_default_content_type = (
619627
self.api_client.select_header_content_type(
620628
[
@@ -3709,9 +3717,13 @@ def _update_account_serialize(
37093717
)
37103718

37113719
# set the HTTP header `Content-Type`
3720+
# Only emit Content-Type when there's actually a body/form/file to send.
3721+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
3722+
# application/json ("malformed JSON string"); other Proxmox products are
3723+
# equally fussy. An explicit `_content_type` override always wins.
37123724
if _content_type:
37133725
_header_params['Content-Type'] = _content_type
3714-
else:
3726+
elif _body_params is not None or _form_params or _files:
37153727
_default_content_type = (
37163728
self.api_client.select_header_content_type(
37173729
[
@@ -4022,9 +4034,13 @@ def _update_plugins_serialize(
40224034
)
40234035

40244036
# set the HTTP header `Content-Type`
4037+
# Only emit Content-Type when there's actually a body/form/file to send.
4038+
# PVE/PMG Perl HTTP server rejects empty bodies with Content-Type:
4039+
# application/json ("malformed JSON string"); other Proxmox products are
4040+
# equally fussy. An explicit `_content_type` override always wins.
40254041
if _content_type:
40264042
_header_params['Content-Type'] = _content_type
4027-
else:
4043+
elif _body_params is not None or _form_params or _files:
40284044
_default_content_type = (
40294045
self.api_client.select_header_content_type(
40304046
[

0 commit comments

Comments
 (0)