mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-09 20:47:45 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.227.0
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}) {
|
||||
func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}, globals map[string]map[string]map[string]interface{}) {
|
||||
headerParamsStructType := reflect.TypeOf(headers)
|
||||
headerParamsValType := reflect.ValueOf(headers)
|
||||
|
||||
@@ -18,6 +18,8 @@ func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}
|
||||
fieldType := headerParamsStructType.Field(i)
|
||||
valType := headerParamsValType.Field(i)
|
||||
|
||||
valType = populateFromGlobals(fieldType, valType, "header", globals)
|
||||
|
||||
tag := parseParamTag(headerParamTagKey, fieldType, "simple", false)
|
||||
if tag == nil {
|
||||
continue
|
||||
|
||||
@@ -63,7 +63,7 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
utils.PopulateHeaders(ctx, req, request)
|
||||
utils.PopulateHeaders(ctx, req, request, nil)
|
||||
|
||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||
@@ -178,7 +178,7 @@ func (s *Plex) GetToken(ctx context.Context, request operations.GetTokenRequest,
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
utils.PopulateHeaders(ctx, req, request)
|
||||
utils.PopulateHeaders(ctx, req, request, nil)
|
||||
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
|
||||
@@ -267,8 +267,8 @@ func New(opts ...SDKOption) *PlexAPI {
|
||||
Language: "go",
|
||||
OpenAPIDocVersion: "0.0.3",
|
||||
SDKVersion: "0.0.1",
|
||||
GenVersion: "2.286.4",
|
||||
UserAgent: "speakeasy-sdk/go 0.0.1 2.286.4 0.0.3 github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk",
|
||||
GenVersion: "2.291.0",
|
||||
UserAgent: "speakeasy-sdk/go 0.0.1 2.291.0 0.0.3 github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk",
|
||||
ServerDefaults: []map[string]string{
|
||||
{
|
||||
"protocol": "http",
|
||||
|
||||
Reference in New Issue
Block a user