@@ -48,58 +48,101 @@ describe('call an endpoint proxy', function(){
48
48
"name" : "input" ,
49
49
"datatype" : "jsonDocument" ,
50
50
"multiple" : true ,
51
- "nullable" : true
51
+ "nullable" : true ,
52
+ "dataKind" : "node" ,
53
+ "mimeType" : "application/json"
52
54
} ] ,
53
55
"return" : {
54
56
"datatype" : "jsonDocument" ,
55
57
"multiple" : true ,
56
- "nullable" : true
57
- }
58
+ "nullable" : true ,
59
+ "dataKind" : "node" ,
60
+ "mimeType" : "application/json"
61
+ } ,
62
+ "maxArgs" : 1 ,
63
+ "paramsKind" : "multiNode" ,
64
+ "sessionParam" : null ,
65
+ "returnKind" : "multipart" ,
66
+ "$jsOutputMode" : "promise"
58
67
} ;
59
68
const multiAtomicInputMultiOutputDecl = {
60
69
"functionName" : "multiAtomicInputMultiOutput" ,
61
70
"params" : [ {
62
71
"name" : "input" ,
63
72
"datatype" : "string" ,
64
73
"multiple" : true ,
65
- "nullable" : true
74
+ "nullable" : true ,
75
+ "dataKind" : "atomic" ,
76
+ "mimeType" : "text/plain"
66
77
} ] ,
67
78
"return" : {
68
79
"datatype" : "string" ,
69
80
"multiple" : true ,
70
- "nullable" : true
71
- }
81
+ "nullable" : true ,
82
+ "dataKind" : "atomic" ,
83
+ "mimeType" : "text/plain" ,
84
+ "$jsType" : "string"
85
+ } ,
86
+ "maxArgs" : 1 ,
87
+ "paramsKind" : "multiAtomic" ,
88
+ "sessionParam" : null ,
89
+ "returnKind" : "multipart" ,
90
+ "$jsOutputMode" : "promise"
72
91
} ;
73
92
const singleNodeInputSingleOutputDecl = {
74
93
"functionName" : "singleNodeInputSingleOutput" ,
75
94
"params" : [ {
76
95
"name" : "input" ,
77
96
"datatype" : "jsonDocument" ,
78
97
"multiple" : false ,
79
- "nullable" : true
98
+ "nullable" : true ,
99
+ "dataKind" : "node" ,
100
+ "mimeType" : "application/json"
80
101
} ] ,
81
102
"return" : {
82
103
"datatype" : "jsonDocument" ,
83
104
"multiple" : false ,
84
- "nullable" : true
85
- }
105
+ "nullable" : true ,
106
+ "dataKind" : "node" ,
107
+ "mimeType" : "application/json"
108
+ } ,
109
+ "maxArgs" : 1 ,
110
+ "paramsKind" : "multiNode" ,
111
+ "sessionParam" : null ,
112
+ "returnKind" : "single" ,
113
+ "$jsOutputMode" : "promise"
86
114
} ;
87
115
const singleAtomicInputSingleOutputDecl = {
88
116
"functionName" : "singleAtomicInputSingleOutput" ,
89
117
"params" : [ {
90
118
"name" : "input" ,
91
119
"datatype" : "int" ,
92
120
"multiple" : false ,
93
- "nullable" : true
121
+ "nullable" : true ,
122
+ "dataKind" : "atomic" ,
123
+ "mimeType" : "text/plain"
94
124
} ] ,
95
125
"return" : {
96
126
"datatype" : "int" ,
97
127
"multiple" : false ,
98
- "nullable" : true
99
- }
128
+ "nullable" : true ,
129
+ "dataKind" : "atomic" ,
130
+ "mimeType" : "text/plain" ,
131
+ "$jsType" : "number"
132
+ } ,
133
+ "maxArgs" : 1 ,
134
+ "paramsKind" : "multiAtomic" ,
135
+ "sessionParam" : null ,
136
+ "returnKind" : "single" ,
137
+ "$jsOutputMode" : "promise"
100
138
} ;
101
139
const emptyInputEmptyOutputDecl = {
102
- "functionName" : "emptyAtomicInputEmptyOutput"
140
+ "functionName" : "emptyAtomicInputEmptyOutput" ,
141
+ "maxArgs" : 0 ,
142
+ "paramsKind" : "empty" ,
143
+ "sessionParam" : null ,
144
+ "returnKind" : "empty" ,
145
+ "$jsOutputMode" : "promise"
103
146
} ;
104
147
const multiNodeInputMultiOutputAPIUri = serviceDecl . endpointDirectory + multiNodeInputMultiOutputDecl . functionName + '.api' ;
105
148
const multiAtomicInputMultiOutputAPIUri = serviceDecl . endpointDirectory + multiAtomicInputMultiOutputDecl . functionName + '.api' ;
@@ -293,6 +336,8 @@ void 0;`;
293
336
. catch ( done ) ;
294
337
} ) ;
295
338
it ( 'for empty in SJS' , function ( done ) {
339
+ emptyInputEmptyOutputDecl . params = null ;
340
+ emptyInputEmptyOutputDecl . return = null ;
296
341
const proxyCaller = proxy
297
342
. init ( db , serviceDecl )
298
343
. withFunction ( emptyInputEmptyOutputDecl , '.sjs' ) ;
0 commit comments