Base document
The document through which the specification can be seen.
Let's go to the main file and, before the app.listen()
call, allow for a document
of the specification. Here, we'll first set the config
of the document
.
Then, let's create a documentFactory
, using the config
and the app
.
Finally, let's expose the document
and define a path
for accessing it.
With just this, it is already available through the Swagger UI. We can then see it by accessing in the browser's URL, the root route followed by "api". If you give it a look, you'll notice that the routes and DTOs have been automatically detected and are shown here. However, most information is missing. Let's then begin to fix this.
Commit - Creating a swagger base document
Last updated