in compiler/src/steps/validate-model.ts [451:484]
function addInherits (inherits?: model.Inherits): void {
if (inherits == null) {
return
}
const typeDef = getTypeDef(inherits.type)
if (typeDef == null) {
modelError(`No type definition for parent '${fqn(inherits.type)}'`)
return
}
switch (typeDef?.kind) {
case 'request':
inheritedProperties(typeDef, result)
addProperties(typeDef.path)
addProperties(typeDef.query)
if (typeDef.body.kind === 'properties') {
addProperties(typeDef.body.properties)
}
break
case 'response':
inheritedProperties(typeDef, result)
if (typeDef.body.kind === 'properties') {
addProperties(typeDef.body.properties)
}
break
case 'interface':
inheritedProperties(typeDef, result)
addProperties(typeDef.properties)
break
}
}