ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.227.0

This commit is contained in:
speakeasybot
2024-03-27 00:44:22 +00:00
parent 683823eab9
commit f3eb760757
7 changed files with 28 additions and 14 deletions

View File

@@ -3,10 +3,10 @@ id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
management:
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
docVersion: 0.0.3
speakeasyVersion: 1.213.0
generationVersion: 2.283.1
releaseVersion: 0.5.2
configChecksum: 180ba7e4c10a508e14fd2d39e146af61
speakeasyVersion: 1.227.0
generationVersion: 2.291.0
releaseVersion: 0.5.3
configChecksum: 518d95abe21d1a64d11134ba40435fa7
repoURL: https://github.com/LukeHagar/plexgo.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexgo
@@ -14,7 +14,7 @@ management:
features:
go:
constsAndDefaults: 0.1.4
core: 3.4.4
core: 3.4.5
flattening: 2.81.1
globalSecurity: 2.82.9
globalServerURLs: 2.82.2

View File

@@ -189,3 +189,13 @@ Based on:
- [go v0.5.2] .
### Releases
- [Go v0.5.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.2 - .
## 2024-03-27 00:44:06
### Changes
Based on:
- OpenAPI Doc 0.0.3
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.5.3] .
### Releases
- [Go v0.5.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.3 - .

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
go:
version: 0.5.2
version: 0.5.3
additionalDependencies: {}
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true

4
go.mod
View File

@@ -1,8 +1,10 @@
module github.com/LukeHagar/plexgo
go 1.20
require (
github.com/cenkalti/backoff/v4 v4.2.0
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05
github.com/spyzhov/ajson v0.8.0
)

View File

@@ -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

View File

@@ -68,7 +68,7 @@ func (s *Plex) GetPin(ctx context.Context, xPlexClientIdentifier string, strong
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)
@@ -193,7 +193,7 @@ func (s *Plex) GetToken(ctx context.Context, pinID string, xPlexClientIdentifier
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 {

View File

@@ -267,9 +267,9 @@ func New(opts ...SDKOption) *PlexAPI {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "0.0.3",
SDKVersion: "0.5.2",
GenVersion: "2.283.1",
UserAgent: "speakeasy-sdk/go 0.5.2 2.283.1 0.0.3 github.com/LukeHagar/plexgo",
SDKVersion: "0.5.3",
GenVersion: "2.291.0",
UserAgent: "speakeasy-sdk/go 0.5.3 2.291.0 0.0.3 github.com/LukeHagar/plexgo",
ServerDefaults: []map[string]string{
{
"protocol": "http",