Modify TechDocsCollator to be aware of new urls

* Add boolean constructor param to define if to use legacy paths
* Swap urls to match new pattern
* Add few tests

Signed-off-by: Jussi Hallila <jussi@hallila.com>
This commit is contained in:
Jussi Hallila
2021-09-03 16:00:00 +02:00
parent 7f00902d97
commit 6f45fc7990
4 changed files with 63 additions and 3 deletions
+8 -1
View File
@@ -73,7 +73,14 @@ export default async function createPlugin({
indexBuilder.addCollator({
defaultRefreshIntervalSeconds: 600,
collator: new DefaultTechDocsCollator({ discovery, logger }),
collator: new DefaultTechDocsCollator({
discovery,
logger,
legacyPathCasing:
config.getOptionalBoolean(
'techdocs.legacyUseCaseSensitiveTripletPaths',
) || false,
}),
});
// The scheduler controls when documents are gathered from collators and sent