Forum Discussion

micscopau's avatar
micscopau
New Member
14 days ago

Endpoint Expansion

I am using @nestjs/swagger to auto generate my swagger page. This is my config setup:

```  const config = new DocumentBuilder()
    .setTitle("Swagger API")
    .setDescription("The API")
    .setVersion("1.0")
    .addTag("myTag")
    .build()

  const document = () => SwaggerModule.createDocument(app, config)
  SwaggerModule.setup("api", app, document, {
    swaggerOptions: {
      docExpansion: "none", // Collapses all tags and endpoints by default
      defaultModelsExpandDepth: -1, // Models are hidden by default
      defaultExpandedDepth: 1, // Only expand tags, not individual endpoints
    }
  })```

The issue I am experiencing is when I click to expand an endpoint on the API, all of the endpoints expand at the same time and I do not want this. Am I missing something in my configs, or is this a quirk/bug with @nestjs/swagger?

No RepliesBe the first to reply