From 9318b683d21af544595dea0d695b358c33bbdb4e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:32:29 +0100 Subject: [PATCH] chore(deps): update dependency speakeasy-api/speakeasy to v1.468.5 (#40) * chore(deps): update dependency speakeasy-api/speakeasy to v1.468.5 * Bump .speakeasy/gen.yaml based on label * Update provider based on openapi.yaml changes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pmalek Co-authored-by: team-k8s-bot --- .github/workflows/bump-version.yaml | 2 +- .github/workflows/generate_on_pr.yaml | 2 +- .speakeasy/gen.lock | 12 ++++---- .speakeasy/gen.yaml | 2 +- acls.go | 8 ++++-- apikeys.go | 8 ++++-- authsettings.go | 16 ++++++++--- basicauthcredentials.go | 8 ++++-- cacertificates.go | 8 ++++-- certificates.go | 8 ++++-- consumergroups.go | 16 ++++++++--- consumers.go | 8 ++++-- controlplanegroups.go | 12 ++++++-- controlplanes.go | 8 ++++-- custompluginschemas.go | 8 ++++-- docs/sdks/authsettings/README.md | 6 +++- dpcertificates.go | 4 ++- hmacauthcredentials.go | 8 ++++-- impersonationsettings.go | 4 ++- invites.go | 4 ++- jwts.go | 8 ++++-- keys.go | 16 ++++++++--- keysets.go | 8 ++++-- mtlsauthcredentials.go | 8 ++++-- plugins.go | 40 ++++++++++++++++++++------- roles.go | 8 ++++-- routes.go | 16 ++++++++--- sdk.go | 6 ++-- services.go | 8 ++++-- snis.go | 16 ++++++++--- systemaccounts.go | 8 ++++-- systemaccountsaccesstokens.go | 8 ++++-- systemaccountsroles.go | 4 ++- systemaccountsteammembership.go | 4 ++- targets.go | 8 ++++-- teammembership.go | 4 ++- teams.go | 8 ++++-- upstreams.go | 8 ++++-- users.go | 4 ++- vaults.go | 8 ++++-- 40 files changed, 257 insertions(+), 93 deletions(-) diff --git a/.github/workflows/bump-version.yaml b/.github/workflows/bump-version.yaml index b2fb341..4491023 100644 --- a/.github/workflows/bump-version.yaml +++ b/.github/workflows/bump-version.yaml @@ -36,7 +36,7 @@ jobs: repo: speakeasy cli_name: speakeasy package_type: zip - version: 1.465.0 # renovate: datasource=github-releases depName=speakeasy-api/speakeasy + version: 1.468.5 # renovate: datasource=github-releases depName=speakeasy-api/speakeasy - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/generate_on_pr.yaml b/.github/workflows/generate_on_pr.yaml index 3f92ded..98c3611 100644 --- a/.github/workflows/generate_on_pr.yaml +++ b/.github/workflows/generate_on_pr.yaml @@ -47,7 +47,7 @@ jobs: repo: speakeasy cli_name: speakeasy package_type: zip - version: 1.465.0 # renovate: datasource=github-releases depName=speakeasy-api/speakeasy + version: 1.468.5 # renovate: datasource=github-releases depName=speakeasy-api/speakeasy - name: Checkout current repo uses: actions/checkout@v4 diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 39df900..231cf18 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,15 +3,15 @@ id: b81e5def-5b1e-4753-ae7c-0efccc2e6f61 management: docChecksum: 3fa21b5bc073d3ea4d54118051e31d65 docVersion: 0.0.1 - speakeasyVersion: 1.465.0 - generationVersion: 2.486.6 - releaseVersion: 0.1.19 - configChecksum: c0813351eba42c757e53ec488c78183d + speakeasyVersion: 1.468.5 + generationVersion: 2.493.11 + releaseVersion: 0.1.20 + configChecksum: 2652e074781e0e6dd5da078681ed8fbe features: go: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.6 - core: 3.6.2 + core: 3.6.5 deepObjectParams: 0.1.1 defaultEnabledRetries: 0.2.0 envVarSecurityUsage: 0.3.2 @@ -3165,7 +3165,7 @@ examples: patch-team-group-mappings: speakeasy-default-patch-team-group-mappings: requestBody: - application/json: {} + application/json: {"data": [{}]} responses: "200": application/json: {"meta": {"page": {"number": 1, "size": 10, "total": 100}}, "data": [{"team_id": "6801e673-cc10-498a-94cd-4271de07a0d3", "groups": ["Tech Leads", "API Engineers"]}]} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8b58c3f..96aa4de 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false go: - version: 0.1.19 + version: 0.1.20 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false clientServerStatusCodesAsErrors: true diff --git a/acls.go b/acls.go index 4b4298b..b05649d 100644 --- a/acls.go +++ b/acls.go @@ -725,7 +725,9 @@ func (s *ACLs) CreateACLWithConsumer(ctx context.Context, request operations.Cre } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1301,7 +1303,9 @@ func (s *ACLs) UpsertACLWithConsumer(ctx context.Context, request operations.Ups } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/apikeys.go b/apikeys.go index 841ae58..3848ab4 100644 --- a/apikeys.go +++ b/apikeys.go @@ -280,7 +280,9 @@ func (s *APIKeys) CreateKeyAuthWithConsumer(ctx context.Context, request operati } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -856,7 +858,9 @@ func (s *APIKeys) UpsertKeyAuthWithConsumer(ctx context.Context, request operati } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/authsettings.go b/authsettings.go index c89d58d..3de9cbe 100644 --- a/authsettings.go +++ b/authsettings.go @@ -296,7 +296,9 @@ func (s *AuthSettings) UpdateAuthenticationSettings(ctx context.Context, request } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -820,7 +822,9 @@ func (s *AuthSettings) UpdateIdpConfiguration(ctx context.Context, request *comp } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1338,7 +1342,9 @@ func (s *AuthSettings) PatchTeamGroupMappings(ctx context.Context, request *comp } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1602,7 +1608,9 @@ func (s *AuthSettings) UpdateIdpTeamMappings(ctx context.Context, request *compo } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/basicauthcredentials.go b/basicauthcredentials.go index b4e89c5..bd75df0 100644 --- a/basicauthcredentials.go +++ b/basicauthcredentials.go @@ -725,7 +725,9 @@ func (s *BasicAuthCredentials) CreateBasicAuthWithConsumer(ctx context.Context, } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1301,7 +1303,9 @@ func (s *BasicAuthCredentials) UpsertBasicAuthWithConsumer(ctx context.Context, } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/cacertificates.go b/cacertificates.go index 34a75e2..61a275f 100644 --- a/cacertificates.go +++ b/cacertificates.go @@ -308,7 +308,9 @@ func (s *CACertificates) CreateCaCertificate(ctx context.Context, controlPlaneID } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -957,7 +959,9 @@ func (s *CACertificates) UpsertCaCertificate(ctx context.Context, request operat } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/certificates.go b/certificates.go index 762d8ae..9c48489 100644 --- a/certificates.go +++ b/certificates.go @@ -311,7 +311,9 @@ func (s *Certificates) CreateCertificate(ctx context.Context, controlPlaneID str } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -960,7 +962,9 @@ func (s *Certificates) UpsertCertificate(ctx context.Context, request operations } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/consumergroups.go b/consumergroups.go index 314d6b3..3d23b87 100644 --- a/consumergroups.go +++ b/consumergroups.go @@ -308,7 +308,9 @@ func (s *ConsumerGroups) CreateConsumerGroup(ctx context.Context, controlPlaneID } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -957,7 +959,9 @@ func (s *ConsumerGroups) UpsertConsumerGroup(ctx context.Context, request operat } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1563,7 +1567,9 @@ func (s *ConsumerGroups) AddConsumerToGroup(ctx context.Context, request operati } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -2324,7 +2330,9 @@ func (s *ConsumerGroups) AddConsumerToSpecificConsumerGroup(ctx context.Context, } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/consumers.go b/consumers.go index d148f9f..c142475 100644 --- a/consumers.go +++ b/consumers.go @@ -308,7 +308,9 @@ func (s *Consumers) CreateConsumer(ctx context.Context, controlPlaneID string, c } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -957,7 +959,9 @@ func (s *Consumers) UpsertConsumer(ctx context.Context, request operations.Upser } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/controlplanegroups.go b/controlplanegroups.go index d5a76cc..202d062 100644 --- a/controlplanegroups.go +++ b/controlplanegroups.go @@ -695,7 +695,9 @@ func (s *ControlPlaneGroups) PutControlPlanesIDGroupMemberships(ctx context.Cont } req.Header.Set("Accept", "application/problem+json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -987,7 +989,9 @@ func (s *ControlPlaneGroups) PostControlPlanesIDGroupMembershipsAdd(ctx context. } req.Header.Set("Accept", "application/problem+json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1279,7 +1283,9 @@ func (s *ControlPlaneGroups) PostControlPlanesIDGroupMembershipsRemove(ctx conte } req.Header.Set("Accept", "application/problem+json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/controlplanes.go b/controlplanes.go index c01db52..7c0c1af 100644 --- a/controlplanes.go +++ b/controlplanes.go @@ -365,7 +365,9 @@ func (s *ControlPlanes) CreateControlPlane(ctx context.Context, request componen } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1003,7 +1005,9 @@ func (s *ControlPlanes) UpdateControlPlane(ctx context.Context, id string, updat } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/custompluginschemas.go b/custompluginschemas.go index 6336263..70975b2 100644 --- a/custompluginschemas.go +++ b/custompluginschemas.go @@ -349,7 +349,9 @@ func (s *CustomPluginSchemas) CreatePluginSchemas(ctx context.Context, controlPl } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1143,7 +1145,9 @@ func (s *CustomPluginSchemas) UpdatePluginSchemas(ctx context.Context, request o } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/docs/sdks/authsettings/README.md b/docs/sdks/authsettings/README.md index 68dcd29..f27046b 100644 --- a/docs/sdks/authsettings/README.md +++ b/docs/sdks/authsettings/README.md @@ -337,7 +337,11 @@ func main() { }), ) - res, err := s.AuthSettings.PatchTeamGroupMappings(ctx, &components.PatchTeamGroupMappings{}) + res, err := s.AuthSettings.PatchTeamGroupMappings(ctx, &components.PatchTeamGroupMappings{ + Data: []components.Data{ + components.Data{}, + }, + }) if err != nil { log.Fatal(err) } diff --git a/dpcertificates.go b/dpcertificates.go index 525d749..c822208 100644 --- a/dpcertificates.go +++ b/dpcertificates.go @@ -286,7 +286,9 @@ func (s *DPCertificates) CreateDataplaneCertificate(ctx context.Context, control } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/hmacauthcredentials.go b/hmacauthcredentials.go index 14edea4..ba769b8 100644 --- a/hmacauthcredentials.go +++ b/hmacauthcredentials.go @@ -280,7 +280,9 @@ func (s *HMACAuthCredentials) CreateHmacAuthWithConsumer(ctx context.Context, re } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -856,7 +858,9 @@ func (s *HMACAuthCredentials) UpsertHmacAuthWithConsumer(ctx context.Context, re } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/impersonationsettings.go b/impersonationsettings.go index 31ed5dd..bd9d90d 100644 --- a/impersonationsettings.go +++ b/impersonationsettings.go @@ -317,7 +317,9 @@ func (s *ImpersonationSettings) UpdateImpersonationSettings(ctx context.Context, } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/invites.go b/invites.go index aa903fe..6710649 100644 --- a/invites.go +++ b/invites.go @@ -80,7 +80,9 @@ func (s *Invites) InviteUser(ctx context.Context, request *components.InviteUser } req.Header.Set("Accept", "application/problem+json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/jwts.go b/jwts.go index 241a21a..60ed522 100644 --- a/jwts.go +++ b/jwts.go @@ -280,7 +280,9 @@ func (s *JWTs) CreateJwtWithConsumer(ctx context.Context, request operations.Cre } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -856,7 +858,9 @@ func (s *JWTs) UpsertJwtWithConsumer(ctx context.Context, request operations.Ups } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/keys.go b/keys.go index c389256..207d6a6 100644 --- a/keys.go +++ b/keys.go @@ -281,7 +281,9 @@ func (s *Keys) CreateKeyWithKeySet(ctx context.Context, request operations.Creat } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -857,7 +859,9 @@ func (s *Keys) UpsertKeyWithKeySet(ctx context.Context, request operations.Upser } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1285,7 +1289,9 @@ func (s *Keys) CreateKey(ctx context.Context, controlPlaneID string, key compone } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1934,7 +1940,9 @@ func (s *Keys) UpsertKey(ctx context.Context, request operations.UpsertKeyReques } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/keysets.go b/keysets.go index 26d5caa..9f7e910 100644 --- a/keysets.go +++ b/keysets.go @@ -307,7 +307,9 @@ func (s *KeySets) CreateKeySet(ctx context.Context, controlPlaneID string, keySe } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -956,7 +958,9 @@ func (s *KeySets) UpsertKeySet(ctx context.Context, request operations.UpsertKey } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/mtlsauthcredentials.go b/mtlsauthcredentials.go index a0d845b..1de2621 100644 --- a/mtlsauthcredentials.go +++ b/mtlsauthcredentials.go @@ -280,7 +280,9 @@ func (s *MTLSAuthCredentials) CreateMtlsAuthWithConsumer(ctx context.Context, re } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -856,7 +858,9 @@ func (s *MTLSAuthCredentials) UpsertMtlsAuthWithConsumer(ctx context.Context, re } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/plugins.go b/plugins.go index 0ce966f..9f37951 100644 --- a/plugins.go +++ b/plugins.go @@ -286,7 +286,9 @@ func (s *Plugins) CreatePluginWithConsumerGroup(ctx context.Context, request ope } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -862,7 +864,9 @@ func (s *Plugins) UpsertPluginWithConsumerGroup(ctx context.Context, request ope } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1264,7 +1268,9 @@ func (s *Plugins) CreatePluginWithConsumer(ctx context.Context, request operatio } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1840,7 +1846,9 @@ func (s *Plugins) UpsertPluginWithConsumer(ctx context.Context, request operatio } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -2268,7 +2276,9 @@ func (s *Plugins) CreatePlugin(ctx context.Context, controlPlaneID string, plugi } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -2917,7 +2927,9 @@ func (s *Plugins) UpsertPlugin(ctx context.Context, request operations.UpsertPlu } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -3340,7 +3352,9 @@ func (s *Plugins) CreatePluginWithRoute(ctx context.Context, request operations. } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -3916,7 +3930,9 @@ func (s *Plugins) UpsertPluginWithRoute(ctx context.Context, request operations. } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -4519,7 +4535,9 @@ func (s *Plugins) CreatePluginWithService(ctx context.Context, request operation } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -5095,7 +5113,9 @@ func (s *Plugins) UpsertPluginWithService(ctx context.Context, request operation } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/roles.go b/roles.go index 8bdcc2a..7f8e5b0 100644 --- a/roles.go +++ b/roles.go @@ -610,7 +610,9 @@ func (s *Roles) TeamsAssignRole(ctx context.Context, teamID string, assignRole * } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1431,7 +1433,9 @@ func (s *Roles) UsersAssignRole(ctx context.Context, userID string, assignRole * } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/routes.go b/routes.go index 3b825e0..360faad 100644 --- a/routes.go +++ b/routes.go @@ -330,7 +330,9 @@ func (s *Routes) CreateRoute(ctx context.Context, controlPlaneID string, route c } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -979,7 +981,9 @@ func (s *Routes) UpsertRoute(ctx context.Context, request operations.UpsertRoute } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1402,7 +1406,9 @@ func (s *Routes) CreateRouteWithService(ctx context.Context, request operations. } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1978,7 +1984,9 @@ func (s *Routes) UpsertRouteWithService(ctx context.Context, request operations. } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/sdk.go b/sdk.go index bc2adf4..aa1fcd8 100644 --- a/sdk.go +++ b/sdk.go @@ -264,9 +264,9 @@ func New(opts ...SDKOption) *SDK { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.1", - SDKVersion: "0.1.19", - GenVersion: "2.486.6", - UserAgent: "speakeasy-sdk/go 0.1.19 2.486.6 0.0.1 github.com/Kong/sdk-konnect-go", + SDKVersion: "0.1.20", + GenVersion: "2.493.11", + UserAgent: "speakeasy-sdk/go 0.1.20 2.493.11 0.0.1 github.com/Kong/sdk-konnect-go", Hooks: hooks.New(), }, } diff --git a/services.go b/services.go index 8e0d256..8758fab 100644 --- a/services.go +++ b/services.go @@ -313,7 +313,9 @@ func (s *Services) CreateService(ctx context.Context, controlPlaneID string, ser } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -962,7 +964,9 @@ func (s *Services) UpsertService(ctx context.Context, request operations.UpsertS } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/snis.go b/snis.go index d368136..d5e786d 100644 --- a/snis.go +++ b/snis.go @@ -283,7 +283,9 @@ func (s *SNIs) CreateSniWithCertificate(ctx context.Context, request operations. } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -859,7 +861,9 @@ func (s *SNIs) UpsertSniWithCertificate(ctx context.Context, request operations. } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1287,7 +1291,9 @@ func (s *SNIs) CreateSni(ctx context.Context, controlPlaneID string, sni compone } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -1936,7 +1942,9 @@ func (s *SNIs) UpsertSni(ctx context.Context, request operations.UpsertSniReques } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/systemaccounts.go b/systemaccounts.go index 87d1bfc..1a3aa54 100644 --- a/systemaccounts.go +++ b/systemaccounts.go @@ -323,7 +323,9 @@ func (s *SystemAccounts) PostSystemAccounts(ctx context.Context, request *compon } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -816,7 +818,9 @@ func (s *SystemAccounts) PatchSystemAccountsID(ctx context.Context, accountID st } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/systemaccountsaccesstokens.go b/systemaccountsaccesstokens.go index 51e14de..5414a8f 100644 --- a/systemaccountsaccesstokens.go +++ b/systemaccountsaccesstokens.go @@ -348,7 +348,9 @@ func (s *SystemAccountsAccessTokens) PostSystemAccountsIDAccessTokens(ctx contex } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -858,7 +860,9 @@ func (s *SystemAccountsAccessTokens) PatchSystemAccountsIDAccessTokensID(ctx con } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/systemaccountsroles.go b/systemaccountsroles.go index 9e3f923..10f6db7 100644 --- a/systemaccountsroles.go +++ b/systemaccountsroles.go @@ -353,7 +353,9 @@ func (s *SystemAccountsRoles) PostSystemAccountsAccountIDAssignedRoles(ctx conte } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/systemaccountsteammembership.go b/systemaccountsteammembership.go index 71be46a..12a9fda 100644 --- a/systemaccountsteammembership.go +++ b/systemaccountsteammembership.go @@ -570,7 +570,9 @@ func (s *SystemAccountsTeamMembership) PostTeamsTeamIDSystemAccounts(ctx context } req.Header.Set("Accept", "application/problem+json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/targets.go b/targets.go index f0cd772..1fc2fd5 100644 --- a/targets.go +++ b/targets.go @@ -280,7 +280,9 @@ func (s *Targets) CreateTargetWithUpstream(ctx context.Context, request operatio } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -856,7 +858,9 @@ func (s *Targets) UpsertTargetWithUpstream(ctx context.Context, request operatio } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/teammembership.go b/teammembership.go index 73dfdac..f2da447 100644 --- a/teammembership.go +++ b/teammembership.go @@ -325,7 +325,9 @@ func (s *TeamMembership) AddUserToTeam(ctx context.Context, teamID string, addUs } req.Header.Set("Accept", "application/problem+json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/teams.go b/teams.go index bc34315..84c6d82 100644 --- a/teams.go +++ b/teams.go @@ -321,7 +321,9 @@ func (s *Teams) CreateTeam(ctx context.Context, request *components.CreateTeam, } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -810,7 +812,9 @@ func (s *Teams) UpdateTeam(ctx context.Context, teamID string, updateTeam *compo } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/upstreams.go b/upstreams.go index 83b3a4b..7aa54fd 100644 --- a/upstreams.go +++ b/upstreams.go @@ -310,7 +310,9 @@ func (s *Upstreams) CreateUpstream(ctx context.Context, controlPlaneID string, u } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -959,7 +961,9 @@ func (s *Upstreams) UpsertUpstream(ctx context.Context, request operations.Upser } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/users.go b/users.go index 8afa042..db31d1b 100644 --- a/users.go +++ b/users.go @@ -546,7 +546,9 @@ func (s *Users) UpdateUser(ctx context.Context, userID string, updateUser *compo } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err diff --git a/vaults.go b/vaults.go index 3c61ebd..001558d 100644 --- a/vaults.go +++ b/vaults.go @@ -313,7 +313,9 @@ func (s *Vaults) CreateVault(ctx context.Context, controlPlaneID string, vault c } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -962,7 +964,9 @@ func (s *Vaults) UpsertVault(ctx context.Context, request operations.UpsertVault } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err