From 48487081c26f78c84f64c12101904da29168aa75 Mon Sep 17 00:00:00 2001 From: Mladen Jablanovic Date: Mon, 9 Dec 2024 13:41:03 +0100 Subject: [PATCH] fix(API): Add missing branch parameter to job comment endpoints #STRINGS-988 --- doc/compiled.json | 67 ++++++++++++--------------------- parameters.yaml | 7 ++++ paths/job_comments/create.yaml | 4 ++ paths/job_comments/destroy.yaml | 7 +--- paths/job_comments/index.yaml | 7 +--- paths/job_comments/show.yaml | 7 +--- paths/job_comments/update.yaml | 4 ++ paths/job_locales/destroy.yaml | 7 +--- paths/job_locales/index.yaml | 7 +--- paths/job_locales/show.yaml | 7 +--- 10 files changed, 46 insertions(+), 78 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index 9186b2d4..e93546ac 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -4848,6 +4848,15 @@ "type": "string" } }, + "branch": { + "name": "branch", + "in": "query", + "description": "Branch to use", + "schema": { + "type": "string" + }, + "example": "my-feature-branch" + }, "page": { "in": "query", "name": "page", @@ -16903,13 +16912,7 @@ "$ref": "#/components/parameters/per_page" }, { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/branch" } ], "responses": { @@ -17116,13 +17119,7 @@ "$ref": "#/components/parameters/id" }, { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/branch" } ], "responses": { @@ -17318,13 +17315,7 @@ "$ref": "#/components/parameters/id" }, { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/branch" } ], "responses": { @@ -26846,13 +26837,7 @@ "$ref": "#/components/parameters/id" }, { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/branch" } ], "responses": { @@ -26974,6 +26959,11 @@ "description": "Comment message", "type": "string", "example": "Some message..." + }, + "branch": { + "description": "Branch name for the job", + "type": "string", + "example": "my-feature-branch" } } } @@ -27003,13 +26993,7 @@ "$ref": "#/components/parameters/id" }, { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/branch" } ], "responses": { @@ -27058,13 +27042,7 @@ "$ref": "#/components/parameters/job_id" }, { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/branch" }, { "description": "Order direction. Can be one of: asc, desc.", @@ -27201,6 +27179,11 @@ "description": "Job comment message", "type": "string", "example": "Some message..." + }, + "branch": { + "description": "Branch name for the job", + "type": "string", + "example": "my-feature-branch" } } } diff --git a/parameters.yaml b/parameters.yaml index a997b081..0a00f0d9 100644 --- a/parameters.yaml +++ b/parameters.yaml @@ -207,6 +207,13 @@ tag: required: false schema: type: string +branch: + name: branch + in: query + description: Branch to use + schema: + type: string + example: my-feature-branch page: in: query name: page diff --git a/paths/job_comments/create.yaml b/paths/job_comments/create.yaml index a2570e33..58a055c9 100644 --- a/paths/job_comments/create.yaml +++ b/paths/job_comments/create.yaml @@ -55,4 +55,8 @@ requestBody: description: Job comment message type: string example: Some message... + branch: + description: Branch name for the job + type: string + example: my-feature-branch x-cli-version: '2.5' diff --git a/paths/job_comments/destroy.yaml b/paths/job_comments/destroy.yaml index d759e8ef..70d10ec0 100644 --- a/paths/job_comments/destroy.yaml +++ b/paths/job_comments/destroy.yaml @@ -9,12 +9,7 @@ parameters: - "$ref": "../../parameters.yaml#/project_id" - "$ref": "../../parameters.yaml#/job_id" - "$ref": "../../parameters.yaml#/id" -- description: specify the branch to use - example: my-feature-branch - name: branch - in: query - schema: - type: string +- "$ref": "../../parameters.yaml#/branch" responses: '204': "$ref": "../../responses.yaml#/204" diff --git a/paths/job_comments/index.yaml b/paths/job_comments/index.yaml index 0b6f1cbd..c1f0bbc3 100644 --- a/paths/job_comments/index.yaml +++ b/paths/job_comments/index.yaml @@ -8,12 +8,7 @@ parameters: - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" - "$ref": "../../parameters.yaml#/project_id" - "$ref": "../../parameters.yaml#/job_id" -- description: specify the branch to use - example: my-feature-branch - name: branch - in: query - schema: - type: string +- "$ref": "../../parameters.yaml#/branch" - description: 'Order direction. Can be one of: asc, desc.' name: order in: query diff --git a/paths/job_comments/show.yaml b/paths/job_comments/show.yaml index daa043ac..044932ec 100644 --- a/paths/job_comments/show.yaml +++ b/paths/job_comments/show.yaml @@ -9,12 +9,7 @@ parameters: - "$ref": "../../parameters.yaml#/project_id" - "$ref": "../../parameters.yaml#/job_id" - "$ref": "../../parameters.yaml#/id" -- description: specify the branch to use - example: my-feature-branch - name: branch - in: query - schema: - type: string +- "$ref": "../../parameters.yaml#/branch" responses: '200': description: OK diff --git a/paths/job_comments/update.yaml b/paths/job_comments/update.yaml index 9eb482af..9a097d67 100644 --- a/paths/job_comments/update.yaml +++ b/paths/job_comments/update.yaml @@ -57,4 +57,8 @@ requestBody: description: Comment message type: string example: Some message... + branch: + description: Branch name for the job + type: string + example: my-feature-branch x-cli-version: '2.5' diff --git a/paths/job_locales/destroy.yaml b/paths/job_locales/destroy.yaml index c6c42f8d..888fd87a 100644 --- a/paths/job_locales/destroy.yaml +++ b/paths/job_locales/destroy.yaml @@ -9,12 +9,7 @@ parameters: - "$ref": "../../parameters.yaml#/project_id" - "$ref": "../../parameters.yaml#/job_id" - "$ref": "../../parameters.yaml#/id" -- description: specify the branch to use - example: my-feature-branch - name: branch - in: query - schema: - type: string +- "$ref": "../../parameters.yaml#/branch" responses: '204': "$ref": "../../responses.yaml#/204" diff --git a/paths/job_locales/index.yaml b/paths/job_locales/index.yaml index ccea4195..f0cb3883 100644 --- a/paths/job_locales/index.yaml +++ b/paths/job_locales/index.yaml @@ -10,12 +10,7 @@ parameters: - "$ref": "../../parameters.yaml#/job_id" - "$ref": "../../parameters.yaml#/page" - "$ref": "../../parameters.yaml#/per_page" -- description: specify the branch to use - example: my-feature-branch - name: branch - in: query - schema: - type: string +- "$ref": "../../parameters.yaml#/branch" responses: '200': description: OK diff --git a/paths/job_locales/show.yaml b/paths/job_locales/show.yaml index eeeaab3f..bc0f08e5 100644 --- a/paths/job_locales/show.yaml +++ b/paths/job_locales/show.yaml @@ -9,12 +9,7 @@ parameters: - "$ref": "../../parameters.yaml#/project_id" - "$ref": "../../parameters.yaml#/job_id" - "$ref": "../../parameters.yaml#/id" -- description: specify the branch to use - example: my-feature-branch - name: branch - in: query - schema: - type: string +- "$ref": "../../parameters.yaml#/branch" responses: '200': description: OK