Skip to content

Commit ed5f76c

Browse files
authored
Merge pull request #4 from fabra-io/speakeasy-sdk-regen-1677544405
chore: speakeasy SDK regeneration
2 parents 6720940 + c2bac05 commit ed5f76c

23 files changed

+197
-71
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,13 @@ import (
2828
)
2929

3030
func main() {
31-
opts := []fabra.SDKOption{
32-
fabra.WithSecurity(
33-
shared.Security{
34-
APIKeyAuth: shared.SchemeAPIKeyAuth{
35-
APIKey: "YOUR_API_KEY_HERE",
36-
},
31+
s := fabra.New(fabra.WithSecurity(
32+
shared.Security{
33+
APIKeyAuth: shared.SchemeAPIKeyAuth{
34+
APIKey: "YOUR_API_KEY_HERE",
3735
},
38-
),
39-
}
40-
41-
s := fabra.New(opts...)
36+
},
37+
))
4238

4339
req := operations.GetNamespacesRequest{
4440
QueryParams: operations.GetNamespacesQueryParams{

RELEASES.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,44 @@ Based on:
3030
- OpenAPI Doc 0.1.0 ./openapi.yaml
3131
- Speakeasy CLI 1.5.3 https://github.com/speakeasy-api/speakeasy
3232
### Releases
33-
- [Go v0.2.1] https://github.com/fabra-io/go-sdk/releases/tag/v0.2.1 - ./
33+
- [Go v0.2.1] https://github.com/fabra-io/go-sdk/releases/tag/v0.2.1 - ./
34+
35+
## Version 0.2.2
36+
### Changes
37+
Based on:
38+
- OpenAPI Doc 0.1.0 ./openapi.yaml
39+
- Speakeasy CLI 1.5.4 https://github.com/speakeasy-api/speakeasy
40+
### Releases
41+
- [Go v0.2.2] https://github.com/fabra-io/go-sdk/releases/tag/v0.2.2 - ./
42+
43+
## Version 0.3.0
44+
### Changes
45+
Based on:
46+
- OpenAPI Doc 0.1.0 ./openapi.yaml
47+
- Speakeasy CLI 1.6.0 https://github.com/speakeasy-api/speakeasy
48+
### Releases
49+
- [Go v0.3.0] https://github.com/fabra-io/go-sdk/releases/tag/v0.3.0 - ./
50+
51+
## Version 0.4.0
52+
### Changes
53+
Based on:
54+
- OpenAPI Doc 0.1.0 ./openapi.yaml
55+
- Speakeasy CLI 1.7.1 https://github.com/speakeasy-api/speakeasy
56+
### Releases
57+
- [Go v0.4.0] https://github.com/fabra-io/go-sdk/releases/tag/v0.4.0 - ./
58+
59+
## Version 0.5.0
60+
### Changes
61+
Based on:
62+
- OpenAPI Doc 0.1.0 ./openapi.yaml
63+
- Speakeasy CLI 1.8.2 https://github.com/speakeasy-api/speakeasy
64+
### Releases
65+
- [Go v0.5.0] https://github.com/fabra-io/go-sdk/releases/tag/v0.5.0 - ./
66+
67+
## Version 0.5.1
68+
### Changes
69+
Based on:
70+
- OpenAPI Doc 0.1.0 ./openapi.yaml
71+
- Speakeasy CLI 1.8.4 https://github.com/speakeasy-api/speakeasy
72+
### Releases
73+
- [Go v0.5.1] https://github.com/fabra-io/go-sdk/releases/tag/v0.5.1 - ./

USAGE.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@ import (
1111
)
1212

1313
func main() {
14-
opts := []fabra.SDKOption{
15-
fabra.WithSecurity(
16-
shared.Security{
17-
APIKeyAuth: shared.SchemeAPIKeyAuth{
18-
APIKey: "YOUR_API_KEY_HERE",
19-
},
14+
s := fabra.New(fabra.WithSecurity(
15+
shared.Security{
16+
APIKeyAuth: shared.SchemeAPIKeyAuth{
17+
APIKey: "YOUR_API_KEY_HERE",
2018
},
21-
),
22-
}
23-
24-
s := fabra.New(opts...)
19+
},
20+
))
2521

2622
req := operations.GetNamespacesRequest{
2723
QueryParams: operations.GetNamespacesQueryParams{

connection.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func (s *connection) GetNamespaces(ctx context.Context, request operations.GetNa
5959
res := &operations.GetNamespacesResponse{
6060
StatusCode: httpRes.StatusCode,
6161
ContentType: contentType,
62+
RawResponse: httpRes,
6263
}
6364
switch {
6465
case httpRes.StatusCode == 200:
@@ -108,6 +109,7 @@ func (s *connection) GetSchema(ctx context.Context, request operations.GetSchema
108109
res := &operations.GetSchemaResponse{
109110
StatusCode: httpRes.StatusCode,
110111
ContentType: contentType,
112+
RawResponse: httpRes,
111113
}
112114
switch {
113115
case httpRes.StatusCode == 200:
@@ -157,6 +159,7 @@ func (s *connection) GetTables(ctx context.Context, request operations.GetTables
157159
res := &operations.GetTablesResponse{
158160
StatusCode: httpRes.StatusCode,
159161
ContentType: contentType,
162+
RawResponse: httpRes,
160163
}
161164
switch {
162165
case httpRes.StatusCode == 200:

destination.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ func (s *destination) CreateDestination(ctx context.Context, request operations.
6565
res := &operations.CreateDestinationResponse{
6666
StatusCode: httpRes.StatusCode,
6767
ContentType: contentType,
68+
RawResponse: httpRes,
6869
}
6970
switch {
7071
case httpRes.StatusCode == 200:
@@ -110,6 +111,7 @@ func (s *destination) GetDestinations(ctx context.Context) (*operations.GetDesti
110111
res := &operations.GetDestinationsResponse{
111112
StatusCode: httpRes.StatusCode,
112113
ContentType: contentType,
114+
RawResponse: httpRes,
113115
}
114116
switch {
115117
case httpRes.StatusCode == 200:

fabra.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ type HTTPClient interface {
1515
Do(req *http.Request) (*http.Response, error)
1616
}
1717

18+
// String provides a helper function to return a pointer to a string
19+
func String(s string) *string { return &s }
20+
1821
type Fabra struct {
1922
Connection *connection
2023
Destination *destination
@@ -34,7 +37,13 @@ type Fabra struct {
3437

3538
type SDKOption func(*Fabra)
3639

37-
func WithServerURL(serverURL string, params map[string]string) SDKOption {
40+
func WithServerURL(serverURL string) SDKOption {
41+
return func(sdk *Fabra) {
42+
sdk._serverURL = serverURL
43+
}
44+
}
45+
46+
func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption {
3847
return func(sdk *Fabra) {
3948
if params != nil {
4049
serverURL = utils.ReplaceParameters(serverURL, params)
@@ -59,8 +68,8 @@ func WithSecurity(security shared.Security) SDKOption {
5968
func New(opts ...SDKOption) *Fabra {
6069
sdk := &Fabra{
6170
_language: "go",
62-
_sdkVersion: "0.2.1",
63-
_genVersion: "1.5.3",
71+
_sdkVersion: "0.5.1",
72+
_genVersion: "1.8.4",
6473
}
6574
for _, opt := range opts {
6675
opt(sdk)

gen.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ configVersion: 1.0.0
22
management:
33
docChecksum: 5bdbad96d6d347d81789110337cf504a
44
docVersion: 0.1.0
5-
speakeasyVersion: 1.5.3
5+
speakeasyVersion: 1.8.4
66
generation:
77
telemetryEnabled: false
88
sdkClassName: fabra
99
go:
10-
version: 0.2.1
10+
version: 0.5.1
1111
packageName: github.com/fabra-io/go-sdk

object.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ func (s *object) CreateObject(ctx context.Context, request operations.CreateObje
6565
res := &operations.CreateObjectResponse{
6666
StatusCode: httpRes.StatusCode,
6767
ContentType: contentType,
68+
RawResponse: httpRes,
6869
}
6970
switch {
7071
case httpRes.StatusCode == 200:
@@ -110,6 +111,7 @@ func (s *object) GetObjects(ctx context.Context) (*operations.GetObjectsResponse
110111
res := &operations.GetObjectsResponse{
111112
StatusCode: httpRes.StatusCode,
112113
ContentType: contentType,
114+
RawResponse: httpRes,
113115
}
114116
switch {
115117
case httpRes.StatusCode == 200:

pkg/models/operations/createdestination.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package operations
22

33
import (
44
"github.com/fabra-io/go-sdk/pkg/models/shared"
5+
"net/http"
56
)
67

78
type CreateDestinationRequest struct {
@@ -15,5 +16,6 @@ type CreateDestination200ApplicationJSON struct {
1516
type CreateDestinationResponse struct {
1617
ContentType string
1718
StatusCode int
19+
RawResponse *http.Response
1820
CreateDestination200ApplicationJSONObject *CreateDestination200ApplicationJSON
1921
}

pkg/models/operations/createobject.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package operations
22

33
import (
44
"github.com/fabra-io/go-sdk/pkg/models/shared"
5+
"net/http"
56
)
67

78
type CreateObjectRequest struct {
@@ -15,5 +16,6 @@ type CreateObject200ApplicationJSON struct {
1516
type CreateObjectResponse struct {
1617
ContentType string
1718
StatusCode int
19+
RawResponse *http.Response
1820
CreateObject200ApplicationJSONObject *CreateObject200ApplicationJSON
1921
}

0 commit comments

Comments
 (0)