Reputation: 19820
I'm trying to generate a custom response example value using NSwag. When using Swashbuckle there are attributes for it, but I'm not sure how to do it in NSwag.
I found this thread, but I'm not familiar enough with Swagger to translate the code.
Does anyone have any complete examples of how to achieve this functionality?
Upvotes: 3
Views: 4536
Reputation: 11858
If you know the expected JSON field and structure of the sample, you can implement this yourself by modifying the code in this blog: https://blog.rsuter.com/nswag-tutorial-implement-a-custom-operation-processor-to-define-redoc-code-samples/
Upvotes: 1