Skip to content

Commit

Permalink
chore(openapi): re-generate and bump versions
Browse files Browse the repository at this point in the history
dotnet-client: bumped to 2022.9.16.0
ts-angular-client: bumped to 0.3.0
  • Loading branch information
CBenoit committed Sep 17, 2022
1 parent 16c119b commit 0b8a8fc
Show file tree
Hide file tree
Showing 14 changed files with 520 additions and 15 deletions.
110 changes: 110 additions & 0 deletions devolutions-gateway/openapi/doc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,11 @@ array[<<SessionInfo>>]
| Insufficient permissions
| <<>>


| 500
| Unexpected server error
| <<>>

|===


Expand All @@ -658,6 +663,109 @@ ifdef::internal-generation[]
endif::internal-generation[]


[.terminateSession]
==== terminateSession

`POST /jet/session/{id}/terminate`

Terminate forcefully a running session

===== Description

Terminate forcefully a running session


// markup not found, no include::{specDir}jet/session/\{id\}/terminate/POST/spec.adoc[opts=optional]


===== Security

[cols="2,1,1"]
|===
| Name | Type | Scheme

| `scope_token`
| http
| bearer
|===

===== Parameters

====== Path Parameters

[cols="2,3,1,1,1"]
|===
|Name| Description| Required| Default| Pattern

| id
| Session / association ID of the session to terminate
| X
| null
|

|===






===== Return Type



-


===== Responses

.http response codes
[cols="2,3,1"]
|===
| Code | Message | Datatype


| 200
| Session terminated successfully
| <<>>


| 400
| Bad request
| <<>>


| 401
| Invalid or missing authorization token
| <<>>


| 403
| Insufficient permissions
| <<>>


| 404
| No running session found with provided ID
| <<>>


| 500
| Unexpected server error
| <<>>

|===


ifdef::internal-generation[]
===== Implementation

// markup not found, no include::{specDir}jet/session/\{id\}/terminate/POST/implementation.adoc[opts=optional]


endif::internal-generation[]


[#models]
== Models

Expand All @@ -676,6 +784,8 @@ endif::internal-generation[]

| `"gateway.sessions.read"`

| `"gateway.session.terminate"`

| `"gateway.associations.read"`

| `"gateway.diagnostics.read"`
Expand Down
3 changes: 2 additions & 1 deletion devolutions-gateway/openapi/dotnet-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Protocol-aware fine-grained relay server
This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2022.2.2
- SDK version: 2022.9.8.0
- SDK version: 2022.9.16.0
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen

<a name="frameworks-supported"></a>
Expand Down Expand Up @@ -111,6 +111,7 @@ Class | Method | HTTP request | Description
*JrlApi* | [**GetJrlInfo**](docs/JrlApi.md#getjrlinfo) | **GET** /jet/jrl/info | Retrieves current JRL (Json Revocation List) info
*JrlApi* | [**UpdateJrl**](docs/JrlApi.md#updatejrl) | **POST** /jet/jrl | Updates JRL (Json Revocation List) using a JRL token
*SessionsApi* | [**GetSessions**](docs/SessionsApi.md#getsessions) | **GET** /jet/sessions | Lists running sessions
*SessionsApi* | [**TerminateSession**](docs/SessionsApi.md#terminatesession) | **POST** /jet/session/{id}/terminate | Terminate forcefully a running session


<a name="documentation-for-models"></a>
Expand Down
2 changes: 1 addition & 1 deletion devolutions-gateway/openapi/dotnet-client/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packageAuthors": "Devolutions Inc.",
"packageName": "Devolutions.Gateway.Client",
"packageTitle": "Devolutions Gateway REST API Client",
"packageVersion": "2022.9.8.0",
"packageVersion": "2022.9.16.0",
"packageDescription": "Client for Devolutions Gateway REST API",
"packageGuid": "EF1E8A60-F71D-4F02-A779-B113740FF5CC",
"packageCopyright": "© Devolutions Inc. All rights reserved.",
Expand Down
97 changes: 97 additions & 0 deletions devolutions-gateway/openapi/dotnet-client/docs/SessionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|--------|--------------|-------------|
| [**GetSessions**](SessionsApi.md#getsessions) | **GET** /jet/sessions | Lists running sessions |
| [**TerminateSession**](SessionsApi.md#terminatesession) | **POST** /jet/session/{id}/terminate | Terminate forcefully a running session |

<a name="getsessions"></a>
# **GetSessions**
Expand Down Expand Up @@ -95,6 +96,102 @@ This endpoint does not need any parameter.
| **400** | Bad request | - |
| **401** | Invalid or missing authorization token | - |
| **403** | Insufficient permissions | - |
| **500** | Unexpected server error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="terminatesession"></a>
# **TerminateSession**
> void TerminateSession (Guid id)
Terminate forcefully a running session

Terminate forcefully a running session

### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Devolutions.Gateway.Client.Api;
using Devolutions.Gateway.Client.Client;
using Devolutions.Gateway.Client.Model;

namespace Example
{
public class TerminateSessionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
// Configure Bearer token for authorization: scope_token
config.AccessToken = "YOUR_BEARER_TOKEN";

var apiInstance = new SessionsApi(config);
var id = "id_example"; // Guid | Session / association ID of the session to terminate
try
{
// Terminate forcefully a running session
apiInstance.TerminateSession(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SessionsApi.TerminateSession: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```

#### Using the TerminateSessionWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.

```csharp
try
{
// Terminate forcefully a running session
apiInstance.TerminateSessionWithHttpInfo(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SessionsApi.TerminateSessionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```

### Parameters

| Name | Type | Description | Notes |
|------|------|-------------|-------|
| **id** | **Guid** | Session / association ID of the session to terminate | |

### Return type

void (empty response body)

### Authorization

[scope_token](../README.md#scope_token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Session terminated successfully | - |
| **400** | Bad request | - |
| **401** | Invalid or missing authorization token | - |
| **403** | Insufficient permissions | - |
| **404** | No running session found with provided ID | - |
| **500** | Unexpected server error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

Loading

0 comments on commit 0b8a8fc

Please sign in to comment.