diff --git a/api/csolution-openapi.yml b/api/csolution-openapi.yml index 4d71dd7..788d89d 100644 --- a/api/csolution-openapi.yml +++ b/api/csolution-openapi.yml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: csolution rpc - version: 0.0.2 + version: 0.0.3 description: Specification of remote procedure call methods for CMSIS csolution integration license: name: Apache 2.0 @@ -164,6 +164,17 @@ paths: '200': description: OK content: {application/json: {schema: {$ref: '#/components/schemas/GetLogMessagesResponse'}}} + /rpc/GetDraftProjects: + post: + summary: Get draft projects + description: Get reference applications, examples and solution templates + tags: [/rpc] + requestBody: + content: {application/json: {schema: {$ref: '#/components/schemas/GetDraftProjectsRequest'}}} + responses: + '200': + description: OK + content: {application/json: {schema: {$ref: '#/components/schemas/GetDraftProjectsResponse'}}} components: schemas: @@ -470,6 +481,127 @@ components: items: type: string + DraftProjectsFilter: + type: object + properties: + board: + type: string + description: Board Identifier + device: + type: string + description: Device Identifier + environments: + type: array + items: + type: string + description: Environment names + ExampleEnvironment: + type: object + properties: + name: + type: string + description: Name of the environment + file: + type: string + description: Project file to be loaded + folder: + type: string + description: Folder containing all example files + required: + - name + - file + - folder + ExampleProject: + type: object + properties: + name: + type: string + description: Name of the example + description: + type: string + description: Brief description + doc: + type: string + description: Document that describes the example + version: + type: string + description: Example version number + archive: + type: string + description: Archive file containing all files and sub-folders + pack: + type: string + description: Pack identifier + environments: + type: array + items: + $ref: '#/components/schemas/ExampleEnvironment' + description: List of environments + components: + type: array + items: + type: string + description: List of related components + categories: + type: array + items: + type: string + description: List of categories + keywords: + type: array + items: + type: string + description: List of keywords + required: + - name + - description + - doc + - environments + - pack + SolutionTemplate: + type: object + properties: + name: + type: string + description: Name of the template + description: + type: string + description: Brief description + file: + type: string + description: Name of the *.csolution.yml file + folder: + type: string + description: Folder containing the template + copyTo: + type: string + description: Path to copy the template into the csolution project + pack: + type: string + description: Pack identifier + required: + - name + - description + - file + - folder + - pack + DraftProjectsInfo: + allOf: + - $ref: '#/components/schemas/SuccessResult' + - properties: + examples: + type: array + items: + $ref: '#/components/schemas/ExampleProject' + refApps: + type: array + items: + $ref: '#/components/schemas/ExampleProject' + templates: + type: array + items: + $ref: '#/components/schemas/SolutionTemplate' + GetVersionRequest: allOf: - $ref: '#/x-jsonrpc-envelope-request' @@ -758,6 +890,27 @@ components: result: $ref: '#/components/schemas/LogMessages' + GetDraftProjectsRequest: + allOf: + - $ref: '#/x-jsonrpc-envelope-request-with-params' + - properties: + method: + type: string + const: GetDraftProjects + params: + type: object + properties: + filter: + $ref: '#/components/schemas/DraftProjectsFilter' + required: + - filter + GetDraftProjectsResponse: + allOf: + - $ref: '#/x-jsonrpc-envelope-response' + - properties: + result: + $ref: '#/components/schemas/DraftProjectsInfo' + x-jsonrpc-envelope-request: allOf: - $ref: '#/x-jsonrpc-envelope'