Skip to content

Commit

Permalink
Merge pull request #75 from aziontech/generated-sdk
Browse files Browse the repository at this point in the history
Auto-generated SDK
  • Loading branch information
diegoazion authored Oct 30, 2023
2 parents 37c63a2 + 6a39e6e commit dba8095
Show file tree
Hide file tree
Showing 14 changed files with 300 additions and 193 deletions.
2 changes: 1 addition & 1 deletion edgefunctions/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.6.0
7.0.1
26 changes: 19 additions & 7 deletions edgefunctions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap

- API version: 2.0.0
- SDK version: 1.0.0
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen

<a id="frameworks-supported"></a>
## Frameworks supported
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext

<a id="dependencies"></a>
## Dependencies
Expand All @@ -35,14 +32,29 @@ NOTE: RestSharp for .Net Core creates a new socket for each api call, which can

<a id="installation"></a>
## Installation
Generate the DLL using your preferred tool (e.g. `dotnet build`)
Run the following command to generate the DLL
- [Mac/Linux] `/bin/sh build.sh`
- [Windows] `build.bat`

Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
```csharp
using edgefunctions.Api;
using edgefunctions.Client;
using edgefunctions.Model;
```
<a id="packaging"></a>
## Packaging

A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages.

This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly:

```
nuget pack -Build -OutputDirectory out edgefunctions.csproj
```

Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual.

<a id="usage"></a>
## Usage

Expand Down Expand Up @@ -81,8 +93,8 @@ namespace Example
var apiInstance = new EdgeFunctionsApi(config);
var page = 789L; // long? | (optional)
var pageSize = 789L; // long? | (optional)
var sort = "sort_example"; // string | (optional)
var orderBy = "orderBy_example"; // string | (optional)
var sort = "sort_example"; // string? | (optional)
var orderBy = "orderBy_example"; // string? | (optional)
try
{
Expand Down
11 changes: 10 additions & 1 deletion edgefunctions/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ components:
active: true
language: language
json_args: ""
initiator_type: edge_application
properties:
name:
type: string
Expand All @@ -476,6 +477,11 @@ components:
code:
type: string
json_args: {}
initiator_type:
enum:
- edge_application
- edge_firewall
type: string
active:
type: boolean
is_proprietary_code:
Expand Down Expand Up @@ -528,7 +534,7 @@ components:
active: true
json_args: ""
language: language
initiator_type: initiator_type
initiator_type: edge_application
properties:
name:
type: string
Expand All @@ -538,6 +544,9 @@ components:
active:
type: boolean
initiator_type:
enum:
- edge_application
- edge_firewall
type: string
language:
type: string
Expand Down
1 change: 1 addition & 0 deletions edgefunctions/docs/CreateEdgeFunctionRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**Language** | **string** | | [optional]
**Code** | **string** | | [optional]
**JsonArgs** | **Object** | | [optional]
**InitiatorType** | **string** | | [optional]
**Active** | **bool** | | [optional]
**IsProprietaryCode** | **bool** | | [optional]

Expand Down
10 changes: 5 additions & 5 deletions edgefunctions/docs/EdgeFunctionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ All URIs are relative to *https://api.azionapi.net*

<a id="edgefunctionsget"></a>
# **EdgeFunctionsGet**
> ListEdgeFunctionResponse EdgeFunctionsGet (long? page = null, long? pageSize = null, string sort = null, string orderBy = null)
> ListEdgeFunctionResponse EdgeFunctionsGet (long? page = null, long? pageSize = null, string? sort = null, string? orderBy = null)
edge_functions

Expand Down Expand Up @@ -41,8 +41,8 @@ namespace Example
var apiInstance = new EdgeFunctionsApi(config);
var page = 789L; // long? | (optional)
var pageSize = 789L; // long? | (optional)
var sort = "sort_example"; // string | (optional)
var orderBy = "orderBy_example"; // string | (optional)
var sort = "sort_example"; // string? | (optional)
var orderBy = "orderBy_example"; // string? | (optional)
try
{
Expand Down Expand Up @@ -87,8 +87,8 @@ catch (ApiException e)
|------|------|-------------|-------|
| **page** | **long?** | | [optional] |
| **pageSize** | **long?** | | [optional] |
| **sort** | **string** | | [optional] |
| **orderBy** | **string** | | [optional] |
| **sort** | **string?** | | [optional] |
| **orderBy** | **string?** | | [optional] |

### Return type

Expand Down
16 changes: 8 additions & 8 deletions edgefunctions/edgefunctions.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "edgefunctions", "src\edgefunctions\edgefunctions.csproj", "{1A2F6C53-4B1E-4B05-A9A2-422892AC1371}"
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "edgefunctions", "src\edgefunctions\edgefunctions.csproj", "{03079AAC-1685-454B-9EAA-F806D4ED754B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "edgefunctions.Test", "src\edgefunctions.Test\edgefunctions.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1A2F6C53-4B1E-4B05-A9A2-422892AC1371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A2F6C53-4B1E-4B05-A9A2-422892AC1371}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A2F6C53-4B1E-4B05-A9A2-422892AC1371}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A2F6C53-4B1E-4B05-A9A2-422892AC1371}.Release|Any CPU.Build.0 = Release|Any CPU
{03079AAC-1685-454B-9EAA-F806D4ED754B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03079AAC-1685-454B-9EAA-F806D4ED754B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03079AAC-1685-454B-9EAA-F806D4ED754B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03079AAC-1685-454B-9EAA-F806D4ED754B}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
<PropertyGroup>
<AssemblyName>edgefunctions.Test</AssemblyName>
<RootNamespace>edgefunctions.Test</RootNamespace>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>annotations</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions edgefunctions/src/edgefunctions/Api/EdgeFunctionsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface IEdgeFunctionsApiSync : IApiAccessor
/// <param name="orderBy"> (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ListEdgeFunctionResponse</returns>
ListEdgeFunctionResponse EdgeFunctionsGet(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0);
ListEdgeFunctionResponse EdgeFunctionsGet(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0);

