Skip to content

Commit

Permalink
feat(sdk): automated oas update (#30)
Browse files Browse the repository at this point in the history
* feat(sdk): automated oas update

* Bump .speakeasy/gen.yaml based on label

* Update provider based on openapi.yaml changes

---------

Co-authored-by: pmalek <pmalek@users.noreply.github.com>
Co-authored-by: team-k8s-bot <team-k8s-bot@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 13, 2024
1 parent a1abfc9 commit 4632656
Show file tree
Hide file tree
Showing 101 changed files with 1,693 additions and 526 deletions.
28 changes: 14 additions & 14 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
lockVersion: 2.0.0
id: b81e5def-5b1e-4753-ae7c-0efccc2e6f61
management:
docChecksum: f777507689e9cee350ab6cce0ce0c4c9
docChecksum: e7f0997368d05f4181c30c542b81c1b8
docVersion: 0.0.1
speakeasyVersion: 1.448.2
generationVersion: 2.467.4
releaseVersion: 0.1.11
configChecksum: 8a6943464f649367a254aeacf4fc469c
speakeasyVersion: 1.455.1
generationVersion: 2.479.3
releaseVersion: 0.1.12
configChecksum: 8969566b3caede08d8673179ed758403
features:
go:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.6
core: 3.5.17
deepObjectParams: 0.1.0
core: 3.6.0
deepObjectParams: 0.1.1
defaultEnabledRetries: 0.2.0
envVarSecurityUsage: 0.3.2
flattening: 2.81.1
Expand Down Expand Up @@ -1954,7 +1954,7 @@ examples:
parameters:
path:
controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458"
ConsumerId: "123e4567-e89b-12d3-a456-426614174000"
ConsumerId: "c1059869-6fa7-4329-a5f5-5946d14ca2c5"
responses:
"401":
application/json: {"message": "<value>", "status": 616749}
Expand All @@ -1965,7 +1965,7 @@ examples:
parameters:
path:
controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458"
ConsumerId: "123e4567-e89b-12d3-a456-426614174000"
ConsumerId: "c1059869-6fa7-4329-a5f5-5946d14ca2c5"
requestBody:
application/json: {"custom_id": "4200", "id": "8a388226-80e8-4027-a486-25e4f7db5d21", "tags": ["silver-tier"], "username": "bob-the-builder"}
responses:
Expand All @@ -1978,7 +1978,7 @@ examples:
parameters:
path:
controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458"
ConsumerId: "123e4567-e89b-12d3-a456-426614174000"
ConsumerId: "c1059869-6fa7-4329-a5f5-5946d14ca2c5"
responses:
"401":
application/json: {"message": "<value>", "status": 265954}
Expand Down Expand Up @@ -3741,7 +3741,7 @@ examples:
parameters:
path:
controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458"
ConsumerId: "123e4567-e89b-12d3-a456-426614174000"
ConsumerId: "c1059869-6fa7-4329-a5f5-5946d14ca2c5"
query:
tags: "tag1,tag2"
put-control-planes-id-group-memberships:
Expand Down Expand Up @@ -3827,7 +3827,7 @@ examples:
parameters:
path:
controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458"
ConsumerId: "123e4567-e89b-12d3-a456-426614174000"
ConsumerId: "c1059869-6fa7-4329-a5f5-5946d14ca2c5"
requestBody:
application/json: {"group": "fedee695-2ae2-4e45-877a-776d9b2fc793"}
responses:
Expand All @@ -3838,7 +3838,7 @@ examples:
parameters:
path:
controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458"
ConsumerId: "123e4567-e89b-12d3-a456-426614174000"
ConsumerId: "c1059869-6fa7-4329-a5f5-5946d14ca2c5"
ConsumerGroupId: ""
list-plugin-with-consumer_group:
"":
Expand Down Expand Up @@ -4038,7 +4038,7 @@ examples:
parameters:
path:
controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458"
ConsumerId: "123e4567-e89b-12d3-a456-426614174000"
ConsumerId: "c1059869-6fa7-4329-a5f5-5946d14ca2c5"
get-hmac-auth:
"":
parameters:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
go:
version: 0.1.11
version: 0.1.12
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithSecurity(components.Security{
PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
}),
)

