Contributions
Prepopulate REST Method Parameter Values
I updated my swashbuckle config in a rest service solution to include some example request object values. I was hoping when I imported the swagger.json from my service after doing so, that the request values for those methods would be prefilled with those example values, but I don't see that occurring. Is there way to get this to work? Besides having examples prepopulated in the project, my other goal is to be able to generate a mock service from a swagger.json import which returns example content as well. Are either of these things possible?558Views0likes0CommentsGenerate swagger/openAPI definition from existing web service?
My goal is to simulate/mock an existing REST web service which was developed in VS Code. I see that SwaggerHub and other tools like SoapUI are able to generate a mock via Swagger/OpenAPI or WADL definition files that other applications can interact with (in substitution of the real service). Is there anyway to generate a Swagger/OpenAPI or WADL definition file from either a VS Code project, or from a deployed version of a REST web service? So far the two options I've found are to either define the request methods in a SoapUI project and verify them against a deployment of a webservice (and then be able to generate a definition file or mock from that project). Or to use a tool that monitors a port while a client interacts with a REST service, and maps out what it sees occurring. Both of these methods seem a bit slow and cumbersome, so I was wondering if there's any more efficient method. Since I don't see too many people asking this question on various forums, and since I don't see tools really advertising this functionality, maybe I'm missing a fundamental understanding of how formal definitions for REST services work in thinking this should exist. Maybe this is a complex language/implementation dependent to solve which doesn't have any easy solutions. (Or maybe I'm searching for the wrong keywords).685Views0likes1Comment