swagger-api / swagger-api/swagger-ui

When deploying swagger on vercel on nodejs it does not show UI

Open
#8,461 49 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Workaround available
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

This is How it does look like this and I do not know how to fix this issue.

Q&A (please complete the following information)
  • OS: M1 Pro
  • Browser" Chrome, Safari
  • Version: 22
  • Method of installation: npm
  • Swagger-UI version: 3
  • Swagger/OpenAPI version: 2
Content & configuration

Swagger/OpenAPI definition:

# your YAML here

Swagger-UI configuration options:

SwaggerUI({
  // your config options here
const options = {
  definition: {
    openapi: "3.0.0",
    info: {
      title: "Library API",
      version: "1.0.0",
      description: "A simple Express Library API",
      termsOfService: "http://example.com/terms/",
      contact: {
        name: "API Support",
        url: "http://www.exmaple.com/support",
        email: "support@example.com",
      },
    },
    servers: [
      {
        url: "https://localhost:2001",
        description: "My API Documentation",
      },
    ],
  },
  // This is to call all the files
  apis: ["src/**/*.js"],
};
})
?yourQueryStringConfig
Screenshots
Screenshot 2023-03-08 at 19 31 06 Screenshot 2023-03-08 at 19 35 29
How can we help?

I have built a backend on node.js and after deploying swagger on vercel it does not show UI for api-docs rest of the things are working as they should.
Also, I have added custom HTML as well which is also working you can check the SS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files or tests are identified. Start by reproducing the Node.js Swagger UI deployment on Vercel and inspect the api-docs route alongside the provided screenshots; done means the Swagger UI renders after deployment while the other reported pages continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cloud, frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.