Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 0.4.0 ., Speakeasy CLI 1.277.8
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed May 3, 2024
1 parent cfbab28 commit 3baf540
Show file tree
Hide file tree
Showing 26 changed files with 361 additions and 54 deletions.
18 changes: 12 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
lockVersion: 2.0.0
id: f73d2126-985b-4d69-88ee-b7c69254d8bf
management:
docChecksum: e87f7661ef116d09df25c842b1032981
docChecksum: 1710218668d467d8f56c88d745bfdf80
docVersion: 0.4.0 .
speakeasyVersion: 1.277.0
generationVersion: 2.317.0
releaseVersion: 5.5.0
configChecksum: 4daefaf3e0bb29a0fc91e9bbded59249
speakeasyVersion: 1.277.8
generationVersion: 2.319.10
releaseVersion: 5.5.1
configChecksum: 95a2d0255e4222e8fcba33b5f5d4cb1a
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-csharp.git
repoSubDirectory: .
published: true
features:
csharp:
core: 3.8.0
core: 3.8.3
examples: 2.81.3
globalSecurity: 2.83.4
globalServerURLs: 2.82.3
Expand Down Expand Up @@ -114,6 +114,8 @@ generatedFiles:
- SpeakeasySDK/Models/Operations/GetRevisionsResponse.cs
- SpeakeasySDK/Models/Operations/GetTagsRequest.cs
- SpeakeasySDK/Models/Operations/GetTagsResponse.cs
- SpeakeasySDK/Models/Operations/PostTagsRequest.cs
- SpeakeasySDK/Models/Operations/PostTagsResponse.cs
- SpeakeasySDK/Models/Operations/PreflightResponse.cs
- SpeakeasySDK/Models/Operations/GetAccessTokenRequest.cs
- SpeakeasySDK/Models/Operations/GetAccessTokenResponse.cs
Expand Down Expand Up @@ -171,6 +173,7 @@ generatedFiles:
- SpeakeasySDK/Models/Shared/Revision.cs
- SpeakeasySDK/Models/Shared/GetTagsResponse.cs
- SpeakeasySDK/Models/Shared/Tag.cs
- SpeakeasySDK/Models/Shared/AddTags.cs
- SpeakeasySDK/Models/Shared/PreflightToken.cs
- SpeakeasySDK/Models/Shared/PreflightRequest.cs
- SpeakeasySDK/Models/Shared/Claims.cs
Expand Down Expand Up @@ -264,6 +267,8 @@ generatedFiles:
- docs/Models/Operations/GetRevisionsResponse.md
- docs/Models/Operations/GetTagsRequest.md
- docs/Models/Operations/GetTagsResponse.md
- docs/Models/Operations/PostTagsRequest.md
- docs/Models/Operations/PostTagsResponse.md
- docs/Models/Operations/PreflightResponse.md
- docs/Models/Operations/GetAccessTokenRequest.md
- docs/Models/Operations/GetAccessTokenResponse.md
Expand Down Expand Up @@ -321,6 +326,7 @@ generatedFiles:
- docs/Models/Shared/Revision.md
- docs/Models/Shared/GetTagsResponse.md
- docs/Models/Shared/Tag.md
- docs/Models/Shared/AddTags.md
- docs/Models/Shared/PreflightToken.md
- docs/Models/Shared/PreflightRequest.md
- docs/Models/Shared/Claims.md
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ var res = await sdk.Apis.GetApisAsync(req);
* [GetNamespaces](docs/sdks/artifacts/README.md#getnamespaces) - Each namespace contains many revisions.
* [GetRevisions](docs/sdks/artifacts/README.md#getrevisions)
* [GetTags](docs/sdks/artifacts/README.md#gettags)
* [PostTags](docs/sdks/artifacts/README.md#posttags) - Add tags to an existing revision
* [Preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints

### [Auth](docs/sdks/auth/README.md)
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,4 +588,14 @@ Based on:
### Generated
- [csharp v5.5.0] .
### Releases
- [NuGet v5.5.0] https://www.nuget.org/packages/SpeakeasySDK/5.5.0 - .
- [NuGet v5.5.0] https://www.nuget.org/packages/SpeakeasySDK/5.5.0 - .

## 2024-05-03 00:03:39
### Changes
Based on:
- OpenAPI Doc 0.4.0 . https://docs.speakeasyapi.dev/openapi.yaml
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
### Generated
- [csharp v5.5.1] .
### Releases
- [NuGet v5.5.1] https://www.nuget.org/packages/SpeakeasySDK/5.5.1 - .
6 changes: 3 additions & 3 deletions SpeakeasySDK/ApiEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public class ApiEndpoints: IApiEndpoints
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.5.0";
private const string _sdkGenVersion = "2.317.0";
private const string _sdkVersion = "5.5.1";
private const string _sdkGenVersion = "2.319.10";
private const string _openapiDocVersion = "0.4.0 .";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
Expand Down
6 changes: 3 additions & 3 deletions SpeakeasySDK/Apis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ public class Apis: IApis
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.5.0";
private const string _sdkGenVersion = "2.317.0";
private const string _sdkVersion = "5.5.1";
private const string _sdkGenVersion = "2.319.10";
private const string _openapiDocVersion = "0.4.0 .";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
Expand Down
99 changes: 96 additions & 3 deletions SpeakeasySDK/Artifacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public interface IArtifacts
Task<Models.Operations.GetRevisionsResponse> GetRevisionsAsync(GetRevisionsRequest request);
Task<Models.Operations.GetTagsResponse> GetTagsAsync(GetTagsRequest request);

/// <summary>
/// Add tags to an existing revision
/// </summary>
Task<PostTagsResponse> PostTagsAsync(PostTagsRequest request);

/// <summary>
/// Get access token for communicating with OCI distribution endpoints
/// </summary>
Expand All @@ -52,10 +57,10 @@ public class Artifacts: IArtifacts
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.5.0";
private const string _sdkGenVersion = "2.317.0";
private const string _sdkVersion = "5.5.1";
private const string _sdkGenVersion = "2.319.10";
private const string _openapiDocVersion = "0.4.0 .";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
Expand Down Expand Up @@ -529,6 +534,94 @@ public async Task<GetManifestResponse> GetManifestAsync(GetManifestRequest reque
}
}

public async Task<PostTagsResponse> PostTagsAsync(PostTagsRequest request)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
var urlString = URLBuilder.Build(baseUrl, "/v1/artifacts/namespaces/{namespace_name}/tags", request);

var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);

var serializedBody = RequestBodySerializer.Serialize(request, "AddTags", "json", false, true);
if (serializedBody != null)
{
httpRequest.Content = serializedBody;
}

if (_securitySource != null)
{
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
}

var hookCtx = new HookContext("postTags", null, _securitySource);

httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
HttpResponseMessage httpResponse;
try
{
httpResponse = await _defaultClient.SendAsync(httpRequest);
int _statusCode = (int)httpResponse.StatusCode;

if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
{
var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
}
}
}
catch (Exception error)
{
var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
}
else
{
throw;
}
}

httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);

