mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Update OpenAPI setup and package versions
Updated `Program.cs` to always execute OpenAPI setup, including `app.MapOpenApi()` and `app.UseSwaggerUI`, and added `options.RemoveServerList()` to `builder.Services.AddOpenApi`. Simplified `app.UseSwaggerUI` call. In `SqlDatabaseVectorSearch.csproj`, updated `Microsoft.ML.Tokenizers` to `1.0.1`, `Microsoft.ML.Tokenizers.Data.Cl100kBase` and `Microsoft.ML.Tokenizers.Data.O200kBase` to `1.0.1`, `MinimalHelpers.OpenApi` to `2.1.3`, and `TinyHelpers.AspNetCore` to `4.0.15`.
This commit is contained in:
@@ -47,6 +47,7 @@ builder.Services.AddScoped<VectorSearchService>();
|
||||
builder.Services.AddOpenApi(options =>
|
||||
{
|
||||
options.AddDefaultResponse();
|
||||
options.RemoveServerList();
|
||||
});
|
||||
|
||||
builder.Services.AddDefaultProblemDetails();
|
||||
@@ -60,15 +61,12 @@ app.UseHttpsRedirection();
|
||||
app.UseExceptionHandler();
|
||||
app.UseStatusCodePages();
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
app.MapOpenApi();
|
||||
app.UseSwaggerUI(options =>
|
||||
{
|
||||
app.MapOpenApi();
|
||||
app.UseSwaggerUI(options =>
|
||||
{
|
||||
options.RoutePrefix = string.Empty;
|
||||
options.SwaggerEndpoint("/openapi/v1.json", builder.Environment.ApplicationName);
|
||||
});
|
||||
}
|
||||
options.RoutePrefix = string.Empty;
|
||||
options.SwaggerEndpoint("/openapi/v1.json", builder.Environment.ApplicationName);
|
||||
});
|
||||
|
||||
var documentsApiGroup = app.MapGroup("/api/documents").WithTags("Documents");
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" Version="9.1.0-preview.1.25064.3" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.33.0" />
|
||||
<PackageReference Include="MinimalHelpers.OpenApi" Version="2.1.2" />
|
||||
<PackageReference Include="MinimalHelpers.OpenApi" Version="2.1.3" />
|
||||
<PackageReference Include="PdfPig" Version="0.1.9" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
|
||||
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.0.6" />
|
||||
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.0.15" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user