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 ;
@@ -85,7 +86,7 @@ public static async Task TransformOpenApiDocumentAsync(HidiOptions options, ILog
85
86
var apiDependency = await FindApiDependencyAsync ( options . FilterOptions . FilterByApiManifest , logger , cancellationToken ) . ConfigureAwait ( false ) ;
86
87
if ( apiDependency != null )
87
88
{
88
- options . OpenApi = apiDependency . ApiDescripionUrl ;
89
+ options . OpenApi = apiDependency . ApiDescriptionUrl ;
89
90
}
90
91
91
92
// If Postman Collection is provided, load it
@@ -745,7 +746,7 @@ internal static async Task PluginManifestAsync(HidiOptions options, ILogger logg
745
746
var apiDependency = await FindApiDependencyAsync ( options . FilterOptions ? . FilterByApiManifest , logger , cancellationToken ) . ConfigureAwait ( false ) ;
746
747
if ( apiDependency != null )
747
748
{
748
- options . OpenApi = apiDependency . ApiDescripionUrl ;
749
+ options . OpenApi = apiDependency . ApiDescriptionUrl ;
749
750
}
750
751
751
752
// Load OpenAPI document
@@ -771,15 +772,11 @@ internal static async Task PluginManifestAsync(HidiOptions options, ILogger logg
771
772
WriteOpenApi ( options , OpenApiFormat . Json , OpenApiSpecVersion . OpenApi3_1 , document , logger ) ;
772
773
773
774
// Create OpenAIPluginManifest from ApiDependency and OpenAPI document
774
- var manifest = new OpenAIPluginManifest
775
+ 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" )
775
776
{
776
- NameForHuman = document . Info . Title ,
777
- DescriptionForHuman = document . Info . Description ,
778
- Api = new ( )
779
- {
780
- Type = "openapi" ,
781
- Url = "./openapi.json"
782
- }
777
+ DescriptionForHuman = document . Info ? . Description ?? "Description placeholder" ,
778
+ Api = new ( "openapi" , "./openapi.json" ) ,
779
+ Auth = new ManifestNoAuth ( ) ,
783
780
} ;
784
781
manifest . NameForModel = manifest . NameForHuman ;
785
782
manifest . DescriptionForModel = manifest . DescriptionForHuman ;
0 commit comments