@@ -96,10 +96,10 @@ public class ApiEndpoints: IApiEndpoints
96
96
{
97
97
public SDKConfig Config { get ; private set ; }
98
98
private const string _language = "csharp" ;
99
- private const string _sdkVersion = "2.1 .0" ;
100
- private const string _sdkGenVersion = "2.185.0 " ;
99
+ private const string _sdkVersion = "2.2 .0" ;
100
+ private const string _sdkGenVersion = "2.192.1 " ;
101
101
private const string _openapiDocVersion = "0.3.0" ;
102
- private const string _userAgent = "speakeasy-sdk/csharp 2.1 .0 2.185.0 0.3.0 SpeakeasySDK" ;
102
+ private const string _userAgent = "speakeasy-sdk/csharp 2.2 .0 2.192.1 0.3.0 SpeakeasySDK" ;
103
103
private string _serverUrl = "" ;
104
104
private ISpeakeasyHttpClient _defaultClient ;
105
105
private ISpeakeasyHttpClient _securityClient ;
@@ -115,14 +115,9 @@ public ApiEndpoints(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient sec
115
115
116
116
public async Task < DeleteApiEndpointResponse > DeleteApiEndpointAsync ( DeleteApiEndpointRequest ? request = null )
117
117
{
118
- string baseUrl = _serverUrl ;
119
- if ( baseUrl . EndsWith ( "/" ) )
120
- {
121
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
122
- }
118
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
123
119
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}" , request ) ;
124
120
125
-
126
121
var httpRequest = new HttpRequestMessage ( HttpMethod . Delete , urlString ) ;
127
122
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
128
123
@@ -152,14 +147,9 @@ public async Task<DeleteApiEndpointResponse> DeleteApiEndpointAsync(DeleteApiEnd
152
147
153
148
public async Task < FindApiEndpointResponse > FindApiEndpointAsync ( FindApiEndpointRequest ? request = null )
154
149
{
155
- string baseUrl = _serverUrl ;
156
- if ( baseUrl . EndsWith ( "/" ) )
157
- {
158
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
159
- }
150
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
160
151
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}" , request ) ;
161
152
162
-
163
153
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
164
154
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
165
155
@@ -193,14 +183,9 @@ public async Task<FindApiEndpointResponse> FindApiEndpointAsync(FindApiEndpointR
193
183
194
184
public async Task < GenerateOpenApiSpecForApiEndpointResponse > GenerateOpenApiSpecForApiEndpointAsync ( GenerateOpenApiSpecForApiEndpointRequest ? request = null )
195
185
{
196
- string baseUrl = _serverUrl ;
197
- if ( baseUrl . EndsWith ( "/" ) )
198
- {
199
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
200
- }
186
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
201
187
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi" , request ) ;
202
188
203
-
204
189
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
205
190
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
206
191
@@ -234,14 +219,9 @@ public async Task<GenerateOpenApiSpecForApiEndpointResponse> GenerateOpenApiSpec
234
219
235
220
public async Task < GeneratePostmanCollectionForApiEndpointResponse > GeneratePostmanCollectionForApiEndpointAsync ( GeneratePostmanCollectionForApiEndpointRequest ? request = null )
236
221
{
237
- string baseUrl = _serverUrl ;
238
- if ( baseUrl . EndsWith ( "/" ) )
239
- {
240
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
241
- }
222
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
242
223
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman" , request ) ;
243
224
244
-
245
225
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
246
226
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
247
227
@@ -275,14 +255,9 @@ public async Task<GeneratePostmanCollectionForApiEndpointResponse> GeneratePostm
275
255
276
256
public async Task < GetAllApiEndpointsResponse > GetAllApiEndpointsAsync ( GetAllApiEndpointsRequest ? request = null )
277
257
{
278
- string baseUrl = _serverUrl ;
279
- if ( baseUrl . EndsWith ( "/" ) )
280
- {
281
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
282
- }
258
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
283
259
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/api_endpoints" , request ) ;
284
260
285
-
286
261
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
287
262
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
288
263
@@ -316,14 +291,9 @@ public async Task<GetAllApiEndpointsResponse> GetAllApiEndpointsAsync(GetAllApiE
316
291
317
292
public async Task < GetAllForVersionApiEndpointsResponse > GetAllForVersionApiEndpointsAsync ( GetAllForVersionApiEndpointsRequest ? request = null )
318
293
{
319
- string baseUrl = _serverUrl ;
320
- if ( baseUrl . EndsWith ( "/" ) )
321
- {
322
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
323
- }
294
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
324
295
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/version/{versionID}/api_endpoints" , request ) ;
325
296
326
-
327
297
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
328
298
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
329
299
@@ -357,14 +327,9 @@ public async Task<GetAllForVersionApiEndpointsResponse> GetAllForVersionApiEndpo
357
327
358
328
public async Task < GetApiEndpointResponse > GetApiEndpointAsync ( GetApiEndpointRequest ? request = null )
359
329
{
360
- string baseUrl = _serverUrl ;
361
- if ( baseUrl . EndsWith ( "/" ) )
362
- {
363
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
364
- }
330
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
365
331
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}" , request ) ;
366
332
367
-
368
333
var httpRequest = new HttpRequestMessage ( HttpMethod . Get , urlString ) ;
369
334
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
370
335
@@ -398,14 +363,9 @@ public async Task<GetApiEndpointResponse> GetApiEndpointAsync(GetApiEndpointRequ
398
363
399
364
public async Task < UpsertApiEndpointResponse > UpsertApiEndpointAsync ( UpsertApiEndpointRequest request )
400
365
{
401
- string baseUrl = _serverUrl ;
402
- if ( baseUrl . EndsWith ( "/" ) )
403
- {
404
- baseUrl = baseUrl . Substring ( 0 , baseUrl . Length - 1 ) ;
405
- }
366
+ string baseUrl = this . Config . GetTemplatedServerDetails ( ) ;
406
367
var urlString = URLBuilder . Build ( baseUrl , "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}" , request ) ;
407
368
408
-
409
369
var httpRequest = new HttpRequestMessage ( HttpMethod . Put , urlString ) ;
410
370
httpRequest . Headers . Add ( "user-agent" , _userAgent ) ;
411
371
0 commit comments