Cody2333 / koa-swagger-decorator

using decorator to automatically generate swagger doc for koa-router
348 stars 81 forks source link

Swagger "spec" attribute is doing nothing. #180

Closed Nojipiz closed 11 months ago

Nojipiz commented 11 months ago

This is a Router config, where in theory you can change the title of your swagger html page.

const router = new SwaggerRouter({
  spec: {
    info: {
      title: "My Custom API",
      version: "2.5",
      description: "ASDASDASD"
    },
  },
},{
    prefix: "/api"
  }
);

It runs but don't set the title, version or description to the docs.

2023-09-22_12:41:15

It should say "My Custom API" instead of "Swagger open API", right?

EDIT: I just run the code in your main branch (2.2.1) and this seems to be working, is this bug only happening on the 2.0.0 version?

Nojipiz commented 11 months ago

Forget about this, it was a bug from the 2.0.0. It's solved