Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Samples/IncidentService/IncidentService/Incident.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public Incident()
{
}

public void Apply(IncidentLogged _) { }
public void Apply(AgentRespondedToIncident _) => HasOutstandingResponseToCustomer = false;

public void Apply(CustomerRespondedToIncident _) => HasOutstandingResponseToCustomer = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

<ItemGroup>
<PackageReference Include="Marten.AspNetCore" Version="8.0.0-rc-2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0"/>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="9.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="9.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="9.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/Samples/IncidentService/IncidentService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();

//builder swagger commands
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Services.AddMarten(opts =>
{
var connectionString = builder.Configuration.GetConnectionString("Marten");
Expand Down Expand Up @@ -60,6 +64,10 @@

app.MapWolverineEndpoints();

app.UseSwagger();
app.UseSwaggerUI();
app.MapGet("/", () => Results.Redirect("/swagger"));

// Using the expanded command line options for the Critter Stack
// that are helpful for code generation, database migrations, and diagnostics
return await app.RunJasperFxCommands(args);
Expand Down