22
22
using Microsoft . OData . Edm . Csdl ;
23
23
using Microsoft . OpenApi . ApiManifest ;
24
24
using Microsoft . OpenApi . ApiManifest . OpenAI ;
25
+ using Microsoft . OpenApi . ApiManifest . OpenAI . Authentication ;
25
26
using Microsoft . OpenApi . Extensions ;
26
27
using Microsoft . OpenApi . Hidi . Extensions ;
27
28
using Microsoft . OpenApi . Hidi . Formatters ;
@@ -73,7 +74,7 @@ public static async Task TransformOpenApiDocumentAsync(HidiOptions options, ILog
73
74
var apiDependency = await FindApiDependencyAsync ( options . FilterOptions . FilterByApiManifest , logger , cancellationToken ) . ConfigureAwait ( false ) ;
74
75
if ( apiDependency != null )
75
76
{
76
- options . OpenApi = apiDependency . ApiDescripionUrl ;
77
+ options . OpenApi = apiDependency . ApiDescriptionUrl ;
77
78
}
78
79
79
80
// If Postman Collection is provided, load it
@@ -728,7 +729,7 @@ internal static async Task PluginManifestAsync(HidiOptions options, ILogger logg
728
729
var apiDependency = await FindApiDependencyAsync ( options . FilterOptions ? . FilterByApiManifest , logger , cancellationToken ) . ConfigureAwait ( false ) ;
729
730
if ( apiDependency != null )
730
731
{
731
- options . OpenApi = apiDependency . ApiDescripionUrl ;
732
+ options . OpenApi = apiDependency . ApiDescriptionUrl ;
732
733
}
733
734
734
735
// Load OpenAPI document
@@ -753,15 +754,11 @@ internal static async Task PluginManifestAsync(HidiOptions options, ILogger logg
753
754
WriteOpenApi ( options , OpenApiFormat . Json , OpenApiSpecVersion . OpenApi3_0 , document , logger ) ;
754
755
755
756
// Create OpenAIPluginManifest from ApiDependency and OpenAPI document
756
- var manifest = new OpenAIPluginManifest
757
+ var manifest = new OpenAIPluginManifest ( document . Info ? . Title ?? "Title" , document . Info ? . Title ?? "Title" , "https://go.microsoft.com/fwlink/?LinkID=288890" , document . Info ? . Contact ? . Email ?? "[email protected] " , document . Info ? . License ? . Url . ToString ( ) ?? "https://placeholderlicenseurl.com" )
757
758
{
758
- NameForHuman = document . Info . Title ,
759
- DescriptionForHuman = document . Info . Description ,
760
- Api = new ( )
761
- {
762
- Type = "openapi" ,
763
- Url = "./openapi.json"
764
- }
759
+ DescriptionForHuman = document . Info ? . Description ?? "Description placeholder" ,
760
+ Api = new ( "openapi" , "./openapi.json" ) ,
761
+ Auth = new ManifestNoAuth ( ) ,
765
762
} ;
766
763
manifest . NameForModel = manifest . NameForHuman ;
767
764
manifest . DescriptionForModel = manifest . DescriptionForHuman ;
0 commit comments