build(aio): ensure the correct decorator properties are merged (#24289)

Previously only the `description` and `usageNotes` were being copied over
from the call-member of the decorator interface. Important properties such
as `shortDescription` were missed.

These are now added and the code has been refactored to make it simpler and
clearer to update which properties get copied as the requirements change.

PR Close #24289
This commit is contained in:
Pete Bacon Darwin
2018-06-04 11:43:15 +01:00
committed by Victor Berchet
parent acf270d724
commit 68d37ef0c1
5 changed files with 79 additions and 13 deletions

View File

@ -119,6 +119,17 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
addNotYetDocumentedProperty.docTypes = API_DOC_TYPES;
})
.config(function(mergeDecoratorDocs) {
mergeDecoratorDocs.propertiesToMerge = [
'shortDescription',
'description',
'security',
'deprecated',
'see',
'usageNotes',
];
})
.config(function(checkContentRules, EXPORT_DOC_TYPES) {
// Min length rules
const createMinLengthRule = require('./content-rules/minLength');