1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

api: add OpenAPI spec and example configuration for new node-type

This commit is contained in:
Steffen Vogel 2022-03-28 18:12:11 +02:00
parent 56fa561493
commit d16ab6b0fc
4 changed files with 29 additions and 0 deletions

View file

@ -17,6 +17,7 @@ properties:
discriminator:
propertyName: type
mapping:
api: nodes/_api.yaml
amqp: nodes/_amqp.yaml
can: nodes/_can.yaml
comedi: nodes/_comedi.yaml

View file

@ -0,0 +1,3 @@
allOf:
- $ref: ../node_obj.yaml
- $ref: api.yaml

View file

@ -0,0 +1,13 @@
# yaml-language-server: $schema=http://json-schema.org/draft-07/schema
---
allOf:
- type: object
additionalProperties: true
description: |
Additional properties can be retrieved via Rest API call:
```bash
curl http://localhost:80/api/v2/universal/api_node_name/config
```
- $ref: ../node.yaml

View file

@ -0,0 +1,12 @@
nodes = {
api_node = {
type = "api"
// Additional configuration can be retrieved via Rest API call:
// curl http://localhost:80/api/v2/universal/api_node/config
my_setting = "my_value"
a = {
b = false
}
}
}