« Scalar » : différence entre les versions
Apparence
Ligne 15 : | Ligne 15 : | ||
</filebox> | </filebox> | ||
URL: {{boxx|http://localhost:xxxx/scalar}} | URL: {{boxx|http://localhost:xxxx/scalar}} | ||
<filebox fn='Properties/launchSettings.json'> | |||
{ | |||
"profiles": { | |||
"http": { | |||
"launchBrowser": true, | |||
} | |||
} | |||
} | |||
</filebox> |
Version du 18 janvier 2025 à 12:05
ASP.NET Core 9 integration
dotnet add package Scalar.AspNetCore |
Program.cs |
builder.Services.AddOpenApi();
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
app.MapScalarApiReference(); // add this line
}
|
URL: http://localhost:xxxx/scalar
Properties/launchSettings.json |
{
"profiles": {
"http": {
"launchBrowser": true,
}
}
}
|