Merge branch 'Fix_Schema_Main' into 'main'

Fix schema main

See merge request fabinfra/fabaccess/fabaccess-api!8
This commit is contained in:
Kai Kriegel 2021-09-07 21:29:39 +00:00
commit 6935947d9e
5 changed files with 14 additions and 7 deletions

9
README.md Normal file
View File

@ -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 );
```

View File

@ -10,8 +10,6 @@ using AuthenticationSystem = import "authenticationsystem.capnp".AuthenticationS
using MachineSystem = import "machinesystem.capnp".MachineSystem; using MachineSystem = import "machinesystem.capnp".MachineSystem;
using UserSystem = import "usersystem.capnp".UserSystem; using UserSystem = import "usersystem.capnp".UserSystem;
using PermissionSystem = import "permissionsystem.capnp".PermissionSystem; using PermissionSystem = import "permissionsystem.capnp".PermissionSystem;
using InteractionSystem = import "interactionsystem.capnp".InteractionSystem;
using FederationSystem = import "federationsystem.capnp".FederationSystem;
interface Bootstrap interface Bootstrap
{ {

View File

@ -39,7 +39,7 @@ struct Machine {
info @6 :Info; info @6 :Info;
interface Info $CSharp.name("InfoInterface") { interface Info $CSharp.name("InfoInterface") {
getMachineInfoExtended @0 () -> ( machineInfoExtended :MachineInfoExtended); getMachineInfoExtended @0 () -> ( machineInfoExtended :MachineInfoExtended, dummy :UInt8 = 0);
getPropertyList @1 () -> ( propertyList :List(General.KeyValuePair) ); getPropertyList @1 () -> ( propertyList :List(General.KeyValuePair) );

View File

@ -15,6 +15,6 @@ interface MachineSystem
interface Info $CSharp.name("InfoInterface") { interface Info $CSharp.name("InfoInterface") {
getMachineList @0 () -> ( machine_list :List(Machine) ); getMachineList @0 () -> ( machine_list :List(Machine) );
getMachine @1 ( uuid :General.UUID ) -> ( machine :Machine); getMachine @1 ( uuid :General.UUID ) -> ( machine :Machine, dummy :UInt8 = 0 );
} }
} }

View File

@ -13,7 +13,7 @@ interface UserSystem
{ {
info @0 () -> ( info : Info ); info @0 () -> ( info : Info );
interface Info $CSharp.name("InfoInterface") { interface Info $CSharp.name("InfoInterface") {
getUserSelf @0 ( ) -> ( user :User ); getUserSelf @0 ( ) -> ( user :User, dummy :UInt8 = 0 );
} }
manage @1 () -> ( manage : Manage ); manage @1 () -> ( manage : Manage );
@ -21,6 +21,6 @@ interface UserSystem
getUserList @0 () -> ( user_list :List(User) ); getUserList @0 () -> ( user_list :List(User) );
addUser @1 (username :Text, password: Text) -> ( user :User ); addUser @1 (username :Text, password: Text) -> ( user :User );
removeUser @2 (user :User ); removeUser @2 (user :User, dummy :UInt8 = 0);
} }
} }