Skip to content

Commit

Permalink
[Nightly][Added] Missing api.v1.schema.json
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Jan 7, 2025
1 parent a1f5605 commit d869d11
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nightly_full/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ENV TZ=Etc/UTC

COPY kicad_3d_install.sh kicad_version.py /usr/bin/
COPY images.tar.gz /usr/share/kicad/resources/
COPY pcm.v1.schema.json /usr/share/kicad/schemas/
COPY pcm.v1.schema.json api.v1.schema.json /usr/share/kicad/schemas/
COPY fp-lib-table sym-lib-table /usr/share/kicad/template/
124 changes: 124 additions & 0 deletions nightly_full/api.v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://go.kicad.org/api/schemas/v1",
"title": "KiCad API Plugin Schema",
"description": "KiCad IPC API Plugin and Action schema",
"$ref": "#/definitions/Plugin",
"definitions": {
"Plugin": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Plugin identifier",
"pattern": "^[a-zA-Z][-_a-zA-Z0-9.]{0,98}[a-zA-Z0-9]$"
},
"name": {
"type": "string",
"maxLength": 200,
"description": "A human-readable name for your plugin"
},
"description": {
"type": "string",
"maxLength": 500,
"description": "A longer-form description for your plugin (not currently displayed in KiCad)"
},
"runtime": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"python",
"exec"
],
"description": "How KiCad should launch the plugin"
},
"min_version": {
"type": "string",
"description": "Minimum required Python version if runtime is 'python'. Optional; not yet used by KiCad"
}
},
"required": [
"type"
]
},
"actions": {
"type": "array",
"description": "A list of actions your plugin provides, each of which can appear on the toolbar as a button",
"items": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "An identifier for the action, must be unique within a plugin",
"pattern": "^[a-zA-Z][-_a-zA-Z0-9.]{0,48}[a-zA-Z0-9]$"
},
"name": {
"type": "string",
"maxLength": 200,
"description": "A human-readable name for the action (normally a verb or verb phrase)"
},
"description": {
"type": "string",
"maxLength": 500,
"description": "A human-readable description for the action"
},
"show-button": {
"type": "boolean",
"description": "Whether or not to show the action in the toolbar by default"
},
"scopes": {
"type": "array",
"description": "Which areas within KiCad this action is valid for",
"items": {
"type": "string",
"enum": [
"pcb",
"schematic",
"footprint",
"symbol",
"project_manager"
]
}
},
"entrypoint": {
"type": "string",
"description": "The way KiCad should launch this action (for example, the name of a Python script)"
},
"icons-light": {
"type": "array",
"description": "A list of one or more paths to PNG files (use multiple files for high DPI support) to be shown in light mode",
"items": {
"type": "string",
"pattern": "^.*\\.png$"
}
},
"icons-dark": {
"type": "array",
"description": "A list of one or more paths to PNG files (use multiple files for high DPI support) to be shown in dark mode",
"items": {
"type": "string",
"pattern": "^.*\\.png$"
}
}
},
"required": [
"identifier",
"name",
"description",
"entrypoint"
]
}
}
},
"required": [
"identifier",
"name",
"description",
"runtime",
"actions"
]
}
}
}

0 comments on commit d869d11

Please sign in to comment.