Skip to content

Commit 8a4e18b

Browse files
committed
[csolution-rpc] Add DiscoverLayers method
1 parent d400740 commit 8a4e18b

1 file changed

Lines changed: 102 additions & 1 deletion

File tree

api/csolution-openapi.yml

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.1.0
22
info:
33
title: csolution rpc
4-
version: 0.0.4
4+
version: 0.0.5
55
description: Specification of remote procedure call methods for CMSIS csolution integration
66
license:
77
name: Apache 2.0
@@ -230,6 +230,17 @@ paths:
230230
'200':
231231
description: OK
232232
content: {application/json: {schema: {$ref: '#/components/schemas/ConvertSolutionResponse'}}}
233+
/rpc/DiscoverLayers:
234+
post:
235+
summary: DiscoverLayers
236+
description: List compatible layers for the undefined variables in the loaded solution
237+
tags: [/rpc]
238+
requestBody:
239+
content: {application/json: {schema: {$ref: '#/components/schemas/DiscoverLayersRequest'}}}
240+
responses:
241+
'200':
242+
description: OK
243+
content: {application/json: {schema: {$ref: '#/components/schemas/DiscoverLayersResponse'}}}
233244

234245
components:
235246
schemas:
@@ -780,6 +791,71 @@ components:
780791
type: array
781792
items:
782793
$ref: '#/components/schemas/SolutionTemplate'
794+
LayerVariable:
795+
type: object
796+
properties:
797+
name:
798+
type: string
799+
description: Unique variable name for the layer
800+
clayer:
801+
type: string
802+
description: Resolved *.clayer.yml file path
803+
description:
804+
type: string
805+
description: Brief description text (from *.clayer.yml)
806+
settings:
807+
type: array
808+
description: List of connection sets
809+
items:
810+
type: object
811+
properties:
812+
set:
813+
type: string
814+
required:
815+
- set
816+
path:
817+
type: string
818+
description: Path to the directory that contains the layer (from *.PDSC file)
819+
file:
820+
type: string
821+
description: Name of the *.clayer.yml file relative to the directory specified with path (from *.PDSC file)
822+
copy-to:
823+
type: string
824+
description: Proposed directory for the layer in the csolution project (from *.PDSC file)
825+
required:
826+
- name
827+
- clayer
828+
ConfigurationVariables:
829+
type: object
830+
properties:
831+
variables:
832+
type: array
833+
description: Resolved compatible layer variables
834+
items:
835+
$ref: '#/components/schemas/LayerVariable'
836+
required:
837+
- variables
838+
ProjectConfigurations:
839+
type: object
840+
properties:
841+
project:
842+
type: string
843+
configurations:
844+
type: array
845+
items:
846+
$ref: '#/components/schemas/ConfigurationVariables'
847+
required:
848+
- project
849+
- configurations
850+
DiscoverLayersInfo:
851+
allOf:
852+
- $ref: '#/components/schemas/SuccessResult'
853+
- properties:
854+
projects:
855+
type: array
856+
description: Possible configurations grouped by project
857+
items:
858+
$ref: '#/components/schemas/ProjectConfigurations'
783859

784860
GetVersionRequest:
785861
allOf:
@@ -1231,6 +1307,31 @@ components:
12311307
- properties:
12321308
result:
12331309
$ref: '#/components/schemas/ConvertSolutionResult'
1310+
DiscoverLayersRequest:
1311+
allOf:
1312+
- $ref: '#/x-jsonrpc-envelope-request'
1313+
- properties:
1314+
method:
1315+
type: string
1316+
const: DiscoverLayers
1317+
params:
1318+
type: object
1319+
properties:
1320+
solution:
1321+
type: string
1322+
description: Path to <solution>.csolution.yml
1323+
activeTarget:
1324+
type: string
1325+
description: Active target set in the format <target-type>[@<set>]
1326+
required:
1327+
- solution
1328+
- activeTarget
1329+
DiscoverLayersResponse:
1330+
allOf:
1331+
- $ref: '#/x-jsonrpc-envelope-response'
1332+
- properties:
1333+
result:
1334+
$ref: '#/components/schemas/DiscoverLayersInfo'
12341335

12351336
x-jsonrpc-envelope-request:
12361337
allOf:

0 commit comments

Comments
 (0)