mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 11:54:10 +00:00 
			
		
		
		
	Merge pull request #12675 from alexgrozav/master
fix documentation plugin paths builder when multiple contentTypes
This commit is contained in:
		
						commit
						3ebdfdae5d
					
				@ -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 };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user