From bb7ee3851cef90603903471a3273c5dbe4f2ba62 Mon Sep 17 00:00:00 2001 From: Chen-I Lim <46905241+chenilim@users.noreply.github.com> Date: Mon, 18 Apr 2022 22:53:41 -0700 Subject: [PATCH] Fix Swagger schema for OnboardingResponse (#2838) * Upgrade npm in build-ubuntu * npm i -S moment * Don't upgrade npm * macos-latest on build-mac * Update dev-release.yml * Fix Swagger schema --- server/api/api.go | 9 ++++++++- server/swagger/docs/html/index.html | 23 ++++++++++++++++++----- server/swagger/swagger.yml | 9 ++++++++- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/server/api/api.go b/server/api/api.go index f2bed6dd6..76d8e4a29 100644 --- a/server/api/api.go +++ b/server/api/api.go @@ -2566,7 +2566,14 @@ func (a *API) handleOnboard(w http.ResponseWriter, r *http.Request) { // '200': // description: success // schema: - // "$ref": "#/definitions/OnboardingResponse" + // type: object + // properties: + // teamID: + // type: string + // description: Team ID + // boardID: + // type: string + // description: Board ID // default: // description: internal error // schema: diff --git a/server/swagger/docs/html/index.html b/server/swagger/docs/html/index.html index 768a26432..fd66ff41a 100644 --- a/server/swagger/docs/html/index.html +++ b/server/swagger/docs/html/index.html @@ -1497,6 +1497,19 @@ ul.nav-tabs { }, "description" : "FileUploadResponse is the response to a file upload", "x-go-package" : "github.com/mattermost/focalboard/server/api" +}; + defs["inline_response_200"] = { + "type" : "object", + "properties" : { + "boardID" : { + "type" : "string", + "description" : "Board ID" + }, + "teamID" : { + "type" : "string", + "description" : "Team ID" + } + } }; defs["LoginRequest"] = { "required" : [ "password", "type" ], @@ -18877,7 +18890,7 @@ public class DefaultApiExample { String teamID = teamID_example; // String | Team ID try { - OnboardingResponse result = apiInstance.onboard(teamID); + inline_response_200 result = apiInstance.onboard(teamID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DefaultApi#onboard"); @@ -18897,7 +18910,7 @@ public class DefaultApiExample { String teamID = teamID_example; // String | Team ID try { - OnboardingResponse result = apiInstance.onboard(teamID); + inline_response_200 result = apiInstance.onboard(teamID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DefaultApi#onboard"); @@ -18925,7 +18938,7 @@ String *teamID = teamID_example; // Team ID (default to null) // Onboards a user on Boards. [apiInstance onboardWith:teamID - completionHandler: ^(OnboardingResponse output, NSError* error) { + completionHandler: ^(inline_response_200 output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -18988,7 +19001,7 @@ namespace Example try { // Onboards a user on Boards. - OnboardingResponse result = apiInstance.onboard(teamID); + inline_response_200 result = apiInstance.onboard(teamID); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling DefaultApi.onboard: " + e.Message ); @@ -19161,7 +19174,7 @@ Team ID "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/OnboardingResponse" + "$ref" : "#/components/schemas/inline_response_200" } } } diff --git a/server/swagger/swagger.yml b/server/swagger/swagger.yml index 8d0f05f11..897055823 100644 --- a/server/swagger/swagger.yml +++ b/server/swagger/swagger.yml @@ -1779,7 +1779,14 @@ paths: "200": description: success schema: - $ref: '#/definitions/OnboardingResponse' + properties: + boardID: + description: Board ID + type: string + teamID: + description: Team ID + type: string + type: object default: description: internal error schema: