JsonRPC/examples/example.jrpc

54 lines
1.1 KiB
Plaintext

import "./import";
define CSharp_Namespace Example;
enum TestEnum {
VAL1,
VAL2,
VAL10 = 10,
VAL11,
VAL12
}
type Test {
atom: TestAtom;
array: TestAtom[];
enumValue: TestEnum;
map: {number, TestAtom};
}
type AddValueRequest {
value1: number;
value2: number;
}
type AddValueResponse {
value: number;
}
service TestService {
@Description("Add two numbers")
@Param("request", "Parameter containing the two numbers")
@Returns("")
AddValuesSingleParam(request: AddValueRequest): AddValueResponse;
@Description("Add two numbers")
@Param("value1", "The first value")
@Param("value2", "The second value")
AddValuesMultipleParams(value1: number, value2: number): number;
@Description("Does literaly nothing")
@Param("param1", "Some number")
ReturningVoid(param1: number): void;
@Description("Just sends an Event with a String")
@Param("param1", "Parameter with some string for event")
notification OnEvent(param1: string);
ThrowingError(): void;
FunctionWithArrayAsParamAndReturn(values1: number[], values2: number[]): number[];
}