Raw schema
{
"type": "object",
"properties": {
"projectId": {
"description": "The id of a project kept here (from new_project, validate_project, edit_project or read_share_link), instead of sending the whole project.",
"type": "string"
},
"project": {
"description": "A whole project file to start from instead of a projectId: it's kept here and the reply gives its new projectId.",
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "string"
}
]
},
"ops": {
"minItems": 1,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "add_part"
},
"part": {
"type": "string",
"description": "The part's id from list_parts (\"resistor\", \"ne555\", \"header-pins\"), or the name of one of the project's customIcs."
},
"ref": {
"description": "Its reference designator. The next free one (R1, R2...) when left out.",
"type": "string"
},
"from": {
"description": "Two-lead parts: the hole of lead 1. On a polarized part get_part's leadLabels say which that is: K for a diode or LED, - for an electrolytic.",
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"to": {
"description": "Two-lead parts: the hole of lead 2.",
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"at": {
"description": "Other parts: pin 1's hole (a chip's or pin block's top-left pin).",
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"rotation": {
"description": "Other parts: 0 (default), 90, 180 or 270, clockwise.",
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 90
},
{
"type": "number",
"const": 180
},
{
"type": "number",
"const": 270
}
]
},
"rows": {
"description": "Pin blocks (header-pins): rows of pins.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"cols": {
"description": "Pin blocks (header-pins): pins per row.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"value": {
"description": "E.g. \"10k\", \"100n\".",
"type": "string"
},
"color": {
"description": "Two-lead parts, e.g. an LED's \"#ef4444\".",
"type": "string"
}
},
"required": [
"op",
"part"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "update_part"
},
"ref": {
"type": "string"
},
"by": {
"description": "Move it by [columns, rows].",
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"from": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
},
"to": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
},
"at": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
},
"rotation": {
"description": "Turns about `at`; a chip's widthPin and heightPin are swapped to match.",
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 90
},
{
"type": "number",
"const": 180
},
{
"type": "number",
"const": 270
}
]
},
"rows": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"cols": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"value": {
"description": "\"\" removes it.",
"type": "string"
},
"color": {
"description": "\"\" removes it.",
"type": "string"
},
"newRef": {
"type": "string"
}
},
"required": [
"op",
"ref"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "remove_parts"
},
"refs": {
"minItems": 1,
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"op",
"refs"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "add_wire"
},
"from": {
"anyOf": [
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
{
"type": "string"
}
],
"description": "A hole [column, row], or a pin by name: \"U1.7\", \"U1.DISCH\", \"D1.K\", \"R2.1\" (the hole that pin is in)."
},
"to": {
"anyOf": [
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
{
"type": "string"
}
],
"description": "A hole [column, row], or a pin by name: \"U1.7\", \"U1.DISCH\", \"D1.K\", \"R2.1\" (the hole that pin is in)."
},
"path": {
"description": "Instead of from/to: holes (or pins) to run through in order, made into one wire per leg. Each corner is a wire end, so it joins whatever is in that hole.",
"minItems": 2,
"type": "array",
"items": {
"anyOf": [
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
{
"type": "string"
}
],
"description": "A hole [column, row], or a pin by name: \"U1.7\", \"U1.DISCH\", \"D1.K\", \"R2.1\" (the hole that pin is in)."
}
},
"color": {
"type": "string"
},
"width": {
"type": "number",
"exclusiveMinimum": 0
}
},
"required": [
"op"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "update_wire"
},
"wire": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
}
}
],
"description": "A wire by its index in wires, or by its two end holes [[c, r], [c, r]] (either way round)."
},
"from": {
"anyOf": [
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
{
"type": "string"
}
],
"description": "A hole [column, row], or a pin by name: \"U1.7\", \"U1.DISCH\", \"D1.K\", \"R2.1\" (the hole that pin is in)."
},
"to": {
"anyOf": [
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
{
"type": "string"
}
],
"description": "A hole [column, row], or a pin by name: \"U1.7\", \"U1.DISCH\", \"D1.K\", \"R2.1\" (the hole that pin is in)."
},
"color": {
"type": "string"
},
"width": {
"type": "number",
"exclusiveMinimum": 0
}
},
"required": [
"op",
"wire"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "remove_wires"
},
"wires": {
"minItems": 1,
"type": "array",
"items": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
}
}
],
"description": "A wire by its index in wires, or by its two end holes [[c, r], [c, r]] (either way round)."
},
"description": "Indexes are as they stand before this op, so list several in one op."
}
},
"required": [
"op",
"wires"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "set_board"
},
"cols": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"rows": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"enum": [
"perfboard",
"stripboard"
]
},
"strips": {
"description": "A stripboard's strips.",
"type": "string",
"enum": [
"horizontal",
"vertical"
]
}
},
"required": [
"op"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "add_cuts"
},
"at": {
"minItems": 1,
"type": "array",
"items": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
},
"description": "Stripboard holes to cut the strip at."
}
},
"required": [
"op",
"at"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "remove_cuts"
},
"at": {
"minItems": 1,
"type": "array",
"items": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
}
}
},
"required": [
"op",
"at"
]
},
{
"type": "object",
"properties": {
"op": {
"type": "string",
"const": "set_pad"
},
"at": {
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"description": "A hole, [column, row]."
},
"color": {
"type": "string"
},
"note": {
"description": "Both color and note left out (or \"\") unmarks the hole.",
"type": "string"
}
},
"required": [
"op",
"at"
]
}
]
}
},
"expectNets": {
"description": "The nets the board should make: each a list of pins written REF.pin, e.g. [[\"U1.8\", \"U1.4\", \"R1.1\", \"J1.1\"], [\"U1.2\", \"U1.6\", \"C1.+\"]]. A pin can also be named by its label (\"U1.VCC\", \"D1.K\") or as get_nets writes it (\"U1.8 VCC\"). List every net of two or more pins: a pin in none of them should connect to nothing. With a projectId it's remembered for that project, so later checks use it too; [] forgets it.",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": [
"ops"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}