From 6d1bb57be0c2193a2180359b95d91b549f085fa4 Mon Sep 17 00:00:00 2001 From: Evgueni Driouk Date: Thu, 27 Nov 2025 16:50:04 +0100 Subject: [PATCH 1/3] Method to select/unselect pack --- api/csolution-openapi.yml | 44 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/api/csolution-openapi.yml b/api/csolution-openapi.yml index 88bc9e2..3d865c7 100644 --- a/api/csolution-openapi.yml +++ b/api/csolution-openapi.yml @@ -98,6 +98,19 @@ paths: '200': description: OK content: {application/json: {schema: {$ref: '#/components/schemas/GetPacksInfoResponse'}}} + /rpc/SelectPack: + post: + summary: Select pack + description: Select pack + tags: [/rpc] + requestBody: + content: {application/json: {schema: {$ref: '#/components/schemas/SelectPackRequest'}}} + responses: + '200': + description: OK + content: {application/json: {schema: {$ref: '#/components/schemas/SelectPackResponse'}}} + + /rpc/GetDeviceList: post: summary: Get device list @@ -244,7 +257,7 @@ paths: /rpc/ListMissingPacks: post: summary: ListMissingPacks - description: List missing (not installed) packs required by the active target-set + description: List missing (not installed) packs required by the active target-set tags: [/rpc] requestBody: content: {application/json: {schema: {$ref: '#/components/schemas/ListMissingPacksRequest'}}} @@ -1010,6 +1023,33 @@ components: - properties: result: $ref: '#/components/schemas/PacksInfo' + SelectPackRequest: + allOf: + - $ref: '#/x-jsonrpc-envelope-request-with-params' + - properties: + method: + type: string + const: SelectPack + params: + type: object + properties: + context: + type: string + select: + type: boolean + description: true to select pack or modify its properties, false to remove selection + pack: + $ref: '#/components/schemas/Pack' + required: + - context + - select + - pack + SelectPackResponse: + allOf: + - $ref: '#/x-jsonrpc-envelope-response' + - properties: + result: + $ref: '#/components/schemas/SuccessResult' GetUsedItemsRequest: allOf: - $ref: '#/x-jsonrpc-envelope-request-with-params' @@ -1276,7 +1316,7 @@ components: filter: $ref: '#/components/schemas/DraftProjectsFilter' required: - - filter + - filter GetDraftProjectsResponse: allOf: - $ref: '#/x-jsonrpc-envelope-response' From 122c8a0352e301321c9fdddd6bff45a123f700f6 Mon Sep 17 00:00:00 2001 From: Evgueni Driouk Date: Tue, 2 Dec 2025 08:51:57 +0100 Subject: [PATCH 2/3] Add all flag to GetPackInfo --- api/csolution-openapi.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/csolution-openapi.yml b/api/csolution-openapi.yml index 3d865c7..89ec5d9 100644 --- a/api/csolution-openapi.yml +++ b/api/csolution-openapi.yml @@ -1015,8 +1015,11 @@ components: properties: context: type: string + all: + type: boolean required: - context + - all GetPacksInfoResponse: allOf: - $ref: '#/x-jsonrpc-envelope-response' From 198fea8d320dcc01f04300a7ad98416697946932 Mon Sep 17 00:00:00 2001 From: Evgueni Driouk Date: Fri, 5 Dec 2025 12:12:50 +0100 Subject: [PATCH 3/3] PackRefenece is added, request and response parameters changed to use it --- api/csolution-openapi.yml | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/api/csolution-openapi.yml b/api/csolution-openapi.yml index 89ec5d9..619d602 100644 --- a/api/csolution-openapi.yml +++ b/api/csolution-openapi.yml @@ -300,21 +300,40 @@ components: pack: type: string description: Originating pack ID + PackReference: + type: object + properties: + pack: + type: string + description: Requested pack ID or range, in the same format as stored in YAML file + resolvedPack: + type: string + description: Resolved pack full ID including version, empty if not resolved + path: + type: string + description: Optional path to local pack + origin: + type: string + description: Originating YAML file + selected: + type: boolean + description: Flag to indicate if reference is selected + required: + - pack + - origin + - selected Pack: allOf: - $ref: '#/components/schemas/Common' - properties: - overview: - type: string - description: Pack overview used: type: boolean description: True when pack is used in the current context references: type: array - description: List of yml files where the pack is referenced + description: List of references in YAML files items: - type: string + $ref: '#/components/schemas/PackReference' PacksInfo: allOf: - $ref: '#/components/schemas/SuccessResult' @@ -692,7 +711,7 @@ components: packs: type: array items: - $ref: '#/components/schemas/Pack' + $ref: '#/components/schemas/PackReference' required: - components - packs @@ -1038,14 +1057,11 @@ components: properties: context: type: string - select: - type: boolean - description: true to select pack or modify its properties, false to remove selection pack: - $ref: '#/components/schemas/Pack' + description: pack data to select/unselect pack or modify its properties + $ref: '#/components/schemas/PackReference' required: - context - - select - pack SelectPackResponse: allOf: