feat: disallow null on schema
This commit is contained in:
parent
d43d4fa190
commit
8666e9a051
@ -29,4 +29,10 @@ public class WeatherForecastController : ControllerBase
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void Post(WeatherForecast forecast)
|
||||
{
|
||||
Console.WriteLine("Inserting!!! :D");
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,11 @@ builder.Services.AddDbContext<ApplicationDbContext>(options =>
|
||||
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
builder.Services.AddSwaggerGen(options =>
|
||||
{
|
||||
options.SupportNonNullableReferenceTypes();
|
||||
}
|
||||
);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user