You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate documentation, but something is wrong.
I have created a repository, where you can see my implementation. I'm using the same project structure/configuration as in the prepared repository. Feel free to "play around" with prepared case.
In both cases, generated swagger.json don't contain any information about my controllers.
In the controller class, I have added @Tags('Hello World') for experiments. But it doesn't work either.
Maybe in my configuration is something wrong. If yes, could you prepare a small example of how to correct it? I will be very grateful. Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to generate documentation, but something is wrong.
I have created a repository, where you can see my implementation. I'm using the same project structure/configuration as in the prepared repository. Feel free to "play around" with prepared case.
The link to a repository is here -> https://github.com/perfringis/swagger-test-repo
In the case of
Server.loadServices
In my
app.js
file as you can see. I'm trying to useServer.loadServices(router, 'controllers/*', __dirname);
The swagger config file looks as follows:
The
index.ts
file in thecontrollers
directory looks as follows:The
hello-world.controller.ts
is a just simple class implementation.After that, I'm trying to generate documentation by running the
npm/yarn run swagger
command.After running the command. Prepared
swagger.json
looks as follows:Looks like in the
paths
property, there is no information about my controllers.In the case of
Server.buildServices
This implementation is slightly different.
In
app.js
file, I'm usingimport Controllers from './controllers';
andServer.buildServices(router, ...Controllers);
.The swagger config file looks as follows:
The
index.ts
file in thecontrollers
directory looks as follows:The
hello-world.controller.ts
is a just simple class implementation.After that, I'm trying to generate documentation by running the
npm/yarn run swagger
command.After running the command. Prepared
swagger.json
looks as follows:In both cases, generated
swagger.json
don't contain any information about my controllers.In the controller class, I have added
@Tags('Hello World')
for experiments. But it doesn't work either.Maybe in my configuration is something wrong. If yes, could you prepare a small example of how to correct it? I will be very grateful. Thanks in advance.
The text was updated successfully, but these errors were encountered: