You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: compiler/model/build-model.ts
+12-8
Original file line number
Diff line number
Diff line change
@@ -180,8 +180,6 @@ function compileClassOrInterfaceDeclaration (declaration: ClassDeclaration | Int
180
180
)
181
181
}
182
182
183
-
letbodyWasSet=false
184
-
185
183
// Request and Response definitions needs to be handled
186
184
// differently from normal classes
187
185
if(name==='Request'||name==='Response'){
@@ -240,15 +238,16 @@ function compileClassOrInterfaceDeclaration (declaration: ClassDeclaration | Int
240
238
`The property '${part.name}' does not exist in the rest-api-spec ${namespace} url template`
241
239
)
242
240
}
241
+
assert(member,property.properties.length>0,'There is no need to declare an empty object path_parts, just remove the path_parts declaration.')
243
242
type.path=property.properties
244
243
}elseif(property.name==='query_parameters'){
244
+
assert(member,property.properties.length>0,'There is no need to declare an empty object query_parameters, just remove the query_parameters declaration.')
245
245
type.query=property.properties
246
246
}elseif(property.name==='body'){
247
-
bodyWasSet=true
248
247
// the body can either be a value (eg Array<string> or an object with properties)
0 commit comments