Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 6e37a6b

Browse files
authored
Merge pull request #229 from bremnes/228-extractor-non-related-product-extracted-fix
ProductExtractor, refined clause to match product name with product part and not api part.
2 parents e06c758 + 307eeac commit 6e37a6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/APIM_ARMTemplate/apimtemplate/Extractor/EntityExtractors/ProductExtractor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public async Task<Template> GenerateProductsARMTemplateAsync(string apimname, st
7878
productsTemplateResource.apiVersion = GlobalConstants.APIVersion;
7979

8080
// only extract the product if this is a full extraction, or in the case of a single api, if it is found in products associated with the api
81-
if (singleApiName == null || productAPIResources.SingleOrDefault(p => p.name.Contains(productName)) != null)
81+
if (singleApiName == null || productAPIResources.SingleOrDefault(p => p.name.Contains($"/{productName}/")) != null)
8282
{
8383
Console.WriteLine("'{0}' Product found", productName);
8484
templateResources.Add(productsTemplateResource);

0 commit comments

Comments
 (0)