Simplify.Web.Postman
is a package which provides Postman collection and environment generation extension for Simplify.Web web-framework controllers.
- Add
RegisterSimplifyWebPostman
to IOC container registrations.
public static class IocRegistrations
{
public static IDIContainerProvider RegisterAll(this IDIContainerProvider containerProvider)
{
containerProvider.RegisterSimplifyWeb()
.RegisterSimplifyWebPostman();
return containerProvider;
}
}
- Use
GeneratePostmanData
after Simplify registration and container setup
DIContainer.Current
.RegisterAll()
.Verify();
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
if (builder.Environment.IsDevelopment())
DIContainer.Current.GeneratePostmanData();
app.UseSimplifyWeb();
await app.RunAsync();
}
Postman files will be generated in postman
folder inside your app build folder.