I can provide more detail, but not sure what is useful, so I will respond with more specific information if requested.
I have a .NET Core 3.1 project which was using Swashbuckle to provide Swagger UI. It started using the Swashbuckle.AspNetCore NuGet package version 5.0.0-rc4, and everything worked.
I have a controller method that takes a Contract object:
public async Task<IActionResult> Import([FromBody] Contract contract) {
This is just an extremely basic class (I stripped everything down while troubleshooting), basically just:
public class Contract {
/// <summary>
/// Optional, summary
/// </summary>
public DateTime contractExpirationDate;
public DateTime date;
}
It all works great, the Swagger UI shows Contract in the Schemas section with all it's details, and it shows up in the controllers section and tryout properly starts out with the example structure filled out, etc.
Everything is great... until I try to update Swashbuckle.AspNetCore any further... as soon as I hit 5.0.0-rc5 , or go to 5.0.0, or go anywhere all the way up to the latest (currently 5.4.1), I immediately run into the following problem.
Basically, what happens is, Swagger still runs and everything seems fine, but the Contract schema now shows as simply {}. It SEES Contract as a schema, but it's empty, and the controller Try it example doesn't have the sample (it just has {} as the request body), etc. If I just go and update Swashbuckle.AspNetCore back down to 5.0.0-rc4 and immediately re-run it, it works again.
I'm sure I'm missing some obvious change/update I need to make to advance beyond 5.0.0-rc4 , but I have spent quite a while trying to figure out what it is, and I'm coming up blank. My code seems to match all the examples on Microsoft's site, so I am not sure what I'm missing.