Skip to content

Documenting API at namespace root #189

Closed
@Beans0063

Description

@Beans0063

APIs assigned to the root of a namespace seem to be missing from the generated swagger_doc. For example, the api accessible at http://localhost:3000/v1/mailer_templates is missing when I view http://localhost:3000/swagger_doc/mailer_templates:

version 'v1', using: :path
resource :mailer_templates do
 desc "Return list of mailer templates"
 get do
  MailerTemplate.limit(20)
 end
end

Adding a url to route seems to fix this:

get :list do
  MailerTemplate.limit(20)
end

The regex here seems to be excluding the root url. Is this by design, if so how can route of '/' be included in swagger_docs?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions