Skip to content

Commit 30567ee

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.454.2
1 parent b22efa4 commit 30567ee

File tree

384 files changed

+7761
-10908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

384 files changed

+7761
-10908
lines changed

.speakeasy/gen.lock

Lines changed: 497 additions & 206 deletions
Large diffs are not rendered by default.

.speakeasy/workflow.lock

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
speakeasyVersion: 1.400.0
1+
speakeasyVersion: 1.454.2
22
sources:
33
speakeasy:
44
sourceNamespace: speakeasy
5-
sourceRevisionDigest: sha256:780f67279a06564bd229dec0bc85843b7304309e58668de26325742aa8c7b921
6-
sourceBlobDigest: sha256:88704527b94e0f552679a1b9305054543883de59097a5102e669d5f049d7929e
5+
sourceRevisionDigest: sha256:c19cafb1dad12ca2fe2fcc0a7db9275e6976530287fd4beb5383dd70ff050fcd
6+
sourceBlobDigest: sha256:57b066b6505966df2aab772bec5bd33880a1a448bb68083b0a10cb6a5113edd5
77
tags:
88
- latest
9-
- main
9+
- speakeasy-sdk-regen-1727137180
10+
- 0.4.0
1011
targets:
1112
speakeasy-client-sdk-csharp:
1213
source: speakeasy
1314
sourceNamespace: speakeasy
14-
sourceRevisionDigest: sha256:780f67279a06564bd229dec0bc85843b7304309e58668de26325742aa8c7b921
15-
sourceBlobDigest: sha256:88704527b94e0f552679a1b9305054543883de59097a5102e669d5f049d7929e
15+
sourceRevisionDigest: sha256:c19cafb1dad12ca2fe2fcc0a7db9275e6976530287fd4beb5383dd70ff050fcd
16+
sourceBlobDigest: sha256:57b066b6505966df2aab772bec5bd33880a1a448bb68083b0a10cb6a5113edd5
1617
codeSamplesNamespace: code-samples-csharp-speakeasy-client-sdk-csharp
17-
codeSamplesRevisionDigest: sha256:f4c81795d8921b1fc5c4ada4b7c29196d1435a034ec4c259d2c889209884384e
18+
codeSamplesRevisionDigest: sha256:960329b9d24404012b561aea0f5c1385aea823bf3d36c2c0b47eb99a060d3a20
1819
workflow:
1920
workflowVersion: 1.0.0
2021
speakeasyVersion: latest

NUGET.md

Lines changed: 140 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,83 @@
88

99
```csharp
1010
using SpeakeasySDK;
11-
using SpeakeasySDK.Models.Operations;
12-
using System.Collections.Generic;
1311
using SpeakeasySDK.Models.Shared;
12+
using System.Collections.Generic;
1413

1514
var sdk = new SDK(security: new Security() {
1615
APIKey = "<YOUR_API_KEY_HERE>",
1716
});
1817

19-
GetApisRequest req = new GetApisRequest() {};
18+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
19+
Languages = new List<string>() {
20+
"<value>",
21+
},
22+
SchemaFile = new SchemaFile() {
23+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
24+
FileName = "example.file",
25+
},
26+
};
2027

21-
var res = await sdk.Apis.GetApisAsync(req);
28+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
2229

2330
// handle response
2431
```
2532
<!-- End SDK Example Usage [usage] -->
2633

27-
<!-- Start Global Parameters [global-parameters] -->
28-
## Global Parameters
34+
<!-- Start Authentication [security] -->
35+
## Authentication
36+
37+
### Per-Client Security Schemes
2938

39+
This SDK supports the following security schemes globally:
40+
41+
| Name | Type | Scheme |
42+
| --------------------- | ------ | ----------- |
43+
| `APIKey` | apiKey | API key |
44+
| `Bearer` | http | HTTP Bearer |
45+
| `WorkspaceIdentifier` | apiKey | API key |
46+
47+
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
48+
```csharp
49+
using SpeakeasySDK;
50+
using SpeakeasySDK.Models.Shared;
51+
using System.Collections.Generic;
52+
53+
var sdk = new SDK(security: new Security() {
54+
APIKey = "<YOUR_API_KEY_HERE>",
55+
});
56+
57+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
58+
Languages = new List<string>() {
59+
"<value>",
60+
},
61+
SchemaFile = new SchemaFile() {
62+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
63+
FileName = "example.file",
64+
},
65+
};
66+
67+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
68+
69+
// handle response
70+
```
71+
<!-- End Authentication [security] -->
72+
73+
<!-- Start Global Parameters [global-parameters] -->
3074
## Global Parameters
3175

