-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
When using APIExplorer the ControllerType is incorrect and version appears incomplete #1294
Comments
Thanks for reporting. The goal is to make the ApiExplorer generator output as similar as possible to the old generator so that we can deprecate the reflection based generator eventually and give the users an easy way to migrate to the new generator... I think version handling is not really good supported by the old generator, so maybe we can improve it in both generators and streamline the output? There are probably a lot of other differences which have to be fixed before we can remove the experimental status of the api explorer generator... If you are willing to help, it would be great! For more info, see #999 |
I've improved api versioning support, see and Please try with latest version... |
But I think your problem may not be covered... We need to add tests for that first... |
I just tried with the latest version on Nuget |
Hi, just coming back here to report the status after testing it with version |
After updating to version 12 everything is working as expected. |
After #1288 was completed I was able to test NSwag with and without API Explorer, and I found a few differences.
So, my controller is inheriting from another controller, and that is what #1288 fixed. But the name that shows up is the name of the controller that has the original operation, not from the one that inherited it.
Also, the version appears as "v1.0" without API Explorer, but only as "v1" with API Explorer. I am not sure why.
Bellow you can see both without API Explorer (1st image) and with (2nd image):
Also, to only show v1 and v2 on specific pages, I add NSwag several times, one for each version (with different routes), and then I am doing this:
(I am not sure this is the expected way to do it... anyway)
But, as the versions are showing up differently (v1.0 vs v1), all operations are shown, as you can see on the second image. I am sure that this is happening because of this line, which returns null:
https://github.com/RSuter/NSwag/blob/c44d37206e65b7271cad4c7180c5e6724e65c449/src/NSwag.SwaggerGeneration/Processors/ApiVersionProcessor.cs#L47
So, there are these 2 differences from using API Explorer or not.
The text was updated successfully, but these errors were encountered: