3 ms·
I think this is a step backward. Its amusing to be able to mock out some APIs but the fact that its just a mock makes it a waste of time. There are already pr
by jayd16 12y ago
I think this is a step backward.
Its amusing to be able to mock out some APIs but the fact that its just a mock makes it a waste of time.
There are already projects that let you automatically build out a swagger page from a jax-ws project (or your language of choice). Actually making the objects and stubbing out endpoints in code should be just as fast as playing with a new custom schema language.
- scottganyo 12y agoBut just looking at it as a way to just mock an API ignores the possibilities. The idea is that by having a formal definition of an API, not only can you consider and develop the API interface in isolation from your implementation, but you can use the same language to generate documentation, client SDKs, and server-side routing and request/response validation. That final aspect is the thrust of swagger-node (https://www.npmjs.com/swagger https://www.npmjs.com/swagger) where we can take a Swagger document and use it as the basis of a dynamic (ie. not code-gen) Node.js API server. In the future, we'll also move beyond validation and routing to utilize extensions to declaratively provide other API services that are necessary but tangential to the business logic.