Skip to content

Commit

Permalink
add Scalar an openapi UI
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Oct 25, 2024
1 parent d16eac3 commit d730b8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/CrdtMerge/CrdtMerge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0-rc.1.24452.1" />
<PackageReference Include="Scalar.AspNetCore" Version="1.2.22" />
<PackageReference Include="SIL.ChorusPlugin.LfMergeBridge" Version="4.2.0-beta0027" />
<PackageReference Include="SIL.Chorus.Mercurial" Version="6.5.1.*" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions backend/CrdtMerge/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using LcmCrdt;
using Microsoft.Extensions.Options;
using MiniLcm;
using Scalar.AspNetCore;

var builder = WebApplication.CreateBuilder(args);

Expand All @@ -19,6 +20,8 @@
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
//access at /scalar/v1
app.MapScalarApiReference();
}

app.UseHttpsRedirection();
Expand Down

0 comments on commit d730b8c

Please sign in to comment.