livingsocial / swagger_yard

Swagger-UI compliant JSON generated from YARD. For RESTful Rails apps.
MIT License
51 stars 28 forks source link

Group tags by name #65

Open erictuvesson opened 4 years ago

erictuvesson commented 4 years ago

In my case I have the same resource as both controllers work around the same object, just makes it easier to split it out a bit.

# @resource MyResource
class MyController1 < ActionController::Base
end

# @resource MyResource
class MyController2 < ActionController::Base
end

This will generate 2 tags in the swagger output.

"tags": [
  {
    "name": "MyResource",
    "description": ""
  },
  {
    "name": "MyResource",
    "description": ""
  }
],

When parsing the swagger file I get this warning.

Semantic error at tags.2
Tag Objects must have unique `name` field values

This is not major as it still works with most parsers.