/// <summary>
/// edge_functions
Expand All @@ -51,7 +51,7 @@ public interface IEdgeFunctionsApiSync : IApiAccessor
/// <param name="orderBy"> (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ListEdgeFunctionResponse</returns>
ApiResponse<ListEdgeFunctionResponse> EdgeFunctionsGetWithHttpInfo(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0);
ApiResponse<ListEdgeFunctionResponse> EdgeFunctionsGetWithHttpInfo(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0);
/// <summary>
/// edge_functions
/// </summary>
Expand Down Expand Up @@ -179,7 +179,7 @@ public interface IEdgeFunctionsApiAsync : IApiAccessor
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ListEdgeFunctionResponse</returns>
System.Threading.Tasks.Task<ListEdgeFunctionResponse> EdgeFunctionsGetAsync(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<ListEdgeFunctionResponse> EdgeFunctionsGetAsync(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// edge_functions
Expand All @@ -195,7 +195,7 @@ public interface IEdgeFunctionsApiAsync : IApiAccessor
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ListEdgeFunctionResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<ListEdgeFunctionResponse>> EdgeFunctionsGetWithHttpInfoAsync(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<ApiResponse<ListEdgeFunctionResponse>> EdgeFunctionsGetWithHttpInfoAsync(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// <summary>
/// edge_functions
/// </summary>
Expand Down Expand Up @@ -455,7 +455,7 @@ public edgefunctions.Client.ExceptionFactory ExceptionFactory
/// <param name="orderBy"> (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ListEdgeFunctionResponse</returns>
public ListEdgeFunctionResponse EdgeFunctionsGet(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0)
public ListEdgeFunctionResponse EdgeFunctionsGet(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0)
{
edgefunctions.Client.ApiResponse<ListEdgeFunctionResponse> localVarResponse = EdgeFunctionsGetWithHttpInfo(page, pageSize, sort, orderBy);
return localVarResponse.Data;
Expand All @@ -471,7 +471,7 @@ public edgefunctions.Client.ExceptionFactory ExceptionFactory
/// <param name="orderBy"> (optional)</param>
/// <param name="operationIndex">Index associated with the operation.</param>
/// <returns>ApiResponse of ListEdgeFunctionResponse</returns>
public edgefunctions.Client.ApiResponse<ListEdgeFunctionResponse> EdgeFunctionsGetWithHttpInfo(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0)
public edgefunctions.Client.ApiResponse<ListEdgeFunctionResponse> EdgeFunctionsGetWithHttpInfo(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0)
{
edgefunctions.Client.RequestOptions localVarRequestOptions = new edgefunctions.Client.RequestOptions();

Expand Down Expand Up @@ -547,7 +547,7 @@ public edgefunctions.Client.ExceptionFactory ExceptionFactory
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ListEdgeFunctionResponse</returns>
public async System.Threading.Tasks.Task<ListEdgeFunctionResponse> EdgeFunctionsGetAsync(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<ListEdgeFunctionResponse> EdgeFunctionsGetAsync(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
edgefunctions.Client.ApiResponse<ListEdgeFunctionResponse> localVarResponse = await EdgeFunctionsGetWithHttpInfoAsync(page, pageSize, sort, orderBy, operationIndex, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
Expand All @@ -564,7 +564,7 @@ public edgefunctions.Client.ExceptionFactory ExceptionFactory
/// <param name="operationIndex">Index associated with the operation.</param>
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
/// <returns>Task of ApiResponse (ListEdgeFunctionResponse)</returns>
public async System.Threading.Tasks.Task<edgefunctions.Client.ApiResponse<ListEdgeFunctionResponse>> EdgeFunctionsGetWithHttpInfoAsync(long? page = default(long?), long? pageSize = default(long?), string sort = default(string), string orderBy = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<edgefunctions.Client.ApiResponse<ListEdgeFunctionResponse>> EdgeFunctionsGetWithHttpInfoAsync(long? page = default(long?), long? pageSize = default(long?), string? sort = default(string?), string? orderBy = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{

edgefunctions.Client.RequestOptions localVarRequestOptions = new edgefunctions.Client.RequestOptions();
Expand Down
Loading

0 comments on commit dba8095

Please sign in to comment.