You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before the package was upgraded to 7.0.0,
the example value used to show the the type of the parameter and now it doesn't.
So it's prone to getting null exception because the argument is not passed to the server.
Expected behavior
for example when api looks like this
void TestAsync(TestParam testParam)
'example value' in swagger should be looking like this, "testParam" the type of the dto wrapping its properties.
Does the OpenAPI document for the endpoint look the same between the 6.9.0 version and the 7.0.x version? If so, then this will be an issue in SwaggerUI rather than Swashbuckle.
Does the OpenAPI document for the endpoint look the same between the 6.9.0 version and the 7.0.x version? If so, then this will be an issue in SwaggerUI rather than Swashbuckle.
'look the same' meaning same as I described above?
I checked and the OpenApi documents between 6.9.0 and 7.0.x versions look different.
6.9.0 document has a "type" : "object" under "schema" and 7.0.0 doesn't.
Describe the bug
Before the package was upgraded to 7.0.0,
the example value used to show the the type of the parameter and now it doesn't.
So it's prone to getting null exception because the argument is not passed to the server.
Expected behavior
for example when api looks like this
'example value' in swagger should be looking like this,
"testParam"
the type of the dto wrapping its properties.Actual behavior
instead, it looks like this without the dto wrapping. So when you 'try out' with below format then you get null parameter.
Steps to reproduce
Make an api that takes a dto as a parameter like this.
upgrade SwashBuckle packages to 7.0.0 or 7.0.1
and check the actual behavior explained above but when trying with 6.9.0 version it works like the expected behavior.
Exception(s) (if any)
No response
Swashbuckle.AspNetCore version
7.0.0 and 7.1.0
.NET Version
net8.0
Anything else?
No response
The text was updated successfully, but these errors were encountered: