Skip to content

Commit 048240f

Browse files
committed
Special case Identity APIs for XML
1 parent 788245e commit 048240f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/OpenApi/build/Microsoft.AspNetCore.OpenApi.targets

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
<ItemGroup>
99
<AdditionalFiles
1010
Include="@(ReferencePath->'%(RootDir)%(Directory)%(Filename).xml')"
11-
Condition="'%(ReferencePath.Extension)' == '.dll' AND
12-
Exists('%(ReferencePath.RootDir)%(ReferencePath.Directory)%(ReferencePath.Filename).xml') AND
13-
('%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference')"
11+
Condition="
12+
'%(ReferencePath.Extension)' == '.dll' AND
13+
Exists('%(ReferencePath.RootDir)%(ReferencePath.Directory)%(ReferencePath.Filename).xml') AND
14+
('%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' OR
15+
'%(ReferencePath.FileName)' == 'Microsoft.AspNetCore.Identity')"
1416
KeepMetadata="Identity" />
1517
</ItemGroup>
1618
</Target>

src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Build.Tests/GenerateAdditionalXmlFilesForOpenApiTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public void VerifiesTargetGeneratesXmlFiles()
3737
// Captures ProjectReferences and PackageReferences in project.
3838
var identities = additionalFiles.Select(x => x["Identity"]).ToArray();
3939
Assert.Collection(identities,
40-
x => Assert.EndsWith("ClassLibrary.xml", x)
40+
x => Assert.EndsWith("ClassLibrary.xml", x),
41+
x => Assert.EndsWith("Microsoft.AspNetCore.Identity.xml", x)
4142
);
4243
}
4344

0 commit comments

Comments
 (0)