@shumoku/core · runtime schema
YAML reference
フィールド説明は英語のruntime schemaをcanonical sourceとして表示しています。
Shumoku YAML parserが受け付けるフィールドです。
Document
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
version | string | Document format version | いいえ |
name | string | Topology name | いいえ |
description | string | Topology description | いいえ |
nodes | object[] | Network devices | いいえ |
links | object[] | Connections between nodes | いいえ |
subgraphs | object[] | Logical or hierarchical regions | いいえ |
settings | object | Layout and rendering settings | いいえ |
pins | object[] | Top-level hierarchical boundary pins | いいえ |
Node
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | string | Stable node identifier; a fallback is generated if omitted | いいえ |
label | string | string[] | Displayed node label | いいえ |
shape | string | Node shape such as rounded, rect, circle, or diamond | いいえ |
type | string | Device type used by the default icon resolver | いいえ |
parent | string | Parent subgraph identifier | いいえ |
rank | number | string | Optional layout rank hint | いいえ |
style | object | — | いいえ |
metadata | object | — | いいえ |
vendor | string | Hardware or cloud vendor | いいえ |
service | string | Cloud service name | いいえ |
model | string | Hardware model name | いいえ |
resource | string | — | いいえ |
icon | string | Custom icon URL | いいえ |
identity | any | — | いいえ |
ports | any[] | — | いいえ |
Link
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
id | string | Stable link identifier; a fallback is generated if omitted | いいえ |
from | string | object | Source node or endpoint | はい |
to | string | object | Destination node or endpoint | はい |
label | string | string[] | Displayed link label | いいえ |
type | string | Line style such as solid, dashed, thick, or double | いいえ |
arrow | string | — | いいえ |
standard | string | Ethernet standard applied to both endpoints | いいえ |
cable | object | — | いいえ |
redundancy | string | — | いいえ |
vlan | number | number[] | VLAN ID or trunk VLAN IDs | いいえ |
style | object | — | いいえ |
Settings
| フィールド | 型 | 説明 | 必須 |
|---|---|---|---|
direction | string | Layout direction such as TB or LR | いいえ |
theme | string | Render theme: light or dark | いいえ |
nodeSpacing | number | Spacing between nodes in the same rank | いいえ |
rankSpacing | number | Spacing between layout ranks | いいえ |
subgraphPadding | number | — | いいえ |
canvas | object | — | いいえ |
legend | boolean | object | — | いいえ |
実行可能な例
name: Branch network
nodes:
- id: router
label: Router
type: router
- id: switch
label: Access switch
type: l2-switch
links:
- from: router
to: switch
examples/getting-started.yaml