Update reflection schema
@@ -24,12 +24,16 @@ enum BaseType : byte {
Vector,
Obj, // Used for tables & structs.
Union,
- Array
+ Array,
+
+ // Add any new type above this value.
+ MaxBaseType
}
table Type {
base_type:BaseType;
- element:BaseType = None; // Only if base_type == Vector or base_type == Array.
+ element:BaseType = None; // Only if base_type == Vector
+ // or base_type == Array.
index:int = -1; // If base_type == Object, index into "objects" below.
// If base_type == Union, UnionType, or integral derived
// from an enum, index into "enums" below.
@@ -46,6 +50,7 @@ table EnumVal {
value:long (key);
object:Object; // Will be deprecated in favor of union_type in the future.
union_type:Type;
+ documentation:[string];
}
table Enum {
@@ -54,6 +59,7 @@ table Enum {
is_union:bool = false;
underlying_type:Type (required);
attributes:[KeyValue];
+ documentation:[string];
}
table Field {
@@ -67,6 +73,8 @@ table Field {
required:bool = false;
key:bool = false;
attributes:[KeyValue];
+ documentation:[string];
+ nullable:bool = false;
}
table Object { // Used for both tables and structs.
@@ -76,6 +84,22 @@ table Object { // Used for both tables and structs.
minalign:int;
bytesize:int; // For structs.
attributes:[KeyValue];
+ documentation:[string];
+}
+
+table RPCCall {
+ name:string (required, key);
+ request:Object (required); // must be a table (not a struct)
+ response:Object (required); // must be a table (not a struct)
+ attributes:[KeyValue];
+ documentation:[string];
+}
+
+table Service {
+ name:string (required, key);
+ calls:[RPCCall];
+ attributes:[KeyValue];
+ documentation:[string];
}
table Schema {
@@ -84,6 +108,7 @@ table Schema {
file_ident:string;
file_ext:string;
root_table:Object;
+ services:[Service]; // Sorted.
}
root_type Schema;