3276
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
3377

34-
For example, you can set `workspaceID` to `"<value>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetWorkspace`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
78+
For example, you can set `workspace_id` to `"<id>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetAccessToken`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
3579

3680

3781
### Available Globals
3882

3983
The following global parameter is available.
4084

41-
| Name | Type | Required | Description |
42-
| ---- | ---- |:--------:| ----------- |
43-
| workspaceID | string | | The WorkspaceID parameter. |
44-
85+
| Name | Type | Description |
86+
| ----------- | ------ | -------------------------- |
87+
| workspaceId | string | The WorkspaceId parameter. |
4588

4689
### Example
4790

@@ -50,13 +93,13 @@ using SpeakeasySDK;
5093
using SpeakeasySDK.Models.Operations;
5194
using SpeakeasySDK.Models.Shared;
5295

53-
var sdk = new SDK(security: new Security() {
54-
APIKey = "<YOUR_API_KEY_HERE>",
55-
});
96+
var sdk = new SDK();
5697

57-
GetWorkspaceRequest req = new GetWorkspaceRequest() {};
98+
GetAccessTokenRequest req = new GetAccessTokenRequest() {
99+
WorkspaceId = "<id>",
100+
};
58101

59-
var res = await sdk.Workspaces.GetWorkspaceAsync(req);
102+
var res = await sdk.Auth.GetAccessTokenAsync(req);
60103

