Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Connect Swagger #1705

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connect/dotnet/src/Trinsic.Connect/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private HttpRequestMessage NewRequest(
}
}
}

_ = new List<Tuple<HttpContent, string, string>>();

string contentType = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

using System;
using System.Collections.Generic;
using System.Net;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

Expand Down
7 changes: 3 additions & 4 deletions connect/swagger_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
}
}
},
"/api/v1/sessions/redact": {
"/api/v1/sessions/{sessionId}/redact": {
"post": {
"tags": [
"Sessions"
Expand All @@ -337,10 +337,9 @@
"parameters": [
{
"name": "sessionId",
"in": "query",
"in": "path",
"required": true,
"schema": {
"maxLength": 100,
"minLength": 5,
"type": "string"
}
}
Expand Down
20 changes: 13 additions & 7 deletions connect/typescript/src/apis/SessionsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface ListSessionsOperationRequest {
}

export interface RedactSessionRequest {
sessionId?: string;
sessionId: string;
}

/**
Expand Down Expand Up @@ -286,12 +286,15 @@ export class SessionsApi extends runtime.BaseAPI {
requestParameters: RedactSessionRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};

if (requestParameters["sessionId"] != null) {
queryParameters["sessionId"] = requestParameters["sessionId"];
if (requestParameters["sessionId"] == null) {
throw new runtime.RequiredError(
"sessionId",
'Required parameter "sessionId" was null or undefined when calling redactSession().',
);
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.accessToken) {
Expand All @@ -304,7 +307,10 @@ export class SessionsApi extends runtime.BaseAPI {
}
const response = await this.request(
{
path: `/api/v1/sessions/redact`,
path: `/api/v1/sessions/{sessionId}/redact`.replace(
`{${"sessionId"}}`,
encodeURIComponent(String(requestParameters["sessionId"])),
),
method: "POST",
headers: headerParameters,
query: queryParameters,
Expand All @@ -318,7 +324,7 @@ export class SessionsApi extends runtime.BaseAPI {
/**
*/
async redactSession(
requestParameters: RedactSessionRequest = {},
requestParameters: RedactSessionRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<void> {
await this.redactSessionRaw(requestParameters, initOverrides);
Expand Down
3 changes: 1 addition & 2 deletions connect/typescript/src/models/IDVSessionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export function instanceOfIDVSessionState(value: any): boolean {
for (const key in IDVSessionState) {
if (Object.prototype.hasOwnProperty.call(IDVSessionState, key)) {
if (
(IDVSessionState as Record<string, IDVSessionState>)[key] ===
value
IDVSessionState[key as keyof typeof IDVSessionState] === value
) {
return true;
}
Expand Down
5 changes: 1 addition & 4 deletions connect/typescript/src/models/OrderDirection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ export type OrderDirection =
export function instanceOfOrderDirection(value: any): boolean {
for (const key in OrderDirection) {
if (Object.prototype.hasOwnProperty.call(OrderDirection, key)) {
if (
(OrderDirection as Record<string, OrderDirection>)[key] ===
value
) {
if (OrderDirection[key as keyof typeof OrderDirection] === value) {
return true;
}
}
Expand Down
3 changes: 1 addition & 2 deletions connect/typescript/src/models/SessionFailCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export function instanceOfSessionFailCode(value: any): boolean {
for (const key in SessionFailCode) {
if (Object.prototype.hasOwnProperty.call(SessionFailCode, key)) {
if (
(SessionFailCode as Record<string, SessionFailCode>)[key] ===
value
SessionFailCode[key as keyof typeof SessionFailCode] === value
) {
return true;
}
Expand Down
3 changes: 1 addition & 2 deletions connect/typescript/src/models/SessionOrdering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export function instanceOfSessionOrdering(value: any): boolean {
for (const key in SessionOrdering) {
if (Object.prototype.hasOwnProperty.call(SessionOrdering, key)) {
if (
(SessionOrdering as Record<string, SessionOrdering>)[key] ===
value
SessionOrdering[key as keyof typeof SessionOrdering] === value
) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions connect/typescript/src/models/VerificationFailCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export function instanceOfVerificationFailCode(value: any): boolean {
for (const key in VerificationFailCode) {
if (Object.prototype.hasOwnProperty.call(VerificationFailCode, key)) {
if (
(VerificationFailCode as Record<string, VerificationFailCode>)[
key
VerificationFailCode[
key as keyof typeof VerificationFailCode
] === value
) {
return true;
Expand Down
5 changes: 2 additions & 3 deletions connect/typescript/src/models/VerificationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ export function instanceOfVerificationState(value: any): boolean {
for (const key in VerificationState) {
if (Object.prototype.hasOwnProperty.call(VerificationState, key)) {
if (
(VerificationState as Record<string, VerificationState>)[
key
] === value
VerificationState[key as keyof typeof VerificationState] ===
value
) {
return true;
}
Expand Down