-
Notifications
You must be signed in to change notification settings - Fork 82
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
SwaggerResponseExample is not working in version 2.2.0 #16
Comments
It's working for me. Can you try 2.2.1, which I just released a minute ago? If it's not working please post your code. |
I tested and it's not working in version 2.2.1 too. I am using .net core 2.0 and bogus nuget, but even without bogus it's still not working in these versions (2.2.0/2.2.1). My repository https://github.com/ThaynaraSantos/api-doc |
Hmm I don't have .NET Core 2.0 installed on my dev box as it has issues with some of my existing .NET Core 1.1 solutions at work. I will try run your code under Core 1.1 and see if I can reproduce your issue. |
Great, thanks! |
What exactly is not working? I've moved your code to my Core 1.1 sample app:
And as you can see, it's working fine: |
Run the project and go to http://localhost:25111/docs The same response example, in version 2.1.1, is working. |
swagger.json generated in: Version 2.1.1 (working) Version 2.2.1 (not_working) Maybe, the ReDoc script can't read the example in swagger.json after that change. For your knowledge. (https://github.com/Rebilly/ReDoc) |
OK, so it IS working in Swagger-UI, which is where I test it, but not working in ReDoc. I removed the application/json stuff by request as part of Issue #12. When I get a chance to do that I will port that PR to this project and then it should work again for ReDoc. I have no idea why redoc needs application/json to work and that seems stupid, but I haven't been through their spec to make sense of it, as I only just heard of them. |
ReDoc author here. |
Thanks @RomanGotsiy for clarifying. I will revert the change so that my package produces valid Swagger as soon as I get a chance. |
…erty, as that is what the swagger spec requires.
Thank you! It's working fine now. |
This seems to be fixed now with Swashbuckle 3.0 |
To work I had to downgrade to version 2.1.1
The text was updated successfully, but these errors were encountered: