0

I am trying to mock the REST API using swagger.. I currently created nodejs project in which the default js appreas which is hello_world.js in ./api/controllers/hello_world.js.

Now I want to create a new controller and want to refer that to my YAML, that is from swaggerUI.. How can I do it? Any link would be much useful.

I am only mocking APIS, not developing.

Many thanks in advance.

mashkurm
  • 393
  • 4
  • 18
  • 1
    Since you're interested in mocking only, check out this Q&A: [Swagger mock server](https://stackoverflow.com/q/38344711/113116). – Helen Jun 24 '17 at 12:07

1 Answers1

0

Checkout the swagger codegen project, which generates server stubs based on the api specification. Node.js is among the supported languages: https://github.com/swagger-api/swagger-codegen

zakaria amine
  • 2,617
  • 16
  • 29