Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"cSpell.words": [
"csdl",
"Hidi"
"Hidi",
"Xunit"
]
}
12 changes: 6 additions & 6 deletions performance/resultsComparer/resultsComparer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.10" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta5.25306.1" />
<PackageReference Include="system.text.json" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.10" />
<PackageReference Include="System.CommandLine" Version="2.0.10" />
<PackageReference Include="system.text.json" Version="10.0.10" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta5.25306.1" />
<PackageReference Include="Microsoft.OData.Edm" Version="8.4.3" />
<PackageReference Include="System.CommandLine" Version="2.0.10" />
<PackageReference Include="Microsoft.OData.Edm" Version="8.4.4" />
<PackageReference Include="Microsoft.OpenApi.OData" Version="2.2.1" />
<PackageReference Include="Microsoft.OpenApi.ApiManifest" Version="2.0.0-preview5" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.25306.1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>

<!-- Windows-specific configuration -->
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand All @@ -8,29 +10,56 @@
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<NoWarn>NU1903</NoWarn>
</PropertyGroup>
<ItemGroup>

<!-- Non-Windows configuration - create an empty library -->
<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoWarn>NU1903</NoWarn>
</PropertyGroup>

<!-- Windows-specific dependencies -->
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="18.7.23">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="9.0.10" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="10.0.10" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.10" />
</ItemGroup>
<ItemGroup>

<!-- Windows-specific resources -->
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<Resource Include="Themes\Metro\HowToApplyTheme.txt" />
</ItemGroup>

<!-- Project references (available on all platforms) -->
<ItemGroup>
<ProjectReference Include="..\Microsoft.OpenApi.YamlReader\Microsoft.OpenApi.YamlReader.csproj" />
<ProjectReference Include="..\Microsoft.OpenApi\Microsoft.OpenApi.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />

<!-- Exclude WPF-specific files on non-Windows platforms -->
<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
<Compile Remove="**/*.xaml.cs" />
<Compile Remove="App.xaml.cs" />
<Compile Remove="MainWindow.xaml.cs" />
<Compile Remove="EnumBindingSourceExtension.cs" />
<Compile Remove="MainModel.cs" />
<Compile Remove="StatsVisitor.cs" />
<Compile Remove="Properties/**" />
<None Remove="**/*.xaml" />
<Page Remove="**/*.xaml" />
</ItemGroup>
<ItemGroup>

<!-- Windows-specific XAML excludes -->
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<Page Remove="Themes\Metro\Metro.MSControls.Core.Implicit.xaml" />
<Page Remove="Themes\Metro\Metro.MSControls.Toolkit.Implicit.xaml" />
<Page Remove="Themes\Metro\Styles.Shared.xaml" />
<Page Remove="Themes\Metro\Styles.WPF.xaml" />
<Page Remove="Themes\Metro\Theme.Colors.xaml" />
<Compile Remove="NonWindowsPlatformPlaceholder.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReference Include="coverlet.msbuild" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" PrivateAssets="all" />
<PackageReference Include="coverlet.collector" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void ReturnFilteredOpenApiDocumentBasedOnOperationIdsAndTags(string? oper
public void ReturnFilteredOpenApiDocumentBasedOnPostmanCollection()
{
// Arrange
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver2.json");
var filePath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver2.json");
var fileInput = new FileInfo(filePath);
var stream = fileInput.OpenRead();

Expand Down Expand Up @@ -158,7 +158,7 @@ public void CreateFilteredDocumentUsingPredicateFromRequestUrl()
public void ShouldParseNestedPostmanCollection()
{
// Arrange
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver3.json");
var filePath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver3.json");
var fileInput = new FileInfo(filePath);
var stream = fileInput.OpenRead();

Expand All @@ -175,7 +175,7 @@ public void ShouldParseNestedPostmanCollection()
public void ThrowsExceptionWhenUrlsInCollectionAreMissingFromSourceDocument()
{
// Arrange
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver1.json");
var filePath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver1.json");
var fileInput = new FileInfo(filePath);
var stream = fileInput.OpenRead();

Expand All @@ -192,7 +192,7 @@ public void ThrowsExceptionWhenUrlsInCollectionAreMissingFromSourceDocument()
public void ContinueProcessingWhenUrlsInCollectionAreMissingFromSourceDocument()
{
// Arrange
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver4.json");
var filePath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "postmanCollection_ver4.json");
var fileInput = new FileInfo(filePath);
var stream = fileInput.OpenRead();

Expand Down Expand Up @@ -225,14 +225,14 @@ public void ThrowsInvalidOperationExceptionInCreatePredicateWhenInvalidArguments
public async Task CopiesOverAllReferencedComponentsToTheSubsetDocumentCorrectly()
{
// Arrange
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "docWithReusableHeadersAndExamples.yaml");
var filePath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "UtilityFiles", "docWithReusableHeadersAndExamples.yaml");
var operationIds = "getItems";

// Act
using var stream = File.OpenRead(filePath);
var settings = new OpenApiReaderSettings();
settings.AddYamlReader();
var doc = (await OpenApiDocument.LoadAsync(stream, "yaml", settings)).Document;
var doc = (await OpenApiDocument.LoadAsync(stream, "yaml", settings, TestContext.Current.CancellationToken)).Document;

// validated the tags are read as references
var openApiOperationTags = doc?.Paths["/items"].Operations?[HttpMethod.Get].Tags?.ToArray();
Expand Down Expand Up @@ -278,7 +278,7 @@ public async Task CopiesOverAllReferencedComponentsToTheSubsetDocumentCorrectly(
}
};
subsetOpenApiDocument.SerializeAsV3(writer);
await writer.FlushAsync();
await writer.FlushAsync(TestContext.Current.CancellationToken);
var result = outputStringWriter.ToString();
Assert.NotEmpty(result);
}
Expand Down
Loading
Loading