what does Swagger server stub mean?

Mohamad picture Mohamad · Aug 2, 2018 · Viewed 8.1k times · Source

I am new to Swagger, and I ran into the term Server Stub. I do not understand what does that mean, and it would be appreciated if anyone explains that term for me.

Answer

maio290 picture maio290 · Aug 2, 2018

From a swagger tutorial:

With SwaggerHub, you can easily generate a server stub (an API implementation stub) for Node.js, ASP.NET, JAX-RS, and other servers and frameworks. The server stub is a good starting point for implementing your API – you can run and test it locally, implement the business logic for your API, and then deploy it to your server.

https://app.swaggerhub.com/help/apis/generating-code/server-stub

and a stub is:

method stub or simply stub in software development is a piece of code used to stand in for some other programming functionality. A stub may simulate the behavior of existing code (such as a procedure on a remote machine, such methods are often called mocks) or be a temporary substitute for yet-to-be-developed code. Stubs are therefore most useful in porting, distributed computing as well as general software development and testing.

https://en.wikipedia.org/wiki/Method_stub