Skip to content

Commit

Permalink
Merge pull request #1 from StyraInc/speakeasy-sdk-regen-1709849936
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate
  • Loading branch information
chendrix authored Mar 7, 2024
2 parents ae036b8 + 3532cae commit 001c3c9
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 16 deletions.
11 changes: 6 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ id: f1a8c321-72a7-41c5-8f5e-3d925aeafa1a
management:
docChecksum: 51f4193538f657830431eb4a7cbb2b7c
docVersion: 0.2.0
speakeasyVersion: 1.201.2
generationVersion: 2.277.0
releaseVersion: 0.0.2
configChecksum: d4b47405bcd8c3807128defb87f631f4
speakeasyVersion: 1.204.1
generationVersion: 2.279.1
releaseVersion: 0.0.3
configChecksum: 61588a88f6e76c437ddad9a517ec76f4
repoURL: https://github.com/StyraInc/opa-csharp.git
features:
csharp:
core: 3.4.3
examples: 2.81.3
flattening: 2.81.1
globalServerURLs: 2.82.2
globalServerURLs: 2.82.3
generatedFiles:
- Api/Opa.cs
- global.json
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
csharp:
version: 0.0.2
version: 0.0.3
author: Styra
dotnetVersion: net6.0
flattenGlobalSecurity: true
Expand Down
3 changes: 2 additions & 1 deletion Api/Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>api</PackageId>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
<Authors>Styra</Authors>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
<RepositoryUrl>https://github.com/StyraInc/opa-csharp</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
Expand Down
22 changes: 13 additions & 9 deletions Api/Opa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ namespace Api
using System.Threading.Tasks;
using System;



/// <summary>
///
/// <see>https://docs.styra.com/enterprise-opa} - Enterprise OPA documentation</see>
Expand All @@ -48,14 +46,16 @@ public interface IOpa
/// </summary>
Task<HealthResponse> HealthAsync(bool? bundles = null, bool? plugins = null, List<string>? excludePlugin = null);
}

public class SDKConfig
{
public static string[] ServerList = new string[]
{
/// <summary>
/// List of server URLs available to the SDK.
/// </summary>
public static readonly string[] ServerList = {
"http://localhost:8181",
};
/// Contains the list of servers available to the SDK

public string serverUrl = "";
public int serverIndex = 0;

Expand All @@ -78,10 +78,10 @@ public class Opa: IOpa
public SDKConfig SDKConfiguration { get; private set; }

private const string _language = "csharp";
private const string _sdkVersion = "0.0.2";
private const string _sdkGenVersion = "2.277.0";
private const string _sdkVersion = "0.0.3";
private const string _sdkGenVersion = "2.279.1";
private const string _openapiDocVersion = "0.2.0";
private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.277.0 0.2.0 api";
private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.279.1 0.2.0 api";
private string _serverUrl = "";
private int _serverIndex = 0;
private ISpeakeasyHttpClient _defaultClient;
Expand All @@ -90,6 +90,10 @@ public Opa(int? serverIndex = null, string? serverUrl = null, Dictionary<string,
{
if (serverIndex != null)
{
if (serverIndex.Value < 0 || serverIndex.Value >= SDKConfig.ServerList.Length)
{
throw new Exception($"Invalid server index {serverIndex.Value}");
}
_serverIndex = serverIndex.Value;
}

Expand Down
9 changes: 9 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


## 2024-03-07 22:18:53
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.204.1 (2.279.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [csharp v0.0.3] .

0 comments on commit 001c3c9

Please sign in to comment.