var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
int responseStatusCode = (int)httpResponse.StatusCode;
if(responseStatusCode == 200)
{
return new PostTagsResponse()
{
StatusCode = responseStatusCode,
ContentType = contentType,
RawResponse = httpResponse
};;
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Error>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new PostTagsResponse()
{
StatusCode = responseStatusCode,
ContentType = contentType,
RawResponse = httpResponse
};
response.Error = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
}

public async Task<PreflightResponse> PreflightAsync(PreflightRequest? request = null)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
Expand Down
6 changes: 3 additions & 3 deletions SpeakeasySDK/Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public class Auth: IAuth
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.5.0";
private const string _sdkGenVersion = "2.317.0";
private const string _sdkVersion = "5.5.1";
private const string _sdkGenVersion = "2.319.10";
private const string _openapiDocVersion = "0.4.0 .";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
Expand Down
6 changes: 3 additions & 3 deletions SpeakeasySDK/Embeds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public class Embeds: IEmbeds
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.5.0";
private const string _sdkGenVersion = "2.317.0";
private const string _sdkVersion = "5.5.1";
private const string _sdkGenVersion = "2.319.10";
private const string _openapiDocVersion = "0.4.0 .";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
Expand Down
6 changes: 3 additions & 3 deletions SpeakeasySDK/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public class Events: IEvents
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.5.0";
private const string _sdkGenVersion = "2.317.0";
private const string _sdkVersion = "5.5.1";
private const string _sdkGenVersion = "2.319.10";
private const string _openapiDocVersion = "0.4.0 .";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
Expand Down
6 changes: 3 additions & 3 deletions SpeakeasySDK/Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public class Metadata: IMetadata
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "5.5.0";
private const string _sdkGenVersion = "2.317.0";
private const string _sdkVersion = "5.5.1";
private const string _sdkGenVersion = "2.319.10";
private const string _openapiDocVersion = "0.4.0 .";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _defaultClient;
private Func<Security>? _securitySource;
Expand Down
28 changes: 28 additions & 0 deletions SpeakeasySDK/Models/Operations/PostTagsRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace SpeakeasySDK.Models.Operations
{
using SpeakeasySDK.Models.Shared;
using SpeakeasySDK.Utils;

public class PostTagsRequest
{

[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")]
public string NamespaceName { get; set; } = default!;

/// <summary>
/// A JSON representation of the tags to add
/// </summary>
[SpeakeasyMetadata("request:mediaType=application/json")]
public AddTags? AddTags { get; set; }
}
}
41 changes: 41 additions & 0 deletions SpeakeasySDK/Models/Operations/PostTagsResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace SpeakeasySDK.Models.Operations
{
using SpeakeasySDK.Models.Errors;
using SpeakeasySDK.Utils;
using System.Net.Http;
using System;

public class PostTagsResponse
{

/// <summary>
/// HTTP response content type for this operation
/// </summary>
public string? ContentType { get; set; } = default!;

/// <summary>
/// Default error response
/// </summary>
public Error? Error { get; set; }

/// <summary>
/// HTTP response status code for this operation
/// </summary>
public int StatusCode { get; set; } = default!;

/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
public HttpResponseMessage RawResponse { get; set; } = default!;
}
}
35 changes: 35 additions & 0 deletions SpeakeasySDK/Models/Shared/AddTags.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace SpeakeasySDK.Models.Shared
{
using Newtonsoft.Json;
using SpeakeasySDK.Utils;
using System.Collections.Generic;

/// <summary>
/// Request body of tags to add to a revision
/// </summary>
public class AddTags
{

/// <summary>
/// revision digest to add tags too sha256:...
/// </summary>
[JsonProperty("revision_digest")]
public string RevisionDigest { get; set; } = default!;

/// <summary>
/// string tags to add to the revision
/// </summary>
[JsonProperty("tags")]
public List<string> Tags { get; set; } = default!;
}
}
Loading

0 comments on commit 3baf540

Please sign in to comment.