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
6 changes: 0 additions & 6 deletions src/Http/CrazyStartingWebApp/CrazyStartingWebApp.http

This file was deleted.

6 changes: 0 additions & 6 deletions src/Http/DeepMiddlewareUsage/DeepMiddlewareUsage.http

This file was deleted.

6 changes: 0 additions & 6 deletions src/Http/NSwagDemonstrator/NSwagDemonstrator.http

This file was deleted.

25 changes: 0 additions & 25 deletions src/Http/OpenApiDemonstrator/Endpoints.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Swashbuckle.AspNetCore.Swagger;
using Wolverine.Http;

namespace OpenApiDemonstrator;
Expand All @@ -18,30 +17,6 @@ public static Message1 PostMessage()
}
}

public class BuildSwagger : IHostedService
{
private readonly ISwaggerProvider _provider;

public BuildSwagger(ISwaggerProvider provider)
{
_provider = provider;
}

public Task StartAsync(CancellationToken cancellationToken)
{
//var document = _provider.GetSwagger("v1");

//Debug.WriteLine(document);

return Task.CompletedTask;
}

public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

public class Message1;

public class ResponseModel
Expand Down
5 changes: 4 additions & 1 deletion src/Http/OpenApiDemonstrator/OpenApiDemonstrator.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<PackageReference Include="Shouldly" />
<PackageReference Include="Swashbuckle.AspNetCore" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 2 additions & 10 deletions src/Http/OpenApiDemonstrator/Program.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using IntegrationTests;
using Marten;
using JasperFx;
using OpenApiDemonstrator;
using Wolverine;
using Wolverine.Http;
using Wolverine.Marten;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddOpenApi();

builder.Services.AddWolverineHttp();

Expand All @@ -20,15 +16,11 @@

builder.Host.UseWolverine();

builder.Services.AddHostedService<BuildSwagger>();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
app.MapOpenApi();
}

app.MapWolverineEndpoints();
Expand Down
8 changes: 4 additions & 4 deletions src/Http/OpenApiDemonstrator/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
Expand All @@ -13,7 +13,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"launchUrl": "openapi/v1.json",
"applicationUrl": "http://localhost:5136",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -23,7 +23,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"launchUrl": "openapi/v1.json",
"applicationUrl": "https://localhost:7160;http://localhost:5136",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -32,7 +32,7 @@
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"launchUrl": "openapi/v1.json",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
9 changes: 2 additions & 7 deletions src/Http/StaticCodeGenDemonstrator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,15 @@
opts.CodeGeneration.TypeLoadMode = TypeLoadMode.Static;
});

// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddOpenApi();

builder.Services.AddWolverineHttp();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
app.MapOpenApi();
}

app.MapWolverineEndpoints();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
Expand All @@ -13,7 +13,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"launchUrl": "openapi/v1.json",
"applicationUrl": "http://localhost:5161",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -23,7 +23,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"launchUrl": "openapi/v1.json",
"applicationUrl": "https://localhost:7108;http://localhost:5161",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -32,7 +32,7 @@
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"launchUrl": "openapi/v1.json",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi"/>
<PackageReference Include="Swashbuckle.AspNetCore"/>
</ItemGroup>

<ItemGroup>
Expand Down

This file was deleted.

Loading
Loading