diff --git a/README.md b/README.md new file mode 100644 index 0000000..b6b5a6e --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# FabAccess API + +## Code generation bugs under c# +When returning an Interface it may be required to append a dummy valueto work around a c# code generation bug. + +```diff +- whoami @4 () -> ( you :Api.User ); ++ whoami @4 () -> ( you :Api.User, dummy :UInt8 = 0 ); +``` diff --git a/connection.capnp b/connection.capnp index 4e638a9..6ec6ad9 100644 --- a/connection.capnp +++ b/connection.capnp @@ -10,14 +10,12 @@ using AuthenticationSystem = import "authenticationsystem.capnp".AuthenticationS using MachineSystem = import "machinesystem.capnp".MachineSystem; using UserSystem = import "usersystem.capnp".UserSystem; using PermissionSystem = import "permissionsystem.capnp".PermissionSystem; -using InteractionSystem = import "interactionsystem.capnp".InteractionSystem; -using FederationSystem = import "federationsystem.capnp".FederationSystem; interface Bootstrap { authenticationSystem @0 () -> ( authenticationSystem : AuthenticationSystem ); - machineSystem @1 () -> ( machineSystem : MachineSystem ); + machineSystem @1 () -> ( machineSystem : MachineSystem ); userSystem @2 () -> ( userSystem : UserSystem ); diff --git a/machine.capnp b/machine.capnp index 46453a6..be0ac7e 100644 --- a/machine.capnp +++ b/machine.capnp @@ -39,7 +39,7 @@ struct Machine { info @6 :Info; interface Info $CSharp.name("InfoInterface") { - getMachineInfoExtended @0 () -> ( machineInfoExtended :MachineInfoExtended); + getMachineInfoExtended @0 () -> ( machineInfoExtended :MachineInfoExtended, dummy :UInt8 = 0); getPropertyList @1 () -> ( propertyList :List(General.KeyValuePair) ); diff --git a/machinesystem.capnp b/machinesystem.capnp index 7af2668..d658405 100644 --- a/machinesystem.capnp +++ b/machinesystem.capnp @@ -15,6 +15,6 @@ interface MachineSystem interface Info $CSharp.name("InfoInterface") { getMachineList @0 () -> ( machine_list :List(Machine) ); - getMachine @1 ( uuid :General.UUID ) -> ( machine :Machine); + getMachine @1 ( uuid :General.UUID ) -> ( machine :Machine, dummy :UInt8 = 0 ); } } diff --git a/usersystem.capnp b/usersystem.capnp index e742ba3..955514b 100644 --- a/usersystem.capnp +++ b/usersystem.capnp @@ -13,7 +13,7 @@ interface UserSystem { info @0 () -> ( info : Info ); interface Info $CSharp.name("InfoInterface") { - getUserSelf @0 ( ) -> ( user :User ); + getUserSelf @0 ( ) -> ( user :User, dummy :UInt8 = 0 ); } manage @1 () -> ( manage : Manage ); @@ -21,6 +21,6 @@ interface UserSystem getUserList @0 () -> ( user_list :List(User) ); addUser @1 (username :Text, password: Text) -> ( user :User ); - removeUser @2 (user :User ); + removeUser @2 (user :User, dummy :UInt8 = 0); } } \ No newline at end of file