-
Notifications
You must be signed in to change notification settings - Fork 711
OData Swashbuckle 5.0.0 rc-4 swagger.json generation for requestbody #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I haven't tried it - yet, but there's a chance the attributes are confusing the API Explorer. Delta<T> is special as are a few other types in OData. These types have their own model binders. Part of the model binder API requires that they indicate where the value comes from. I've actually not need I'd first try removing the attributes and see if that makes a difference. You can also work backward from this example with OData and Swashbuckle. |
Thanks for the response, sounds even more complex than I feared... Just a quick comment - I tried replacing the last parameter type with just a string and without the |
Okay, simple steps to verify: |
It seems that Swashbuckle has changed a bunch of things under the hood. Specifically, there are some changes related to model generation that is breaking the OData support. I also found some actual issues that apparently Swashbuckle was being generous about that I would consider a bug. This is now the final blocker to the v4.0 release. I thought I had everything ironed out. I'm hoping to have it resolved soon. In the meantime, if this is blocking you, then I would recommend an older version of Swashbuckle. Things were definitely working in 4.0.1. I'm not sure how far you can advance before things fall down. Thanks. |
Hm, hopefully the end result will be worth the effort. Thank you for your hard work! Luckily I'm not in a hurry :) |
AspNetCore 2.2
Swashbuckle.AspNetCore 5.0.0-rc4
AspNetCore.OData.Versioning.ApiExplorer v.3.2.3
Original issue: domaindrivendev/Swashbuckle.AspNetCore#1331
When I have an OData API controller with a PATCH/PUT/POST method that requires an [FromBody]-parameter, the generated swagger.json does not have any content on
requestbody
. See the original issue for a code and result sample. GET works beautifully.Is this an issue of the api-versioning package or OData itself?
The text was updated successfully, but these errors were encountered: