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.
Anyone can generate a server stub for any API in SwaggerHub, unless the API owner disabled server generation in the code generation options.
Downloading a server stub
Open the API page in SwaggerHub.
If the API has several versions, select the version, for which you want to generate the code.
From the Export menu, select Server Stub, and then the desired language or framework.
Note: Languages marked with an asterisk * use custom code generation options as configured by the API editors.
Download and unzip the server code.
Code generation options
API owners can customize the code generation options for their APIs.
Custom server generators
SwaggerHub On-Premise allows companies to create and use custom code generators. To learn more, see Using Custom Codegen Templates.
I have downloaded the server stub. Now what?
You can run and test the generated server locally. Note that the generated API code contains just stub methods that do not contain any actual programming logic. You need to implement the logic yourself to handle whatever work the API needs to do. Once the implementation is ready, you can deploy the API locally or on your server. See the README.md file in the downloaded archive to get started.