From c313246ddd265060f6bd7cc346b3f8adbb297897 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 2 Dec 2021 04:14:44 -0500 Subject: [PATCH] docs: restructured OpenAPI docs --- doc/openapi/components/schemas/config.yaml | 4 +- .../components/schemas/config/format_obj.yaml | 24 +++++ .../{formatspec.yaml => format_spec.yaml} | 7 +- .../schemas/config/formats/_csv.yaml | 3 + .../schemas/config/formats/_gtnet.yaml | 3 + .../schemas/config/formats/_iotagent_ul.yaml | 3 + .../schemas/config/formats/_json.yaml | 3 + .../config/formats/_json_edgeflex.yaml | 3 + .../schemas/config/formats/_json_kafka.yaml | 3 + .../schemas/config/formats/_json_reserve.yaml | 3 + .../schemas/config/formats/_protobuf.yaml | 3 + .../schemas/config/formats/_raw.yaml | 3 + .../schemas/config/formats/_tsv.yaml | 3 + .../schemas/config/formats/_value.yaml | 3 + .../config/formats/_villas_binary.yaml | 3 + .../schemas/config/formats/_villas_human.yaml | 3 + .../schemas/config/formats/_villas_web.yaml | 3 + .../{format.yaml => formats/common.yaml} | 25 ----- .../schemas/config/formats/csv.yaml | 2 +- .../schemas/config/formats/gtnet.yaml | 4 - .../schemas/config/formats/iotagent_ul.yaml | 2 +- .../schemas/config/formats/json.yaml | 2 +- .../schemas/config/formats/json_edgeflex.yaml | 2 +- .../schemas/config/formats/json_kafka.yaml | 2 +- .../schemas/config/formats/json_reserve.yaml | 2 +- .../schemas/config/formats/line.yaml | 10 +- .../schemas/config/formats/protobuf.yaml | 2 +- .../schemas/config/formats/raw.yaml | 2 +- .../schemas/config/formats/tsv.yaml | 2 +- .../schemas/config/formats/value.yaml | 2 +- .../schemas/config/formats/villas_binary.yaml | 2 +- .../schemas/config/formats/villas_human.yaml | 2 +- .../schemas/config/formats/villas_web.yaml | 2 +- .../components/schemas/config/node.yaml | 97 ------------------- .../components/schemas/config/node_obj.yaml | 48 +++++++++ .../schemas/config/nodes/_amqp.yaml | 3 + .../components/schemas/config/nodes/_can.yaml | 3 + .../schemas/config/nodes/_comedi.yaml | 3 + .../schemas/config/nodes/_ethercat.yaml | 3 + .../schemas/config/nodes/_exec.yaml | 3 + .../schemas/config/nodes/_file.yaml | 3 + .../schemas/config/nodes/_fpga.yaml | 3 + .../schemas/config/nodes/_iec61850-8-1.yaml | 3 + .../schemas/config/nodes/_iec61850-9-2.yaml | 3 + .../schemas/config/nodes/_infiniband.yaml | 3 + .../schemas/config/nodes/_influxdb.yaml | 3 + .../schemas/config/nodes/_kafka.yaml | 3 + .../schemas/config/nodes/_loopback.yaml | 3 + .../schemas/config/nodes/_mqtt.yaml | 3 + .../schemas/config/nodes/_nanomsg.yaml | 3 + .../schemas/config/nodes/_ngsi.yaml | 3 + .../schemas/config/nodes/_opal.yaml | 3 + .../schemas/config/nodes/_redis.yaml | 3 + .../components/schemas/config/nodes/_rtp.yaml | 3 + .../schemas/config/nodes/_shmem.yaml | 3 + .../schemas/config/nodes/_signal.yaml | 3 + .../schemas/config/nodes/_signal_v2.yaml | 3 + .../schemas/config/nodes/_socket.yaml | 3 + .../schemas/config/nodes/_stats_node.yaml | 3 + .../schemas/config/nodes/_temper.yaml | 3 + .../schemas/config/nodes/_test_rtt.yaml | 3 + .../schemas/config/nodes/_uldaq.yaml | 3 + .../schemas/config/nodes/_websocket.yaml | 3 + .../schemas/config/nodes/_zeromq.yaml | 3 + .../components/schemas/config/nodes/amqp.yaml | 43 +++++++- .../components/schemas/config/nodes/can.yaml | 4 +- .../schemas/config/nodes/comedi.yaml | 4 +- .../schemas/config/nodes/common.yaml | 50 ++++++++++ .../schemas/config/nodes/ethercat.yaml | 4 +- .../components/schemas/config/nodes/exec.yaml | 44 ++++++++- .../components/schemas/config/nodes/file.yaml | 27 +++++- .../components/schemas/config/nodes/fpga.yaml | 5 +- .../schemas/config/nodes/iec61850-8-1.yaml | 5 +- .../schemas/config/nodes/iec61850-9-2.yaml | 5 +- .../schemas/config/nodes/infiniband.yaml | 5 +- .../schemas/config/nodes/influxdb.yaml | 5 +- .../schemas/config/nodes/kafka.yaml | 5 +- .../schemas/config/nodes/loopback.yaml | 5 +- .../components/schemas/config/nodes/mqtt.yaml | 5 +- .../schemas/config/nodes/nanomsg.yaml | 5 +- .../components/schemas/config/nodes/ngsi.yaml | 5 +- .../components/schemas/config/nodes/opal.yaml | 5 +- .../schemas/config/nodes/redis.yaml | 5 +- .../components/schemas/config/nodes/rtp.yaml | 5 +- .../schemas/config/nodes/shmem.yaml | 5 +- .../schemas/config/nodes/signal.yaml | 5 +- .../schemas/config/nodes/signal_v2.yaml | 5 +- .../schemas/config/nodes/socket.yaml | 5 +- .../schemas/config/nodes/stats_node.yaml | 5 +- .../schemas/config/nodes/temper.yaml | 5 +- .../schemas/config/nodes/test_rtt.yaml | 5 +- .../schemas/config/nodes/uldaq.yaml | 5 +- .../schemas/config/nodes/websocket.yaml | 5 +- .../schemas/config/nodes/zeromq.yaml | 5 +- doc/openapi/openapi.yaml | 9 ++ 95 files changed, 468 insertions(+), 206 deletions(-) create mode 100644 doc/openapi/components/schemas/config/format_obj.yaml rename doc/openapi/components/schemas/config/{formatspec.yaml => format_spec.yaml} (57%) create mode 100644 doc/openapi/components/schemas/config/formats/_csv.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_gtnet.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_iotagent_ul.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_json.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_json_kafka.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_json_reserve.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_protobuf.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_raw.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_tsv.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_value.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_villas_binary.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_villas_human.yaml create mode 100644 doc/openapi/components/schemas/config/formats/_villas_web.yaml rename doc/openapi/components/schemas/config/{format.yaml => formats/common.yaml} (61%) delete mode 100644 doc/openapi/components/schemas/config/node.yaml create mode 100644 doc/openapi/components/schemas/config/node_obj.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_amqp.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_can.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_comedi.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_ethercat.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_exec.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_file.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_fpga.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_infiniband.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_influxdb.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_kafka.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_loopback.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_mqtt.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_nanomsg.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_ngsi.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_opal.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_redis.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_rtp.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_shmem.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_signal.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_signal_v2.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_socket.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_stats_node.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_temper.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_test_rtt.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_uldaq.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_websocket.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/_zeromq.yaml create mode 100644 doc/openapi/components/schemas/config/nodes/common.yaml diff --git a/doc/openapi/components/schemas/config.yaml b/doc/openapi/components/schemas/config.yaml index 1db1b9625..c546886c8 100644 --- a/doc/openapi/components/schemas/config.yaml +++ b/doc/openapi/components/schemas/config.yaml @@ -11,7 +11,7 @@ allOf: additionalProperties: false - properties: + properties: nodes: type: object title: Node list @@ -19,7 +19,7 @@ allOf: A list of nodes to/from which this instance sends/receives sample data. additionalProperties: x-additionalPropertiesName: node-name - $ref: ./config/node.yaml + $ref: ./config/node_obj.yaml paths: title: Path list diff --git a/doc/openapi/components/schemas/config/format_obj.yaml b/doc/openapi/components/schemas/config/format_obj.yaml new file mode 100644 index 000000000..36c0dc73c --- /dev/null +++ b/doc/openapi/components/schemas/config/format_obj.yaml @@ -0,0 +1,24 @@ +type: object +title: Format Object +required: +- type +properties: + type: + type: string +discriminator: + propertyName: type + mapping: + csv: formats/_csv.yaml + gtnet: formats/_gtnet.yaml + iotagent_ul: formats/_iotagent_ul.yaml + json: formats/_json.yaml + json.edgeflex: formats/_json_edgeflex.yaml + json.kafka: formats/_json_kafka.yaml + json.reserve: formats/_json_reserve.yaml + protobuf: formats/_protobuf.yaml + raw: formats/_raw.yaml + tsv: formats/_tsv.yaml + value: formats/_value.yaml + villas.binary: formats/_villas_binary.yaml + villas.human: formats/_villas_human.yaml + villas.web: formats/_villas_web.yaml diff --git a/doc/openapi/components/schemas/config/formatspec.yaml b/doc/openapi/components/schemas/config/format_spec.yaml similarity index 57% rename from doc/openapi/components/schemas/config/formatspec.yaml rename to doc/openapi/components/schemas/config/format_spec.yaml index 8b59aee83..6292f0de6 100644 --- a/doc/openapi/components/schemas/config/formatspec.yaml +++ b/doc/openapi/components/schemas/config/format_spec.yaml @@ -1,8 +1,11 @@ --- +description: | + The payload format which is used to encode and decode exchanged messages. oneOf: -- $ref: format.yaml -- type: string +- $ref: format_obj.yaml +- title: Format Name + type: string enum: - csv - gtnet diff --git a/doc/openapi/components/schemas/config/formats/_csv.yaml b/doc/openapi/components/schemas/config/formats/_csv.yaml new file mode 100644 index 000000000..f44b43a42 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_csv.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: csv.yaml diff --git a/doc/openapi/components/schemas/config/formats/_gtnet.yaml b/doc/openapi/components/schemas/config/formats/_gtnet.yaml new file mode 100644 index 000000000..0b90d185e --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_gtnet.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: gtnet.yaml diff --git a/doc/openapi/components/schemas/config/formats/_iotagent_ul.yaml b/doc/openapi/components/schemas/config/formats/_iotagent_ul.yaml new file mode 100644 index 000000000..9ec5939bf --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_iotagent_ul.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: iotagent_ul.yaml diff --git a/doc/openapi/components/schemas/config/formats/_json.yaml b/doc/openapi/components/schemas/config/formats/_json.yaml new file mode 100644 index 000000000..402bdbaa2 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_json.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: json.yaml diff --git a/doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml b/doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml new file mode 100644 index 000000000..5f0f4f2c0 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_json_edgeflex.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: json_edgeflex.yaml diff --git a/doc/openapi/components/schemas/config/formats/_json_kafka.yaml b/doc/openapi/components/schemas/config/formats/_json_kafka.yaml new file mode 100644 index 000000000..538128471 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_json_kafka.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: json_kafka.yaml diff --git a/doc/openapi/components/schemas/config/formats/_json_reserve.yaml b/doc/openapi/components/schemas/config/formats/_json_reserve.yaml new file mode 100644 index 000000000..82d883689 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_json_reserve.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: json_reserve.yaml diff --git a/doc/openapi/components/schemas/config/formats/_protobuf.yaml b/doc/openapi/components/schemas/config/formats/_protobuf.yaml new file mode 100644 index 000000000..ac4852a41 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_protobuf.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: protobuf.yaml diff --git a/doc/openapi/components/schemas/config/formats/_raw.yaml b/doc/openapi/components/schemas/config/formats/_raw.yaml new file mode 100644 index 000000000..1f867b024 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_raw.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: raw.yaml diff --git a/doc/openapi/components/schemas/config/formats/_tsv.yaml b/doc/openapi/components/schemas/config/formats/_tsv.yaml new file mode 100644 index 000000000..769ebeca4 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_tsv.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: tsv.yaml diff --git a/doc/openapi/components/schemas/config/formats/_value.yaml b/doc/openapi/components/schemas/config/formats/_value.yaml new file mode 100644 index 000000000..e64e79d37 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_value.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: value.yaml diff --git a/doc/openapi/components/schemas/config/formats/_villas_binary.yaml b/doc/openapi/components/schemas/config/formats/_villas_binary.yaml new file mode 100644 index 000000000..d08f0e3e1 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_villas_binary.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: villas_binary.yaml diff --git a/doc/openapi/components/schemas/config/formats/_villas_human.yaml b/doc/openapi/components/schemas/config/formats/_villas_human.yaml new file mode 100644 index 000000000..5dcaabb08 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_villas_human.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: villas_human.yaml diff --git a/doc/openapi/components/schemas/config/formats/_villas_web.yaml b/doc/openapi/components/schemas/config/formats/_villas_web.yaml new file mode 100644 index 000000000..9f9d4cb79 --- /dev/null +++ b/doc/openapi/components/schemas/config/formats/_villas_web.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../format_obj.yaml +- $ref: villas_web.yaml diff --git a/doc/openapi/components/schemas/config/format.yaml b/doc/openapi/components/schemas/config/formats/common.yaml similarity index 61% rename from doc/openapi/components/schemas/config/format.yaml rename to doc/openapi/components/schemas/config/formats/common.yaml index 9241e8616..a1175144d 100644 --- a/doc/openapi/components/schemas/config/format.yaml +++ b/doc/openapi/components/schemas/config/formats/common.yaml @@ -2,14 +2,7 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema type: object - -required: -- type - properties: - type: - type: string - description: The format-type real_precission: type: integer @@ -43,21 +36,3 @@ properties: description: | If set, include the offset between origin and received timestamp in the output. - -discriminator: - propertyName: type - mapping: - csv: formats/csv.yaml - iotagent_ul: formats/iotagent_ul.yaml - json: formats/json.yaml - json.reserve: formats/json_reserve.yaml - json.kafka: formats/json_kafka.yaml - json.edgeflex: formats/json_edgeflex.yaml - gtnet: formats/gtnet.yaml - protobuf: formats/protobuf.yaml - raw: formats/raw.yaml - tsv: formats/tsv.yaml - value: formats/value.yaml - villas.binary: formats/villas_binary.yaml - villas.human: formats/villas_human.yaml - villas.web: formats/villas_web.yaml diff --git a/doc/openapi/components/schemas/config/formats/csv.yaml b/doc/openapi/components/schemas/config/formats/csv.yaml index 70ef4dbe9..700ec2dd0 100644 --- a/doc/openapi/components/schemas/config/formats/csv.yaml +++ b/doc/openapi/components/schemas/config/formats/csv.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: column.yaml - type: object properties: delimiter: type: string +- $ref: column.yaml diff --git a/doc/openapi/components/schemas/config/formats/gtnet.yaml b/doc/openapi/components/schemas/config/formats/gtnet.yaml index 63ca84f39..a096f1ad5 100644 --- a/doc/openapi/components/schemas/config/formats/gtnet.yaml +++ b/doc/openapi/components/schemas/config/formats/gtnet.yaml @@ -3,7 +3,3 @@ allOf: - $ref: raw.yaml -- type: object - properties: - delimiter: - type: string diff --git a/doc/openapi/components/schemas/config/formats/iotagent_ul.yaml b/doc/openapi/components/schemas/config/formats/iotagent_ul.yaml index e9e655916..657125d24 100644 --- a/doc/openapi/components/schemas/config/formats/iotagent_ul.yaml +++ b/doc/openapi/components/schemas/config/formats/iotagent_ul.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../format.yaml - type: object properties: delimiter: type: string +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/formats/json.yaml b/doc/openapi/components/schemas/config/formats/json.yaml index 1897e6524..c79fc638b 100644 --- a/doc/openapi/components/schemas/config/formats/json.yaml +++ b/doc/openapi/components/schemas/config/formats/json.yaml @@ -2,7 +2,6 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../format.yaml - type: object properties: indent: @@ -39,3 +38,4 @@ allOf: default: false description: Escape the `/` characters in strings with `\/`. +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/formats/json_edgeflex.yaml b/doc/openapi/components/schemas/config/formats/json_edgeflex.yaml index 27a0aedb0..756b371a4 100644 --- a/doc/openapi/components/schemas/config/formats/json_edgeflex.yaml +++ b/doc/openapi/components/schemas/config/formats/json_edgeflex.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: json.yaml - type: object properties: delimiter: type: string +- $ref: json.yaml diff --git a/doc/openapi/components/schemas/config/formats/json_kafka.yaml b/doc/openapi/components/schemas/config/formats/json_kafka.yaml index 27a0aedb0..756b371a4 100644 --- a/doc/openapi/components/schemas/config/formats/json_kafka.yaml +++ b/doc/openapi/components/schemas/config/formats/json_kafka.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: json.yaml - type: object properties: delimiter: type: string +- $ref: json.yaml diff --git a/doc/openapi/components/schemas/config/formats/json_reserve.yaml b/doc/openapi/components/schemas/config/formats/json_reserve.yaml index 27a0aedb0..756b371a4 100644 --- a/doc/openapi/components/schemas/config/formats/json_reserve.yaml +++ b/doc/openapi/components/schemas/config/formats/json_reserve.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: json.yaml - type: object properties: delimiter: type: string +- $ref: json.yaml diff --git a/doc/openapi/components/schemas/config/formats/line.yaml b/doc/openapi/components/schemas/config/formats/line.yaml index 446e257bc..43a85268f 100644 --- a/doc/openapi/components/schemas/config/formats/line.yaml +++ b/doc/openapi/components/schemas/config/formats/line.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: - - $ref: ../format.yaml - - type: object - properties: - separator: - type: string +- type: object + properties: + separator: + type: string +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/formats/protobuf.yaml b/doc/openapi/components/schemas/config/formats/protobuf.yaml index e9e655916..657125d24 100644 --- a/doc/openapi/components/schemas/config/formats/protobuf.yaml +++ b/doc/openapi/components/schemas/config/formats/protobuf.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../format.yaml - type: object properties: delimiter: type: string +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/formats/raw.yaml b/doc/openapi/components/schemas/config/formats/raw.yaml index e9e655916..657125d24 100644 --- a/doc/openapi/components/schemas/config/formats/raw.yaml +++ b/doc/openapi/components/schemas/config/formats/raw.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../format.yaml - type: object properties: delimiter: type: string +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/formats/tsv.yaml b/doc/openapi/components/schemas/config/formats/tsv.yaml index 70ef4dbe9..700ec2dd0 100644 --- a/doc/openapi/components/schemas/config/formats/tsv.yaml +++ b/doc/openapi/components/schemas/config/formats/tsv.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: column.yaml - type: object properties: delimiter: type: string +- $ref: column.yaml diff --git a/doc/openapi/components/schemas/config/formats/value.yaml b/doc/openapi/components/schemas/config/formats/value.yaml index e9e655916..657125d24 100644 --- a/doc/openapi/components/schemas/config/formats/value.yaml +++ b/doc/openapi/components/schemas/config/formats/value.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../format.yaml - type: object properties: delimiter: type: string +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/formats/villas_binary.yaml b/doc/openapi/components/schemas/config/formats/villas_binary.yaml index e9e655916..657125d24 100644 --- a/doc/openapi/components/schemas/config/formats/villas_binary.yaml +++ b/doc/openapi/components/schemas/config/formats/villas_binary.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../format.yaml - type: object properties: delimiter: type: string +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/formats/villas_human.yaml b/doc/openapi/components/schemas/config/formats/villas_human.yaml index 69984c417..f5ee0dd10 100644 --- a/doc/openapi/components/schemas/config/formats/villas_human.yaml +++ b/doc/openapi/components/schemas/config/formats/villas_human.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: line.yaml - type: object properties: delimiter: type: string +- $ref: line.yaml diff --git a/doc/openapi/components/schemas/config/formats/villas_web.yaml b/doc/openapi/components/schemas/config/formats/villas_web.yaml index 7c54fb18d..3af733d76 100644 --- a/doc/openapi/components/schemas/config/formats/villas_web.yaml +++ b/doc/openapi/components/schemas/config/formats/villas_web.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: villas_binary.yaml - type: object properties: delimiter: type: string +- $ref: villas_binary.yaml diff --git a/doc/openapi/components/schemas/config/node.yaml b/doc/openapi/components/schemas/config/node.yaml deleted file mode 100644 index 3b854ee53..000000000 --- a/doc/openapi/components/schemas/config/node.yaml +++ /dev/null @@ -1,97 +0,0 @@ ---- -# yaml-language-server: $schema=http://json-schema.org/draft-07/schema - -type: object - -title: Node - -required: -- type - -properties: - - type: - type: string - description: | - Specifies which protocol should be used by this node. - - For a complete list of supported node-types run `villas node --help`. - - In addition to the node settings described in this section, every node type has its own specific settings - - vectorize: - type: integer - default: 1 - description: | - This setting allows to send multiple samples in a single message to the destination nodes. - - The value of this setting determines how many samples will be combined into one packet. - - hooks: - $ref: hooklist.yaml - - builtin: - type: boolean - default: true - title: Builtin hook functions - description: | - By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled. - - in: - type: object - properties: - vectorize: - type: integer - minimum: 1 - - signals: - $ref: signallist.yaml - - hooks: - $ref: hooklist.yaml - - out: - type: object - properties: - - vectorize: - type: integer - - hooks: - $ref: hooklist.yaml - - netem: - $ref: netem.yaml - -discriminator: - propertyName: type - mapping: - amqp: nodes/amqp.yaml - can: nodes/can.yaml - comedi: nodes/comedi.yaml - ethercat: nodes/ethercat.yaml - exec: nodes/exec.yaml - file: nodes/file.yaml - fpga: nodes/fpga.yaml - iec61850-8-1: nodes/iec61850-8-1.yaml - iec61850-9-2: nodes/iec61850-9-2.yaml - infiniband: nodes/infiniband.yaml - influxdb: nodes/influxdb.yaml - kafka: nodes/kafka.yaml - loopback: nodes/loopback.yaml - mqtt: nodes/mqtt.yaml - nanomsg: nodes/nanomsg.yaml - ngsi: nodes/ngsi.yaml - opal: nodes/opal.yaml - redis: nodes/redis.yaml - rtp: nodes/rtp.yaml - shmem: nodes/shmem.yaml - signal.v2: nodes/signal_v2.yaml - signal: nodes/signal.yaml - socket: nodes/socket.yaml - stats: nodes/stats_node.yaml - temper: nodes/temper.yaml - test_rtt: nodes/test_rtt.yaml - uldaq: nodes/uldaq.yaml - websocket: nodes/websocket.yaml - zeromq: nodes/zeromq.yaml diff --git a/doc/openapi/components/schemas/config/node_obj.yaml b/doc/openapi/components/schemas/config/node_obj.yaml new file mode 100644 index 000000000..9ac8e0a32 --- /dev/null +++ b/doc/openapi/components/schemas/config/node_obj.yaml @@ -0,0 +1,48 @@ +--- +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema + +type: object +title: Format Object +required: +- type +properties: + type: + type: string + description: | + Specifies which protocol should be used by this node. + + For a complete list of supported node-types run `villas node --help`. + + In addition to the node settings described in this section, every node type has its own specific settings +discriminator: + propertyName: type + mapping: + amqp: nodes/_amqp.yaml + can: nodes/_can.yaml + comedi: nodes/_comedi.yaml + ethercat: nodes/_ethercat.yaml + exec: nodes/_exec.yaml + file: nodes/_file.yaml + fpga: nodes/_fpga.yaml + iec61850-8-1: nodes/_iec61850-8-1.yaml + iec61850-9-2: nodes/_iec61850-9-2.yaml + infiniband: nodes/_infiniband.yaml + influxdb: nodes/_influxdb.yaml + kafka: nodes/_kafka.yaml + loopback: nodes/_loopback.yaml + mqtt: nodes/_mqtt.yaml + nanomsg: nodes/_nanomsg.yaml + ngsi: nodes/_ngsi.yaml + opal: nodes/_opal.yaml + redis: nodes/_redis.yaml + rtp: nodes/_rtp.yaml + shmem: nodes/_shmem.yaml + signal.v2: nodes/_signal_v2.yaml + signal: nodes/_signal.yaml + socket: nodes/_socket.yaml + stats_node: nodes/_stats_node.yaml + temper: nodes/_temper.yaml + test_rtt: nodes/_test_rtt.yaml + uldaq: nodes/_uldaq.yaml + websocket: nodes/_websocket.yaml + zeromq: nodes/_zeromq.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_amqp.yaml b/doc/openapi/components/schemas/config/nodes/_amqp.yaml new file mode 100644 index 000000000..331d62dfb --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_amqp.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: amqp.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_can.yaml b/doc/openapi/components/schemas/config/nodes/_can.yaml new file mode 100644 index 000000000..c079b6202 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_can.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: _amqp.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_comedi.yaml b/doc/openapi/components/schemas/config/nodes/_comedi.yaml new file mode 100644 index 000000000..8fc9ebde2 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_comedi.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: comedi.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_ethercat.yaml b/doc/openapi/components/schemas/config/nodes/_ethercat.yaml new file mode 100644 index 000000000..414fa0f1f --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_ethercat.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: ethercat.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_exec.yaml b/doc/openapi/components/schemas/config/nodes/_exec.yaml new file mode 100644 index 000000000..93cb4bb82 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_exec.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: exec.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_file.yaml b/doc/openapi/components/schemas/config/nodes/_file.yaml new file mode 100644 index 000000000..690eca03b --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_file.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: file.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_fpga.yaml b/doc/openapi/components/schemas/config/nodes/_fpga.yaml new file mode 100644 index 000000000..168fc2572 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_fpga.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: fpga.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml b/doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml new file mode 100644 index 000000000..b37ffc302 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_iec61850-8-1.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: iec61850-8-1.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml b/doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml new file mode 100644 index 000000000..82e884739 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_iec61850-9-2.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: iec61850-9-2.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_infiniband.yaml b/doc/openapi/components/schemas/config/nodes/_infiniband.yaml new file mode 100644 index 000000000..a6cdca7bd --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_infiniband.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: infiniband.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_influxdb.yaml b/doc/openapi/components/schemas/config/nodes/_influxdb.yaml new file mode 100644 index 000000000..774751530 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_influxdb.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: influxdb.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_kafka.yaml b/doc/openapi/components/schemas/config/nodes/_kafka.yaml new file mode 100644 index 000000000..b6316f789 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_kafka.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: kafka.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_loopback.yaml b/doc/openapi/components/schemas/config/nodes/_loopback.yaml new file mode 100644 index 000000000..0407a01d6 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_loopback.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: loopback.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_mqtt.yaml b/doc/openapi/components/schemas/config/nodes/_mqtt.yaml new file mode 100644 index 000000000..65bca5f28 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_mqtt.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: mqtt.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_nanomsg.yaml b/doc/openapi/components/schemas/config/nodes/_nanomsg.yaml new file mode 100644 index 000000000..b882440e8 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_nanomsg.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: nanomsg.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_ngsi.yaml b/doc/openapi/components/schemas/config/nodes/_ngsi.yaml new file mode 100644 index 000000000..9df504f3c --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_ngsi.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: ngsi.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_opal.yaml b/doc/openapi/components/schemas/config/nodes/_opal.yaml new file mode 100644 index 000000000..1fbe97c8e --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_opal.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: opal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_redis.yaml b/doc/openapi/components/schemas/config/nodes/_redis.yaml new file mode 100644 index 000000000..fd0c386ea --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_redis.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: redis.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_rtp.yaml b/doc/openapi/components/schemas/config/nodes/_rtp.yaml new file mode 100644 index 000000000..7eae9569b --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_rtp.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: rtp.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_shmem.yaml b/doc/openapi/components/schemas/config/nodes/_shmem.yaml new file mode 100644 index 000000000..074a1eaff --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_shmem.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: shmem.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_signal.yaml b/doc/openapi/components/schemas/config/nodes/_signal.yaml new file mode 100644 index 000000000..42a262276 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_signal.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: signal.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_signal_v2.yaml b/doc/openapi/components/schemas/config/nodes/_signal_v2.yaml new file mode 100644 index 000000000..1ba44c092 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_signal_v2.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: signal_v2.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_socket.yaml b/doc/openapi/components/schemas/config/nodes/_socket.yaml new file mode 100644 index 000000000..cc5330e16 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_socket.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: socket.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_stats_node.yaml b/doc/openapi/components/schemas/config/nodes/_stats_node.yaml new file mode 100644 index 000000000..b716510f8 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_stats_node.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: stats_node.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_temper.yaml b/doc/openapi/components/schemas/config/nodes/_temper.yaml new file mode 100644 index 000000000..dacb2b000 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_temper.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: temper.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_test_rtt.yaml b/doc/openapi/components/schemas/config/nodes/_test_rtt.yaml new file mode 100644 index 000000000..827e45090 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_test_rtt.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: test_rtt.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_uldaq.yaml b/doc/openapi/components/schemas/config/nodes/_uldaq.yaml new file mode 100644 index 000000000..ec446ffce --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_uldaq.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: uldaq.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_websocket.yaml b/doc/openapi/components/schemas/config/nodes/_websocket.yaml new file mode 100644 index 000000000..2937af718 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_websocket.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: websocket.yaml diff --git a/doc/openapi/components/schemas/config/nodes/_zeromq.yaml b/doc/openapi/components/schemas/config/nodes/_zeromq.yaml new file mode 100644 index 000000000..36e940bd6 --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/_zeromq.yaml @@ -0,0 +1,3 @@ +allOf: +- $ref: ../node_obj.yaml +- $ref: zeromq.yaml diff --git a/doc/openapi/components/schemas/config/nodes/amqp.yaml b/doc/openapi/components/schemas/config/nodes/amqp.yaml index d1194e131..9a6db2741 100644 --- a/doc/openapi/components/schemas/config/nodes/amqp.yaml +++ b/doc/openapi/components/schemas/config/nodes/amqp.yaml @@ -1,9 +1,48 @@ --- # yaml-language-server: $schema=http://json-schema.org/draft-07/schema +title: Advanced Messaging & Queuing Protocol (AMQP) allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + + uri: + type: string + format: uri + description: | + See also: https://www.rabbitmq.com/uri-spec.html + + exchange: + type: string + description: | + The name of the AMQP exchange the node will publish the messages to. + + routing_key: + type: string + description: | + The routing key of published messages as well as the routing key which is used to bind the subcriber queue. + + ssl: + description: | + Note: These settings are only used if the `uri` setting is using the `amqps://` schema. + + type: object + properties: + verify_hostname: + default: true, + + verify_peer: + default: true, + + ca_cert: + default: "/path/to/ca.crt" + + client_cert: + default: "/path/to/client.crt" + + client_key: + default: "/path/to/client.key" + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/can.yaml b/doc/openapi/components/schemas/config/nodes/can.yaml index d1194e131..1682043b5 100644 --- a/doc/openapi/components/schemas/config/nodes/can.yaml +++ b/doc/openapi/components/schemas/config/nodes/can.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/comedi.yaml b/doc/openapi/components/schemas/config/nodes/comedi.yaml index d1194e131..1682043b5 100644 --- a/doc/openapi/components/schemas/config/nodes/comedi.yaml +++ b/doc/openapi/components/schemas/config/nodes/comedi.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/common.yaml b/doc/openapi/components/schemas/config/nodes/common.yaml new file mode 100644 index 000000000..efe2c7e4a --- /dev/null +++ b/doc/openapi/components/schemas/config/nodes/common.yaml @@ -0,0 +1,50 @@ +--- +# yaml-language-server: $schema=http://json-schema.org/draft-07/schema + +type: object +title: Node +properties: + + vectorize: + type: integer + default: 1 + description: | + This setting allows to send multiple samples in a single message to the destination nodes. + + The value of this setting determines how many samples will be combined into one packet. + + hooks: + $ref: hooklist.yaml + + builtin: + type: boolean + default: true + title: Builtin hook functions + description: | + By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled. + + in: + type: object + properties: + vectorize: + type: integer + minimum: 1 + + signals: + $ref: signallist.yaml + + hooks: + $ref: hooklist.yaml + + out: + type: object + properties: + + vectorize: + type: integer + + hooks: + $ref: hooklist.yaml + + netem: + $ref: netem.yaml diff --git a/doc/openapi/components/schemas/config/nodes/ethercat.yaml b/doc/openapi/components/schemas/config/nodes/ethercat.yaml index d1194e131..47df3bf76 100644 --- a/doc/openapi/components/schemas/config/nodes/ethercat.yaml +++ b/doc/openapi/components/schemas/config/nodes/ethercat.yaml @@ -2,8 +2,8 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml +- $ref: common.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml diff --git a/doc/openapi/components/schemas/config/nodes/exec.yaml b/doc/openapi/components/schemas/config/nodes/exec.yaml index d1194e131..e6b29eedb 100644 --- a/doc/openapi/components/schemas/config/nodes/exec.yaml +++ b/doc/openapi/components/schemas/config/nodes/exec.yaml @@ -2,8 +2,48 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + + shell: + type: boolean + default: false + description: | + If set, the `exec` setting gets passed the shell (`/usr/bin`). + In this case the `exec` setting must be given as a string. + + If not set, we will directly execute the sub-process via `execvpe(2)`. + In this case the exec setting must be given as an array (`argv[]`). + + exec: + description: | + The program which should be execed in the sub-process. + + The option is passed to the system shell for execution. + + oneOf: + - type: array + items: + type: string + - type: string + + flush: + type: boolean + default: true + description: | + Flush stream every time VILLASnode passes data the sub-process. + + working_directory: + type: string + description: | + If set, the working directory for the sub-process will be changed. + + environment: + type: object + description: | + A object of key/value pairs of environemnt variables which should be passed to the sub-process in addition to the parent environment. + + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/file.yaml b/doc/openapi/components/schemas/config/nodes/file.yaml index d1194e131..029b25b13 100644 --- a/doc/openapi/components/schemas/config/nodes/file.yaml +++ b/doc/openapi/components/schemas/config/nodes/file.yaml @@ -2,8 +2,31 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + + uri: + type: string + format: uri + description: | + Specifies the URI to a file from which is written to or read from depending in which group (`in`or `out`) is used. + + This setting allows to add special paceholders for time and date values. + See [strftime(3)](http://man7.org/linux/man-pages/man3/strftime.3.html) for a list of supported placeholder. + + **Example**: + + ``` + uri = "logs/measurements_%Y-%m-%d_%H-%M-%S.log" + ``` + + will create a file called: + + ``` + ./logs/measurements_2015-08-09_22-20-50.log + ``` + + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/fpga.yaml b/doc/openapi/components/schemas/config/nodes/fpga.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/fpga.yaml +++ b/doc/openapi/components/schemas/config/nodes/fpga.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml b/doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml +++ b/doc/openapi/components/schemas/config/nodes/iec61850-8-1.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml b/doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml +++ b/doc/openapi/components/schemas/config/nodes/iec61850-9-2.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/infiniband.yaml b/doc/openapi/components/schemas/config/nodes/infiniband.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/infiniband.yaml +++ b/doc/openapi/components/schemas/config/nodes/infiniband.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/influxdb.yaml b/doc/openapi/components/schemas/config/nodes/influxdb.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/influxdb.yaml +++ b/doc/openapi/components/schemas/config/nodes/influxdb.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/kafka.yaml b/doc/openapi/components/schemas/config/nodes/kafka.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/kafka.yaml +++ b/doc/openapi/components/schemas/config/nodes/kafka.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/loopback.yaml b/doc/openapi/components/schemas/config/nodes/loopback.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/loopback.yaml +++ b/doc/openapi/components/schemas/config/nodes/loopback.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/mqtt.yaml b/doc/openapi/components/schemas/config/nodes/mqtt.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/mqtt.yaml +++ b/doc/openapi/components/schemas/config/nodes/mqtt.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/nanomsg.yaml b/doc/openapi/components/schemas/config/nodes/nanomsg.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/nanomsg.yaml +++ b/doc/openapi/components/schemas/config/nodes/nanomsg.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/ngsi.yaml b/doc/openapi/components/schemas/config/nodes/ngsi.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/ngsi.yaml +++ b/doc/openapi/components/schemas/config/nodes/ngsi.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/opal.yaml b/doc/openapi/components/schemas/config/nodes/opal.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/opal.yaml +++ b/doc/openapi/components/schemas/config/nodes/opal.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/redis.yaml b/doc/openapi/components/schemas/config/nodes/redis.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/redis.yaml +++ b/doc/openapi/components/schemas/config/nodes/redis.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/rtp.yaml b/doc/openapi/components/schemas/config/nodes/rtp.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/rtp.yaml +++ b/doc/openapi/components/schemas/config/nodes/rtp.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/shmem.yaml b/doc/openapi/components/schemas/config/nodes/shmem.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/shmem.yaml +++ b/doc/openapi/components/schemas/config/nodes/shmem.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signal.yaml b/doc/openapi/components/schemas/config/nodes/signal.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/signal.yaml +++ b/doc/openapi/components/schemas/config/nodes/signal.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/signal_v2.yaml b/doc/openapi/components/schemas/config/nodes/signal_v2.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/signal_v2.yaml +++ b/doc/openapi/components/schemas/config/nodes/signal_v2.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/socket.yaml b/doc/openapi/components/schemas/config/nodes/socket.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/socket.yaml +++ b/doc/openapi/components/schemas/config/nodes/socket.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/stats_node.yaml b/doc/openapi/components/schemas/config/nodes/stats_node.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/stats_node.yaml +++ b/doc/openapi/components/schemas/config/nodes/stats_node.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/temper.yaml b/doc/openapi/components/schemas/config/nodes/temper.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/temper.yaml +++ b/doc/openapi/components/schemas/config/nodes/temper.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/test_rtt.yaml b/doc/openapi/components/schemas/config/nodes/test_rtt.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/test_rtt.yaml +++ b/doc/openapi/components/schemas/config/nodes/test_rtt.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/uldaq.yaml b/doc/openapi/components/schemas/config/nodes/uldaq.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/uldaq.yaml +++ b/doc/openapi/components/schemas/config/nodes/uldaq.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/websocket.yaml b/doc/openapi/components/schemas/config/nodes/websocket.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/websocket.yaml +++ b/doc/openapi/components/schemas/config/nodes/websocket.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/components/schemas/config/nodes/zeromq.yaml b/doc/openapi/components/schemas/config/nodes/zeromq.yaml index d1194e131..53f8d9484 100644 --- a/doc/openapi/components/schemas/config/nodes/zeromq.yaml +++ b/doc/openapi/components/schemas/config/nodes/zeromq.yaml @@ -2,8 +2,9 @@ # yaml-language-server: $schema=http://json-schema.org/draft-07/schema allOf: -- $ref: ../node.yaml - type: object properties: format: - $ref: ../formatspec.yaml + $ref: ../format_spec.yaml + +- $ref: common.yaml diff --git a/doc/openapi/openapi.yaml b/doc/openapi/openapi.yaml index 6616d24a4..bb20ab76d 100644 --- a/doc/openapi/openapi.yaml +++ b/doc/openapi/openapi.yaml @@ -136,6 +136,15 @@ components: schemas: Config: $ref: components/schemas/config.yaml + + TypeField: + type: object + required: + - type + properties: + type: + type: string + FormatEdgeflex: $ref: components/schemas/formats/edgeflex.yaml FormatIgor: