Skip to content

Commit

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

* Update project file to version 0.8.0

---------

Co-authored-by: speakeasybot <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
3 people committed May 17, 2024
1 parent 56e5fb2 commit 9d019a4
Show file tree
Hide file tree
Showing 14 changed files with 611 additions and 60 deletions.
25 changes: 17 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
lockVersion: 2.0.0
id: f1a8c321-72a7-41c5-8f5e-3d925aeafa1a
management:
docChecksum: 2422daf10293e923232daf08349ae0ae
docChecksum: 11b8c1e1d3f9d5dab18c36b33f81200d
docVersion: 0.2.0
speakeasyVersion: 1.283.1
generationVersion: 2.324.0
releaseVersion: 0.7.7
configChecksum: 42347a776828cf7702764a4d5341c948
speakeasyVersion: 1.293.0
generationVersion: 2.332.4
releaseVersion: 0.8.0
configChecksum: d65f4c0f7e73dc7d363ccac334fb14e1
repoURL: https://github.com/StyraInc/opa-csharp.git
repoSubDirectory: Styra/Opa/OpenApi/
published: true
features:
csharp:
additionalDependencies: 0.1.0
constsAndDefaults: 0.0.1
core: 3.8.3
examples: 2.81.3
flattening: 2.81.2
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.3
intellisenseMarkdownSupport: 0.1.0
responseFormat: 0.0.3
sdkHooks: 0.1.0
unions: 0.0.3
generatedFiles:
- Styra/Opa/OpenApi/OpaApiClient.cs
Expand All @@ -31,26 +35,31 @@ generatedFiles:
- Styra/Opa/OpenApi/Utils/IsoDateTimeSerializer.cs
- Styra/Opa/OpenApi/Utils/RequestBodySerializer.cs
- Styra/Opa/OpenApi/Utils/ResponseBodyDeserializer.cs
- Styra/Opa/OpenApi/Utils/Retries/BackoffStrategy.cs
- Styra/Opa/OpenApi/Utils/Retries/Retries.cs
- Styra/Opa/OpenApi/Utils/Retries/RetryConfig.cs
- Styra/Opa/OpenApi/Utils/SecurityMetadata.cs
- Styra/Opa/OpenApi/Utils/SpeakeasyHttpClient.cs
- Styra/Opa/OpenApi/Utils/SpeakeasyMetadata.cs
- Styra/Opa/OpenApi/Utils/URLBuilder.cs
- Styra/Opa/OpenApi/Utils/Utilities.cs
- Styra/Opa/OpenApi/Models/Errors/SDKException.cs
- Styra/Opa/OpenApi/Models/Requests/ExecuteDefaultPolicyWithInputRequest.cs
- Styra/Opa/OpenApi/Models/Requests/ExecuteDefaultPolicyWithInputResponse.cs
- Styra/Opa/OpenApi/Models/Requests/ExecutePolicyRequest.cs
- Styra/Opa/OpenApi/Models/Requests/ExecutePolicyResponse.cs
- Styra/Opa/OpenApi/Models/Requests/ExecutePolicyWithInputRequestBody.cs
- Styra/Opa/OpenApi/Models/Requests/ExecutePolicyWithInputRequest.cs
- Styra/Opa/OpenApi/Models/Requests/ExecutePolicyWithInputResponse.cs
- Styra/Opa/OpenApi/Models/Requests/HealthRequest.cs
- Styra/Opa/OpenApi/Models/Requests/HealthResponse.cs
- Styra/Opa/OpenApi/Models/Components/Result.cs
- Styra/Opa/OpenApi/Models/Components/Input.cs
- Styra/Opa/OpenApi/Models/Components/GzipAcceptEncoding.cs
- Styra/Opa/OpenApi/Models/Components/SuccessfulPolicyEvaluation.cs
- Styra/Opa/OpenApi/Models/Components/Revision.cs
- Styra/Opa/OpenApi/Models/Components/Provenance.cs
- Styra/Opa/OpenApi/Models/Components/Result.cs
- Styra/Opa/OpenApi/Models/Components/Explain.cs
- Styra/Opa/OpenApi/Models/Components/GzipAcceptEncoding.cs
- Styra/Opa/OpenApi/Models/Components/Input.cs
- Styra/Opa/OpenApi/Models/Components/GzipContentEncoding.cs
- Styra/Opa/OpenApi/Models/Components/HealthyServer.cs
- Styra/Opa/OpenApi/Models/Errors/Location.cs
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.7.7
version: 0.8.0
additionalDependencies: []
author: Styra
clientServerStatusCodesAsErrors: true
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.283.1
speakeasyVersion: 1.293.0
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:69f3a155caebf78f76ae4217cc80fc0b7eb35e23c9dfb8c6b04d30310a26ae49
sourceBlobDigest: sha256:fe463552a73cfc90021c6a5dded480942271e0c87f0a396a41b5f2d844ee4efb
sourceRevisionDigest: sha256:bee24a1bc1dbe2593460621ccb876fcb4cac089a37738ea749aae5a58ac94c64
sourceBlobDigest: sha256:fae7389411c3f9a8f13ce81c8f5dce2e518d72402704e68ccd75cef966ea59ce
tags:
- latest
- main
targets:
first-target:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:69f3a155caebf78f76ae4217cc80fc0b7eb35e23c9dfb8c6b04d30310a26ae49
sourceBlobDigest: sha256:fe463552a73cfc90021c6a5dded480942271e0c87f0a396a41b5f2d844ee4efb
sourceRevisionDigest: sha256:bee24a1bc1dbe2593460621ccb876fcb4cac089a37738ea749aae5a58ac94c64
sourceBlobDigest: sha256:fae7389411c3f9a8f13ce81c8f5dce2e518d72402704e68ccd75cef966ea59ce
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,26 @@ var status = opa.evaluate<AuthzStatus>(path, input) ?? AuthzStatus(false);
<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### Example
### Example 1

