question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove tags at the base of the swagger json document

See original GitHub issue
  • Version: 2.9.2
  • What kind of issue is this? Feature Request

Hello, we started using SpringFox, and we don’t want to generate any tag at document root level.

For example, right now, if I have a Controller like this.

@RestController
@RequestMapping("/publicapi/v1/trips")
public class TripPublicController {
   ...
}

Then the swagger document contains default tags like this:

tags: [
  {
    name: "trip-public-controller",
    description: "Trip Public Controller"
  }
]

I tried to set the following annotations @Api(tags = {}), but it is ignored. Debugging, it looks like it is coming from that code in the SwaggerApiListingReader: https://github.com/springfox/springfox/blob/09d4a734b64a216bb5c26c0329f3d15b8276c0e4/springfox-swagger-common/src/main/java/springfox/documentation/swagger/web/SwaggerApiListingReader.java#L55

So I would like to know how you would like to see a feature to actually set not tag if you don’t want them.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
didierbreedtcommented, May 11, 2021

Setting @Api(tags = {"Endpoints"}) removed the auto generated tag for that controller.

3reactions
dilipkrishcommented, Sep 4, 2020

@DavidDev21 could you create a new issue describing your problem and which springfox version you’re using.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration - Swagger Documentation
How to configure. Swagger UI accepts configuration parameters in four locations. From lowest to highest precedence: The swagger-config.yaml in the ...
Read more >
OpenAPI Specification - Version 3.0.3 - Swagger
The OpenAPI Specification defines a standard interface to RESTful APIs which allows both humans and computers to understand service capabilities without ...
Read more >
Paths and Operations - Swagger
OpenAPI 3.0 supports get , post , put , patch , delete , head , options , and trace . A single path...
Read more >
OpenAPI Specification - Version 2.0 - Swagger
While the API is described using JSON it does not impose a JSON ... tags, [Tag Object], A list of tags used by...
Read more >
Swagger RESTful API Documentation Specification
Please note that while the API is described using JSON, the input and/or output can be in XML, YAML, plain text, or whichever...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found