linx-simulator2/node_modules/protobufjs/tests/services.js
2019-09-18 11:11:16 +03:00

39 lines
1.2 KiB
JavaScript

var root = require("..").newBuilder({
"convertFieldsToCamelCase": true,
"populateAccessors": false
})['import']({
"package": "my.namespace",
"messages": [
{
"name": "something",
"fields": [],
"messages": [
{
"name": "v1",
"fields": [],
"messages": [
{
"name": "GetRequest",
"fields": []
},
{
"name": "GetResponse",
"fields": []
}
],
"enums": [],
"services": [{
"name": "SomeService",
"rpc": {
"get": {
"request": "GetRequest",
"response": "GetResponse"
}
}
}]
}
]
}
]
}).build();
console.log(require("util").inspect(root, { depth: 10}));