```csharp
using Styra.Opa.OpenApi;
using Styra.Opa.OpenApi.Models.Requests;
using Styra.Opa.OpenApi.Models.Components;

var sdk = new OpaApiClient();

var res = await sdk.ExecuteDefaultPolicyWithInputAsync(
input: Input.CreateInputNumber(
8203.11D,
),
pretty: false,
acceptEncoding: GzipAcceptEncoding.Gzip);

// handle response
```

### Example 2

```csharp
using Styra.Opa.OpenApi;
Expand Down Expand Up @@ -146,6 +165,7 @@ var res = await sdk.ExecutePolicyWithInputAsync(req);

### [OpaApiClient SDK](docs/sdks/opaapiclient/README.md)

* [ExecuteDefaultPolicyWithInput](docs/sdks/opaapiclient/README.md#executedefaultpolicywithinput) - Execute the default decision given an input
* [ExecutePolicy](docs/sdks/opaapiclient/README.md#executepolicy) - Execute a policy
* [ExecutePolicyWithInput](docs/sdks/opaapiclient/README.md#executepolicywithinput) - Execute a policy given an input
* [Health](docs/sdks/opaapiclient/README.md#health) - Verify the server is operational
Expand Down Expand Up @@ -177,7 +197,7 @@ Handling errors in this SDK should largely match your expectations. All operati

| Error Object | Status Code | Content Type |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| Styra.Opa.OpenApi.Models.Errors.ClientError | 400 | application/json |
| Styra.Opa.OpenApi.Models.Errors.ClientError | 400,404 | application/json |
| Styra.Opa.OpenApi.Models.Errors.ServerError | 500 | application/json |
| Styra.Opa.OpenApi.Models.Errors.SDKException | 4xx-5xx | */* |

Expand All @@ -192,13 +212,14 @@ using Styra.Opa.OpenApi.Models.Components;

var sdk = new OpaApiClient();

ExecutePolicyRequest req = new ExecutePolicyRequest() {
Path = "app/rbac",
};

try
{
var res = await sdk.ExecutePolicyAsync(req);
var res = await sdk.ExecuteDefaultPolicyWithInputAsync(
input: Input.CreateInputNumber(
8203.11D,
),
pretty: false,
acceptEncoding: GzipAcceptEncoding.Gzip);
// handle response
}
catch (Exception ex)
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,14 @@ Based on:
### Generated
- [csharp v0.7.7] .
### Releases
- [NuGet v0.7.7] https://www.nuget.org/packages/Styra.Opa.OpenApi/0.7.7 - .
- [NuGet v0.7.7] https://www.nuget.org/packages/Styra.Opa.OpenApi/0.7.7 - .

## 2024-05-17 00:03:15
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.293.0 (2.332.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [csharp v0.8.0] .
### Releases
- [NuGet v0.8.0] https://www.nuget.org/packages/Styra.Opa.OpenApi/0.8.0 - .
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

//------------------------------------------------------------------------------
// <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 Styra.Opa.OpenApi.Models.Requests
{
using Styra.Opa.OpenApi.Models.Components;
using Styra.Opa.OpenApi.Utils;

public class ExecuteDefaultPolicyWithInputRequest
{

/// <summary>
/// The input document
/// </summary>
[SpeakeasyMetadata("request:mediaType=application/json")]
public Input Input { get; set; } = default!;

/// <summary>
/// If parameter is `true`, response will formatted for humans.
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=pretty")]
public bool? Pretty { get; set; }

/// <summary>
/// Indicates the server should respond with a gzip encoded body. The server will send the compressed response only if its length is above `server.encoding.gzip.min_length` value. See the configuration section
/// </summary>
[SpeakeasyMetadata("header:style=simple,explode=false,name=Accept-Encoding")]
public GzipAcceptEncoding? AcceptEncoding { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

//------------------------------------------------------------------------------
// <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 Styra.Opa.OpenApi.Models.Requests
{
using Styra.Opa.OpenApi.Models.Components;
using Styra.Opa.OpenApi.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;

public class ExecuteDefaultPolicyWithInputResponse
{

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

/// <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!;

/// <summary>
/// Success.<br/>
///
/// <remarks>
/// Evaluating the default policy has the same response behavior as a successful policy evaluation, but with only the result as the response.<br/>
///
/// </remarks>
/// </summary>
public Result? Result { get; set; }

public Dictionary<string, List<string>> Headers { get; set; } = default!;
}
}
Loading

0 comments on commit 9d019a4

Please sign in to comment.