Skip to content

Commit

Permalink
Merge pull request #104 from microsoft/chore/tasks-linting
Browse files Browse the repository at this point in the history
chore: tasks linting
  • Loading branch information
baywet authored Sep 4, 2024
2 parents bf60bd4 + 43f6a5e commit 7ad6b26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/lib/apimanifest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.6.20" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="[6.0,9.0)" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions tests/ApiManifest.Tests/Helpers/ParsingHelpersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ public async Task ParseOpenApiAsync()
}

[Fact]
public async Task ParseOpenApiWithWrongOpenApiUrl()
public async Task ParseOpenApiWithWrongOpenApiUrlAsync()
{
var openApiUri = new Uri("https://1CED4309-EFBF-41A8-9E8F-8BBA0CB3EEE5.com/NotValid.yaml");
await Assert.ThrowsAsync<InvalidOperationException>(async () => await ParsingHelpers.ParseOpenApiAsync(openApiUri, false, CancellationToken.None));
}

[Fact]
public async Task ParseOpenApiWithOpenApiUrlWithAnInvalidSchema()
public async Task ParseOpenApiWithOpenApiUrlWithAnInvalidSchemaAsync()
{
var openApiUri = new Uri("xyx://contoso.com/openapi.yaml");
await Assert.ThrowsAsync<ArgumentException>(async () => await ParsingHelpers.ParseOpenApiAsync(openApiUri, false, CancellationToken.None));
Expand Down
4 changes: 2 additions & 2 deletions tests/ApiManifest.Tests/OpenAIPluginManifestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,14 +531,14 @@ public async Task GenerateOpenAIPluginManifestFromApiManifestOfAnApiDependencyAs
}

[Fact]
public async Task GenerateOpenAIPluginManifestFromApiManifestWithWrongApiDependency()
public async Task GenerateOpenAIPluginManifestFromApiManifestWithWrongApiDependencyAsync()
{
await Assert.ThrowsAsync<ApiManifestException>(
async () => await exampleApiManifest.ToOpenAIPluginManifestAsync("https://avatars.githubusercontent.com/bar", "https://legalinfo.foobar.com", "ContosoApi", "./openapi.yml"));
}

[Fact]
public async Task GenerateOpenAIPluginManifestFromApiManifestWithEmptyApiDependencies()
public async Task GenerateOpenAIPluginManifestFromApiManifestWithEmptyApiDependenciesAsync()
{
var apiManifest = LoadTestApiManifestDocument();
apiManifest.ApiDependencies.Clear();
Expand Down

0 comments on commit 7ad6b26

Please sign in to comment.