Comments (11)
+1
from play-swagger.
Just ran into this issue the other day. I would note that this tag also appears when you have a route in the main routes file but with another tag. For example, I have a tag "game" and if I have a route in my main routes file tagged "game", the "routes" tag also appears despite there being no routes with that tag, even if there are other includes in the routes file.
Instead, if I force all of my routes to be in an external routes file, the "routes" tag disappears. This is not a very convenient solution as I have to split my routes files even if I don't need them that way. A good solution might be checking if there are any untagged routes and, if there are none, removing the "routes" tag altogether.
from play-swagger.
yes please, remove the routes tag if there are no paths in it. All my paths are under different tags, and I have a couple of NoDocs
routes, but the routes tag still shows, empty.
from play-swagger.
+1
from play-swagger.
Is there any eta on this being solved? I am currently still experiencing this issue which indeed is confusing.
from play-swagger.
Possible fix would be to remove this code here
generatedTagsJson
adds a global level tag for every routes file processed. The same tag is already added to all routes in the file, so the global level tag is not required (and, imo, does not add any information to the doc). If users need to add description or other attribute, those can always be added in the base swagger file.
Removing this could fix the issue.
cc: @joprice , @kailuowang
from play-swagger.
Please take a look at this sample fix.
from play-swagger.
I think that is just an inventory of all the tags. I suspect that removing it might break all tags and not fix the root tag problem. Maybe you can write some test to try it out.
from play-swagger.
@kailuowang , As defined in swagger docs:
Note that it is possible to use a tag in an operation even if it is not defined on the root level.
The root tags object is for adding common attributes to a tag like description. The play swagger plugin adds a tag to all routes regardless of what's in the root tag object. Here's my test for the same.
from play-swagger.
Interesting. Would you open a PR?
from play-swagger.
@kailuowang Any updates on this?
from play-swagger.
Related Issues (20)
- Request parameters not visible in Swagger ui
- Open API spec generated is incorrect
- Swagger generating type zoneddatetime in the swagger json
- Support for Optional in schemas
- Swagger Custom Mappings not working with multiples parameters HOT 1
- array[byte] transforms to array-byte .Must transform string
- Swagger-ui compatibility HOT 4
- How to request a release? HOT 2
- Which PLAY versions must be supported? HOT 2
- Please release 0.11.0 HOT 2
- Allow passing classloader to DefinitionGenerator HOT 1
- Definitions description based on Scaladoc HOT 2
- Please Release 0.13.0
- Reusable enums are not working HOT 1
- Skip routes w/ no Swagger Spec comment HOT 1
- java.util.zip.ZipException: duplicate entry: public/swagger.json HOT 1
- Support Scala 3 HOT 2
- Wildcard matching for `swaggerDomainNameSpaces` HOT 1
- [Urgent] Deployment Failures of This Repository Since April. HOT 4
- Remove Swagger Json from Public Folder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from play-swagger.