Merge pull request #12675 from alexgrozav/master

fix documentation plugin paths builder when multiple contentTypes
This commit is contained in:
Alexandre BODIN 2022-03-10 14:37:35 +01:00 committed by GitHub
commit 3ebdfdae5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,6 +149,7 @@ module.exports = api => {
} }
// An api could have multiple contentTypes // An api could have multiple contentTypes
let paths = {};
for (const contentTypeName of api.ctNames) { for (const contentTypeName of api.ctNames) {
// Get the attributes found on the api's contentType // Get the attributes found on the api's contentType
const uid = `${api.getter}::${api.name}.${contentTypeName}`; const uid = `${api.getter}::${api.name}.${contentTypeName}`;
@ -169,6 +170,11 @@ module.exports = api => {
tag, tag,
}; };
return getPaths(apiInfo); paths = {
...paths,
...getPaths(apiInfo).paths
}
} }
return { paths };
}; };