Welcome to the AGILE API specifications!
To read the API spec see this page
NOTE: This document is a work in progess that will be properly reviewed and finalized soon
In this repository we are going to define and version the internal API exposed by AGILE core modules via DBus IPC.
Create an issue to suggest a modification or propose a change by creating a pull request.
Contributors shall follow those guidelines in order to get their contribution accepted.
##Specification
- The model should be a valid YAML document
- All method and property names are CamelCased, more precisely PascalCased
- All top level definitions may have a
grouptext or text list to aggregate different object in categories. Atagslist is used to aggregate different object on various topics. - Methods must indicate a
returntype, withvoidif no return is expected and optionally a list ofarguments - Methods
argumentsmust be a map with name as key and at least thetypefield specified as value - Methods
argumentsandpropertiesmay have adefaultvalue to indicate a predefined value if non is specified. - Asynchronous Methods must indicate a
referencefield indicating one or more Properties that receive updates from the call - Properties referencing one object must have a
referencefield. If it is a list there will be a typeArraywith thereferencefield. - Properties can indicate an
accessfield as list of one ofread,write,subscribe - Optionally a
descriptioncan be provided on methods, arguments and properties - Optionally an
examplecan be provided on methods, arguments and properties in a JSON like format, eg.example: { key1: value1, key2: value42 } - Every object can expose an
httpfield containing compliantSwagger 2.0routes specifications
###Object description example
org.eclipse.agail.ObjectName:
MethodName:
description: <method description>
arguments:
arg1:
description: <param description>
type: <type>
return: <return type>
SimpleProperty:
description: <method description>
type: <type>
access: [r, w, s]
ReferenceProperties:
description: <method description>
reference: [org.eclipse.agail.AnotherObject]
@NOTE: Subtypes should be added accordingly and mapped to DBus supported types
- In case an
ObjectorArrayis specified afieldsfield should be added to describe the content. - Use an
*to indicate a complex variable (like Object and Array) has non specified return type, eg.Object* - Enum should be defined in the same document of the object using it, eventually with an unique name inside the whole specs
- Enum should be defined as autonomous types with a field
enumand a list offieldswith keys voidindicates a null value
Primitive types:
- Number: eg.
1,5.9,-0.1 - String: eg.
"Anything in double quotes :)" - Boolean: eg.
trueorfalse
Structured types:
- Enum: a list of predefined keys
StatusType:
type: Enum
fields:
- CONNECTED
- DISCONNECTED- Object: a group of structured informations
ObjName:
type: Object
fields:
name: String
id: Number
address: String- Array: an ordered list containing one or more types
ArrayField:
type: Array
fields: Stringorg.eclipse.agail.Device:
Name:
description: The device name
type: String
Status :
description: Indicate the current device status
type: StatusType
Profile:
description: Contains user provided information on device in order to handle at Protocol level the specific implementation
type: Object*
Protocol:
description: Protocol instance
reference: org.eclipse.agail.Protocol
Read:
args:
sensorName: String
return: Object