Closed tieje closed 3 months ago
Hi @tieje
Thanks for the issue. Looks like just a small oversight/oops.
Either you can submit a PR for the change, or I should get back to this SDK sometime mid next week. You put more time into the bug report than just opening the PR for this small little change. 😀
This is my work account. I'm not a contributor. I cannot push branches to make PRs.
Here is the code: for Key.cs
// Copyright 2021-2024 Deepgram .NET SDK contributors. All Rights Reserved.
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT
namespace Deepgram.Models.Manage.v1;
public record Key
{
/// <summary>
/// Unique identifier of the Deepgram API key
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("api_key_id")]
public string? ApiKeyId { get; set; }
/// <summary>
/// Deepgram secret key
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("key")]
public string? Key { get; set; }
/// <summary>
/// Comment for the Deepgram API key
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("comment")]
public string? Comment { get; set; }
/// <summary>
/// Scope of the Deepgram API key
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("scopes")]
public IReadOnlyList<string>? Scopes { get; set; }
/// <summary>
/// Creation date of the Deepgram API key
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("created")]
public DateTime? Created { get; set; }
/// <summary>
/// Tags for the Deepgram API key
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("tags")]
public IReadOnlyList<string>? Tags { get; set; }
/// <summary>
/// Override ToString method to serialize the object
/// </summary>
public override string ToString()
{
return Regex.Unescape(JsonSerializer.Serialize(this, JsonSerializeOptions.DefaultOptions));
}
}
I mean you can fork the repo, create a branch from your fork with the change, and submit the PR from your fork. No special access required.
My primary system is a Mac. So I don't fire up the ol' Windows laptop unless there is an urgent issue or after my round robin time allocation for Windows comes up (which is looking like mid next week).
In worst case, will get to it with a release containing the fix mid next week.
Thank you for teaching me how to create a pull request. You can find it here
Thanks for doing this! Will cut a release of this on Monday!
@tieje3 this change is available in this release: https://github.com/deepgram/deepgram-dotnet-sdk/releases/tag/4.0.2
thanks again for your contribution!
Proposed changes
Add "key" to public Record Key
Context
I needed to perform a workaround by using normal HTTP requests instead of the Deepgram library just to get the "key" when creating a key. The NodeJS SDK just gives you the key.
Possible Implementation
Please just add "key" to
public record Key
My current workaround:
Other information