Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

is the swagger-ui automatically included ? #596

@walshe

Description

@walshe

Hi, I used swagger-node to generate an express app - nice.. but now I would like to get the swagger-ui (for my apps api) also integrated in my running app e.g. at /api-docs

I tried the following, which displays the ui at root but it is pointing to some external pet store api.

any help is appreciated thanks

const pathToSwaggerUi = require('swagger-ui-dist').absolutePath()
var express = require('express')

var app = express();

app.use(express.static(pathToSwaggerUi))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions