Skip to content

Commit 4922dce

Browse files
authored
[csolution-rpc] Add DiscoverLayers method
1 parent d400740 commit 4922dce

1 file changed

Lines changed: 90 additions & 1 deletion

File tree

api/csolution-openapi.yml

Lines changed: 90 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,59 @@ 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+
VariablesConfiguration:
829+
type: object
830+
properties:
831+
variables:
832+
type: array
833+
description: Resolved layer variables for each configuration
834+
items:
835+
$ref: '#/components/schemas/LayerVariable'
836+
required:
837+
- variables
838+
DiscoverLayersInfo:
839+
allOf:
840+
- $ref: '#/components/schemas/SuccessResult'
841+
- properties:
842+
configurations:
843+
type: array
844+
description: Possible configurations for the reference application
845+
items:
846+
$ref: '#/components/schemas/VariablesConfiguration'
783847

784848
GetVersionRequest:
785849
allOf:
@@ -1231,6 +1295,31 @@ components:
12311295
- properties:
12321296
result:
12331297
$ref: '#/components/schemas/ConvertSolutionResult'
1298+
DiscoverLayersRequest:
1299+
allOf:
1300+
- $ref: '#/x-jsonrpc-envelope-request'
1301+
- properties:
1302+
method:
1303+
type: string
1304+
const: DiscoverLayers
1305+
params:
1306+
type: object
1307+
properties:
1308+
solution:
1309+
type: string
1310+
description: Path to <solution>.csolution.yml
1311+
activeTarget:
1312+
type: string
1313+
description: Active target set in the format <target-type>[@<set>]
1314+
required:
1315+
- solution
1316+
- activeTarget
1317+
DiscoverLayersResponse:
1318+
allOf:
1319+
- $ref: '#/x-jsonrpc-envelope-response'
1320+
- properties:
1321+
result:
1322+
$ref: '#/components/schemas/DiscoverLayersInfo'
12341323

12351324
x-jsonrpc-envelope-request:
12361325
allOf:

0 commit comments

Comments
 (0)