ctx := context.Background()
res, err := s.ControlPlanes.ListControlPlanes(ctx, operations.ListControlPlanesRequest{
PageSize: sdkkonnectgo.Int64(10),
PageNumber: sdkkonnectgo.Int64(1),
Expand Down Expand Up @@ -119,14 +120,15 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithServerIndex(3),
sdkkonnectgo.WithSecurity(components.Security{
PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
}),
)

ctx := context.Background()
res, err := s.ControlPlanes.ListControlPlanes(ctx, operations.ListControlPlanesRequest{
PageSize: sdkkonnectgo.Int64(10),
PageNumber: sdkkonnectgo.Int64(1),
Expand Down Expand Up @@ -161,14 +163,15 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithServerURL("https://global.api.konghq.com"),
sdkkonnectgo.WithSecurity(components.Security{
PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
}),
)

ctx := context.Background()
res, err := s.ControlPlanes.ListControlPlanes(ctx, operations.ListControlPlanesRequest{
PageSize: sdkkonnectgo.Int64(10),
PageNumber: sdkkonnectgo.Int64(1),
Expand Down Expand Up @@ -203,13 +206,14 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithSecurity(components.Security{
PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
}),
)

ctx := context.Background()
res, err := s.Authentication.AuthenticateSso(ctx, "<value>", nil, operations.WithServerURL("https://global.api.konghq.com/"))
if err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -277,13 +281,14 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithSecurity(components.Security{
PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
}),
)

ctx := context.Background()
res, err := s.ControlPlanes.ListControlPlanes(ctx, operations.ListControlPlanesRequest{
PageSize: sdkkonnectgo.Int64(10),
PageNumber: sdkkonnectgo.Int64(1),
Expand Down Expand Up @@ -344,13 +349,14 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithSecurity(components.Security{
PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
}),
)

ctx := context.Background()
res, err := s.ControlPlanes.ListControlPlanes(ctx, operations.ListControlPlanesRequest{
PageSize: sdkkonnectgo.Int64(10),
PageNumber: sdkkonnectgo.Int64(1),
Expand Down Expand Up @@ -394,6 +400,8 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithRetryConfig(
retry.Config{
Expand All @@ -411,7 +419,6 @@ func main() {
}),
)

ctx := context.Background()
res, err := s.ControlPlanes.ListControlPlanes(ctx, operations.ListControlPlanesRequest{
PageSize: sdkkonnectgo.Int64(10),
PageNumber: sdkkonnectgo.Int64(1),
Expand Down
3 changes: 2 additions & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import (
)

func main() {
ctx := context.Background()

s := sdkkonnectgo.New(
sdkkonnectgo.WithSecurity(components.Security{
PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
}),
)

ctx := context.Background()
res, err := s.ControlPlanes.ListControlPlanes(ctx, operations.ListControlPlanesRequest{
PageSize: sdkkonnectgo.Int64(10),
PageNumber: sdkkonnectgo.Int64(1),
Expand Down
28 changes: 28 additions & 0 deletions acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ func (s *ACLs) ListACL(ctx context.Context, request operations.ListACLRequest, o
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -292,6 +296,10 @@ func (s *ACLs) GetACL(ctx context.Context, aclID string, controlPlaneID string,
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -506,6 +514,10 @@ func (s *ACLs) ListACLWithConsumer(ctx context.Context, request operations.ListA
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -699,6 +711,10 @@ func (s *ACLs) CreateACLWithConsumer(ctx context.Context, request operations.Cre
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -886,6 +902,10 @@ func (s *ACLs) DeleteACLWithConsumer(ctx context.Context, request operations.Del
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -1053,6 +1073,10 @@ func (s *ACLs) GetACLWithConsumer(ctx context.Context, request operations.GetACL
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -1248,6 +1272,10 @@ func (s *ACLs) UpsertACLWithConsumer(ctx context.Context, request operations.Ups
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down
28 changes: 28 additions & 0 deletions apikeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ func (s *APIKeys) ListKeyAuthWithConsumer(ctx context.Context, request operation
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -272,6 +276,10 @@ func (s *APIKeys) CreateKeyAuthWithConsumer(ctx context.Context, request operati
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -459,6 +467,10 @@ func (s *APIKeys) DeleteKeyAuthWithConsumer(ctx context.Context, request operati
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -626,6 +638,10 @@ func (s *APIKeys) GetKeyAuthWithConsumer(ctx context.Context, request operations
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -821,6 +837,10 @@ func (s *APIKeys) UpsertKeyAuthWithConsumer(ctx context.Context, request operati
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -1012,6 +1032,10 @@ func (s *APIKeys) ListKeyAuth(ctx context.Context, request operations.ListKeyAut
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -1225,6 +1249,10 @@ func (s *APIKeys) GetKeyAuth(ctx context.Context, keyAuthID string, controlPlane
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down
4 changes: 4 additions & 0 deletions authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func (s *Authentication) AuthenticateSso(ctx context.Context, organizationLoginP
return nil, err
}

for k, v := range o.SetHeaders {
req.Header.Set(k, v)
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down
Loading

0 comments on commit 4632656

Please sign in to comment.