61104
// handle response
62105
```
@@ -79,7 +122,7 @@ var sdk = new SDK(security: new Security() {
79122

80123
GetWorkspaceAccessRequest req = new GetWorkspaceAccessRequest() {};
81124

82-
var res = await sdk.Auth.GetWorkspaceAccessAsync(
125+
var res = await sdk.Auth.GetAccessAsync(
83126
retryConfig: new RetryConfig(
84127
strategy: RetryConfig.RetryStrategy.BACKOFF,
85128
backoff: new BackoffStrategy(
@@ -89,7 +132,9 @@ var res = await sdk.Auth.GetWorkspaceAccessAsync(
89132
exponent: 1.1
90133
),
91134
retryConnectionErrors: false
92-
),req);
135+
),
136+
req
137+
);
93138

94139
// handle response
95140
```
@@ -118,7 +163,7 @@ var sdk = new SDK(
118163

119164
GetWorkspaceAccessRequest req = new GetWorkspaceAccessRequest() {};
120165

121-
var res = await sdk.Auth.GetWorkspaceAccessAsync(req);
166+
var res = await sdk.Auth.GetAccessAsync(req);
122167

123168
// handle response
124169
```
@@ -127,19 +172,29 @@ var res = await sdk.Auth.GetWorkspaceAccessAsync(req);
127172
<!-- Start Error Handling [errors] -->
128173
## Error Handling
129174

130-
Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type.
175+
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.
176+
177+
By default, an API error will raise a `SpeakeasySDK.Models.Errors.SDKException` exception, which has the following properties:
131178

132-
| Error Object | Status Code | Content Type |
133-
| --------------------------------------- | --------------------------------------- | --------------------------------------- |
134-
| SpeakeasySDK.Models.Errors.Error | 5XX | application/json |
135-
| SpeakeasySDK.Models.Errors.SDKException | 4xx-5xx | */* |
179+
| Property | Type | Description |
180+
|---------------|-----------------------|-----------------------|
181+
| `Message` | *string* | The error message |
182+
| `StatusCode` | *int* | The HTTP status code |
183+
| `RawResponse` | *HttpResponseMessage* | The raw HTTP response |
184+
| `Body` | *string* | The response content |
185+
186+
When custom error responses are specified for an operation, the SDK may also throw their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `GenerateCodeSamplePreviewAsync` method throws the following exceptions:
187+
188+
| Error Type | Status Code | Content Type |
189+
| -------------------------------- | ----------- | ---------------- |
190+
| SpeakeasySDK.Models.Errors.Error | 4XX, 5XX | application/json |
136191

137192
### Example
138193

139194
```csharp
140195
using SpeakeasySDK;
141-
using SpeakeasySDK.Models.Operations;
142196
using SpeakeasySDK.Models.Shared;
197+
using System.Collections.Generic;
143198
using System;
144199
using SpeakeasySDK.Models.Errors;
145200

@@ -149,21 +204,31 @@ var sdk = new SDK(security: new Security() {
149204

150205
try
151206
{
152-
GetWorkspaceFeatureFlagsRequest req = new GetWorkspaceFeatureFlagsRequest() {};
153-
154-
var res = await sdk.Workspaces.GetWorkspaceFeatureFlagsAsync(req);
207+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
208+
Languages = new List<string>() {
209+
"<value>",
210+
},
211+
SchemaFile = new SchemaFile() {
212+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
213+
FileName = "example.file",
214+
},
215+
};
216+
217+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
155218

156219
// handle response
157220
}
158221
catch (Exception ex)
159222
{
160223
if (ex is Error)
161224
{
162-
// handle exception
225+
// Handle exception data
226+
throw;
163227
}
164228
else if (ex is SpeakeasySDK.Models.Errors.SDKException)
165229
{
166-
// handle exception
230+
// Handle default exception
231+
throw;
167232
}
168233
}
169234
```
@@ -176,48 +241,68 @@ catch (Exception ex)
176241

177242
You can override the default server globally by passing a server name to the `server: string` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
178243

179-
| Name | Server | Variables |
180-
| ----- | ------ | --------- |
181-
| `prod` | `https://api.prod.speakeasyapi.dev` | None |
244+
| Name | Server |
245+
| ------ | ----------------------------------- |
246+
| `prod` | `https://api.prod.speakeasyapi.dev` |
182247

248+
#### Example
183249

250+
```csharp
251+
using SpeakeasySDK;
252+
using SpeakeasySDK.Models.Shared;
253+
using System.Collections.Generic;
184254

185-
### Override Server URL Per-Client
186-
187-
The default server can also be overridden globally by passing a URL to the `serverUrl: str` optional parameter when initializing the SDK client instance. For example:
188-
<!-- End Server Selection [server] -->
255+
var sdk = new SDK(
256+
server: "prod",
257+
security: new Security() {
258+
APIKey = "<YOUR_API_KEY_HERE>",
259+
}
260+
);
189261

190-
<!-- Start Authentication [security] -->
191-
## Authentication
262+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
263+
Languages = new List<string>() {
264+
"<value>",
265+
},
266+
SchemaFile = new SchemaFile() {
267+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
268+
FileName = "example.file",
269+
},
270+
};
192271

193-
### Per-Client Security Schemes
272+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
194273

195-
This SDK supports the following security schemes globally:
274+
// handle response
275+
```
196276

197-
| Name | Type | Scheme |
198-
| ----------- | ----------- | ----------- |
199-
| `APIKey` | apiKey | API key |
200-
| `Bearer` | http | HTTP Bearer |
277+
### Override Server URL Per-Client
201278

202-
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
279+
The default server can also be overridden globally by passing a URL to the `serverUrl: string` optional parameter when initializing the SDK client instance. For example:
203280
```csharp
204281
using SpeakeasySDK;
205-
using SpeakeasySDK.Models.Operations;
206282
using SpeakeasySDK.Models.Shared;
283+
using System.Collections.Generic;
207284

208-
var sdk = new SDK(security: new Security() {
209-
APIKey = "<YOUR_API_KEY_HERE>",
210-
});
285+
var sdk = new SDK(
286+
serverUrl: "https://api.prod.speakeasyapi.dev",
287+
security: new Security() {
288+
APIKey = "<YOUR_API_KEY_HERE>",
289+
}
290+
);
211291

212-
DeleteApiRequest req = new DeleteApiRequest() {
213-
ApiID = "<value>",
214-
VersionID = "<value>",
292+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
293+
Languages = new List<string>() {
294+
"<value>",
295+
},
296+
SchemaFile = new SchemaFile() {
297+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
298+
FileName = "example.file",
299+
},
215300
};
216301

217-
var res = await sdk.Apis.DeleteApiAsync(req);
302+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
218303

219304
// handle response
220305
```
221-
<!-- End Authentication [security] -->
306+
<!-- End Server Selection [server] -->
222307

223308
<!-- Placeholder for Future Speakeasy SDK Sections -->

0 commit comments

Comments
 (0)