Skip to content

Commit

Permalink
chore: 🐝 Update SDK - 1 - Generate (#39)
Browse files Browse the repository at this point in the history
* ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.295.2

* Update project file to version 0.8.1

* HL: Patch broken capitalization sites.

Signed-off-by: Philip Conrad <[email protected]>

---------

Signed-off-by: Philip Conrad <[email protected]>
Co-authored-by: speakeasybot <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Philip Conrad <[email protected]>
  • Loading branch information
4 people committed May 24, 2024
1 parent 5fa71f7 commit 8a31e9d
Show file tree
Hide file tree
Showing 53 changed files with 82 additions and 118 deletions.
12 changes: 6 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: f1a8c321-72a7-41c5-8f5e-3d925aeafa1a
management:
docChecksum: 11b8c1e1d3f9d5dab18c36b33f81200d
docVersion: 0.2.0
speakeasyVersion: 1.293.0
generationVersion: 2.332.4
releaseVersion: 0.8.0
configChecksum: d65f4c0f7e73dc7d363ccac334fb14e1
speakeasyVersion: 1.295.2
generationVersion: 2.335.5
releaseVersion: 0.8.1
configChecksum: 36fc1881544d38c2661b0493d15135cf
repoURL: https://github.com/StyraInc/opa-csharp.git
repoSubDirectory: Styra/Opa/OpenApi/
published: true
Expand All @@ -20,9 +20,9 @@ features:
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.3
intellisenseMarkdownSupport: 0.1.0
responseFormat: 0.0.3
responseFormat: 0.0.4
sdkHooks: 0.1.0
unions: 0.0.3
unions: 0.0.4
generatedFiles:
- Styra/Opa/OpenApi/OpaApiClient.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.8.0
version: 0.8.1
additionalDependencies: []
author: Styra
clientServerStatusCodesAsErrors: true
Expand Down
8 changes: 4 additions & 4 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ speakeasyVersion: 1.293.0
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:bee24a1bc1dbe2593460621ccb876fcb4cac089a37738ea749aae5a58ac94c64
sourceBlobDigest: sha256:fae7389411c3f9a8f13ce81c8f5dce2e518d72402704e68ccd75cef966ea59ce
sourceRevisionDigest: sha256:2e01fc68b2207d99f4fd5c9edc3b7cf5be6ddc8a729982001b5f00e39825fd4a
sourceBlobDigest: sha256:2c2c749185949d6e826af23e2013a40a0f2d86db0d8da7e2c5790577d409f19e
tags:
- latest
- main
targets:
first-target:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:bee24a1bc1dbe2593460621ccb876fcb4cac089a37738ea749aae5a58ac94c64
sourceBlobDigest: sha256:fae7389411c3f9a8f13ce81c8f5dce2e518d72402704e68ccd75cef966ea59ce
sourceRevisionDigest: sha256:2e01fc68b2207d99f4fd5c9edc3b7cf5be6ddc8a729982001b5f00e39825fd4a
sourceBlobDigest: sha256:2c2c749185949d6e826af23e2013a40a0f2d86db0d8da7e2c5790577d409f19e
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,14 @@ Based on:
### Generated
- [csharp v0.8.0] .
### Releases
- [NuGet v0.8.0] https://www.nuget.org/packages/Styra.Opa.OpenApi/0.8.0 - .
- [NuGet v0.8.0] https://www.nuget.org/packages/Styra.Opa.OpenApi/0.8.0 - .

## 2024-05-24 00:04:20
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.295.2 (2.335.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [csharp v0.8.1] .
### Releases
- [NuGet v0.8.1] https://www.nuget.org/packages/Styra.Opa.OpenApi/0.8.1 - .
12 changes: 6 additions & 6 deletions Styra/Opa/OpaClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public async Task<bool> check(string path, Dictionary<string, object> input)
/// <remarks>The closest idiomatic type mapping to a JSON Array type for .NET is a List, so we use that here.</remarks>
public async Task<T?> evaluate<T>(string path, List<object> input)
{
return await queryMachinery<T>(path, Input.CreateArrayOfany(input));
return await queryMachinery<T>(path, Input.CreateArrayOfAny(input));
}

/// <summary>
Expand All @@ -176,7 +176,7 @@ public async Task<bool> check(string path, Dictionary<string, object> input)
/// <returns>Result, as an instance of T, or null in the case of a query failure.</returns>
public async Task<T?> evaluate<T>(string path, Dictionary<string, object> input)
{
return await queryMachinery<T>(path, Input.CreateMapOfany(input));
return await queryMachinery<T>(path, Input.CreateMapOfAny(input));
}

/// <exclude />
Expand Down Expand Up @@ -230,11 +230,11 @@ public async Task<bool> check(string path, Dictionary<string, object> input)
case "str":
if (result.Str is T defStr) { return defStr; }
break;
case "arrayOfany":
if (result.ArrayOfany is T defArray) { return defArray; }
case "arrayOfAny":
if (result.ArrayOfAny is T defArray) { return defArray; }
break;
case "mapOfany":
if (result.MapOfany is T defObject) { return defObject; }
case "mapOfAny":
if (result.MapOfAny is T defObject) { return defObject; }
break;
case null:
default:
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Hooks/HookTypes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Hooks/SDKHooks.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Components/Explain.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Components/GzipAcceptEncoding.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Components/GzipContentEncoding.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Components/HealthyServer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
45 changes: 22 additions & 23 deletions Styra/Opa/OpenApi/Models/Components/Input.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down Expand Up @@ -29,9 +28,9 @@ public class InputType

public static InputType Number { get { return new InputType("number"); } }

public static InputType ArrayOfany { get { return new InputType("arrayOfany"); } }
public static InputType ArrayOfAny { get { return new InputType("arrayOfAny"); } }

public static InputType MapOfany { get { return new InputType("mapOfany"); } }
public static InputType MapOfAny { get { return new InputType("mapOfAny"); } }

public static InputType Null { get { return new InputType("null"); } }

Expand All @@ -42,8 +41,8 @@ public static InputType FromString(string v) {
case "boolean": return Boolean;
case "str": return Str;
case "number": return Number;
case "arrayOfany": return ArrayOfany;
case "mapOfany": return MapOfany;
case "arrayOfAny": return ArrayOfAny;
case "mapOfAny": return MapOfAny;
case "null": return Null;
default: throw new ArgumentException("Invalid value for InputType");
}
Expand Down Expand Up @@ -74,8 +73,8 @@ public Input(InputType type) {
public bool? Boolean { get; set; }
public string? Str { get; set; }
public double? Number { get; set; }
public List<object>? ArrayOfany { get; set; }
public Dictionary<string, object>? MapOfany { get; set; }
public List<object>? ArrayOfAny { get; set; }
public Dictionary<string, object>? MapOfAny { get; set; }

public InputType Type { get; set; }

Expand Down Expand Up @@ -104,19 +103,19 @@ public static Input CreateNumber(double number) {
return res;
}

public static Input CreateArrayOfany(List<object> arrayOfany) {
InputType typ = InputType.ArrayOfany;
public static Input CreateArrayOfAny(List<object> arrayOfAny) {
InputType typ = InputType.ArrayOfAny;

Input res = new Input(typ);
res.ArrayOfany = arrayOfany;
res.ArrayOfAny = arrayOfAny;
return res;
}

public static Input CreateMapOfany(Dictionary<string, object> mapOfany) {
InputType typ = InputType.MapOfany;
public static Input CreateMapOfAny(Dictionary<string, object> mapOfAny) {
InputType typ = InputType.MapOfAny;

Input res = new Input(typ);
res.MapOfany = mapOfany;
res.MapOfAny = mapOfAny;
return res;
}

Expand Down Expand Up @@ -162,9 +161,9 @@ public class InputConverter : JsonConverter
}
try
{
List<object>? arrayOfany = ResponseBodyDeserializer.Deserialize<List<object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Input(InputType.ArrayOfany) {
ArrayOfany = arrayOfany
List<object>? arrayOfAny = ResponseBodyDeserializer.Deserialize<List<object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Input(InputType.ArrayOfAny) {
ArrayOfAny = arrayOfAny
};
}
catch (Exception ex)
Expand All @@ -175,9 +174,9 @@ public class InputConverter : JsonConverter
}
try
{
Dictionary<string, object>? mapOfany = ResponseBodyDeserializer.Deserialize<Dictionary<string, object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Input(InputType.MapOfany) {
MapOfany = mapOfany
Dictionary<string, object>? mapOfAny = ResponseBodyDeserializer.Deserialize<Dictionary<string, object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Input(InputType.MapOfAny) {
MapOfAny = mapOfAny
};
}
catch (Exception ex)
Expand Down Expand Up @@ -217,14 +216,14 @@ public override void WriteJson(JsonWriter writer, object? value, JsonSerializer
writer.WriteRawValue(Utilities.SerializeJSON(res.Number));
return;
}
if (res.ArrayOfany != null)
if (res.ArrayOfAny != null)
{
writer.WriteRawValue(Utilities.SerializeJSON(res.ArrayOfany));
writer.WriteRawValue(Utilities.SerializeJSON(res.ArrayOfAny));
return;
}
if (res.MapOfany != null)
if (res.MapOfAny != null)
{
writer.WriteRawValue(Utilities.SerializeJSON(res.MapOfany));
writer.WriteRawValue(Utilities.SerializeJSON(res.MapOfAny));
return;
}

Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Components/Provenance.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
45 changes: 22 additions & 23 deletions Styra/Opa/OpenApi/Models/Components/Result.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down Expand Up @@ -29,9 +28,9 @@ public class ResultType

public static ResultType Number { get { return new ResultType("number"); } }

public static ResultType ArrayOfany { get { return new ResultType("arrayOfany"); } }
public static ResultType ArrayOfAny { get { return new ResultType("arrayOfAny"); } }

public static ResultType MapOfany { get { return new ResultType("mapOfany"); } }
public static ResultType MapOfAny { get { return new ResultType("mapOfAny"); } }

public static ResultType Null { get { return new ResultType("null"); } }

Expand All @@ -42,8 +41,8 @@ public static ResultType FromString(string v) {
case "boolean": return Boolean;
case "str": return Str;
case "number": return Number;
case "arrayOfany": return ArrayOfany;
case "mapOfany": return MapOfany;
case "arrayOfAny": return ArrayOfAny;
case "mapOfAny": return MapOfAny;
case "null": return Null;
default: throw new ArgumentException("Invalid value for ResultType");
}
Expand Down Expand Up @@ -74,8 +73,8 @@ public Result(ResultType type) {
public bool? Boolean { get; set; }
public string? Str { get; set; }
public double? Number { get; set; }
public List<object>? ArrayOfany { get; set; }
public Dictionary<string, object>? MapOfany { get; set; }
public List<object>? ArrayOfAny { get; set; }
public Dictionary<string, object>? MapOfAny { get; set; }

public ResultType Type { get; set; }

Expand Down Expand Up @@ -104,19 +103,19 @@ public static Result CreateNumber(double number) {
return res;
}

public static Result CreateArrayOfany(List<object> arrayOfany) {
ResultType typ = ResultType.ArrayOfany;
public static Result CreateArrayOfAny(List<object> arrayOfAny) {
ResultType typ = ResultType.ArrayOfAny;

Result res = new Result(typ);
res.ArrayOfany = arrayOfany;
res.ArrayOfAny = arrayOfAny;
return res;
}

public static Result CreateMapOfany(Dictionary<string, object> mapOfany) {
ResultType typ = ResultType.MapOfany;
public static Result CreateMapOfAny(Dictionary<string, object> mapOfAny) {
ResultType typ = ResultType.MapOfAny;

Result res = new Result(typ);
res.MapOfany = mapOfany;
res.MapOfAny = mapOfAny;
return res;
}

Expand Down Expand Up @@ -162,9 +161,9 @@ public class ResultConverter : JsonConverter
}
try
{
List<object>? arrayOfany = ResponseBodyDeserializer.Deserialize<List<object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Result(ResultType.ArrayOfany) {
ArrayOfany = arrayOfany
List<object>? arrayOfAny = ResponseBodyDeserializer.Deserialize<List<object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Result(ResultType.ArrayOfAny) {
ArrayOfAny = arrayOfAny
};
}
catch (Exception ex)
Expand All @@ -175,9 +174,9 @@ public class ResultConverter : JsonConverter
}
try
{
Dictionary<string, object>? mapOfany = ResponseBodyDeserializer.Deserialize<Dictionary<string, object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Result(ResultType.MapOfany) {
MapOfany = mapOfany
Dictionary<string, object>? mapOfAny = ResponseBodyDeserializer.Deserialize<Dictionary<string, object>>(json, missingMemberHandling: MissingMemberHandling.Error);
return new Result(ResultType.MapOfAny) {
MapOfAny = mapOfAny
};
}
catch (Exception ex)
Expand Down Expand Up @@ -217,14 +216,14 @@ public override void WriteJson(JsonWriter writer, object? value, JsonSerializer
writer.WriteRawValue(Utilities.SerializeJSON(res.Number));
return;
}
if (res.ArrayOfany != null)
if (res.ArrayOfAny != null)
{
writer.WriteRawValue(Utilities.SerializeJSON(res.ArrayOfany));
writer.WriteRawValue(Utilities.SerializeJSON(res.ArrayOfAny));
return;
}
if (res.MapOfany != null)
if (res.MapOfAny != null)
{
writer.WriteRawValue(Utilities.SerializeJSON(res.MapOfany));
writer.WriteRawValue(Utilities.SerializeJSON(res.MapOfAny));
return;
}

Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Components/Revision.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Errors/ClientError.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Errors/Errors.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Errors/Location.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Errors/SDKException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
1 change: 0 additions & 1 deletion Styra/Opa/OpenApi/Models/Errors/ServerError.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
Expand Down
Loading

0 comments on commit 8a31e9d

Please sign in to comment.