Skip to content

Commit 3219727

Browse files
committed
fix: update namespace reference following OAI.net updates
1 parent 3a36b10 commit 3219727

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/lib/Helpers/ParsingHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4-
using Microsoft.OpenApi.Models;
4+
using Microsoft.OpenApi;
55
using Microsoft.OpenApi.Reader;
66
using System.Diagnostics;
77
using System.Text.Json;

src/lib/TypeExtensions/ApiManifestDocumentExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.OpenApi.ApiManifest.Helpers;
33
using Microsoft.OpenApi.ApiManifest.OpenAI;
44
using Microsoft.OpenApi.ApiManifest.OpenAI.Authentication;
5-
using Microsoft.OpenApi.Models;
5+
using Microsoft.OpenApi;
66
using System.Globalization;
77

88
namespace Microsoft.OpenApi.ApiManifest.TypeExtensions
@@ -35,7 +35,7 @@ public static async Task<OpenAIPluginManifest> ToOpenAIPluginManifestAsync(this
3535
var result = await ParsingHelpers.ParseOpenApiAsync(new Uri(apiDependency!.ApiDescriptionUrl), false, cancellationToken).ConfigureAwait(false);
3636
if (string.IsNullOrWhiteSpace(openApiPath))
3737
openApiPath = apiDependency.ApiDescriptionUrl;
38-
return apiManifestDocument.ToOpenAIPluginManifest(result.Document
38+
return apiManifestDocument.ToOpenAIPluginManifest(result.Document
3939
?? throw new ApiManifestException(ErrorMessage.OpenApiDocumentIsNull), logoUrl, legalInfoUrl, openApiPath!);
4040
}
4141
}
@@ -57,8 +57,8 @@ public static OpenAIPluginManifest ToOpenAIPluginManifest(this ApiManifestDocume
5757
apiManifestDocument.Validate();
5858
string contactEmail = apiManifestDocument.Publisher?.ContactEmail!;
5959

60-
string title = string.IsNullOrEmpty(openApiDocument.Info.Title) || openApiDocument.Info.Title is null
61-
? "Default Title": openApiDocument.Info.Title;
60+
string title = string.IsNullOrEmpty(openApiDocument.Info.Title) || openApiDocument.Info.Title is null
61+
? "Default Title" : openApiDocument.Info.Title;
6262
var openApiManifest = OpenApiPluginFactory.CreateOpenAIPluginManifest(title, title, logoUrl, contactEmail, legalInfoUrl);
6363
openApiManifest.Api = new Api("openapi", openApiPath);
6464
openApiManifest.Auth = new ManifestNoAuth();

src/lib/TypeExtensions/OpenApiDocumentExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33

44
using Microsoft.OpenApi.ApiManifest.Helpers;
5-
using Microsoft.OpenApi.Models;
5+
using Microsoft.OpenApi;
66
using System.Text.RegularExpressions;
77

88
namespace Microsoft.OpenApi.ApiManifest.TypeExtensions
@@ -73,7 +73,7 @@ public static ApiManifestDocument ToApiManifest(this OpenApiDocument document, s
7373
};
7474
apiManifest.ApiDependencies[apiDependencyName].Requests.Add(requestInfo);
7575
}
76-
}
76+
}
7777
}
7878
return apiManifest;
7979
}

tests/ApiManifest.Tests/TypeExtensions/OpenApiDocumentExtensionsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Microsoft.OpenApi.ApiManifest.TypeExtensions;
2-
using Microsoft.OpenApi.Models;
2+
using Microsoft.OpenApi;
33

44
namespace Microsoft.OpenApi.ApiManifest.Tests.TypeExtensions
55
{

0 commit comments

Comments
 (0)