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:
parent
56fa561493
commit
d16ab6b0fc
4 changed files with 29 additions and 0 deletions
|
@ -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
|
||||
|
|
3
doc/openapi/components/schemas/config/nodes/_api.yaml
Normal file
3
doc/openapi/components/schemas/config/nodes/_api.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
allOf:
|
||||
- $ref: ../node_obj.yaml
|
||||
- $ref: api.yaml
|
13
doc/openapi/components/schemas/config/nodes/api.yaml
Normal file
13
doc/openapi/components/schemas/config/nodes/api.yaml
Normal 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
|
12
etc/examples/nodes/api.conf
Normal file
12
etc/examples/nodes/api.conf
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue