Skip to content

Support for grape version cascading #146

Closed
@wyattisimo

Description

@wyattisimo

If I mount my v1 endpoints like so:

module API::V1
  class Root < Grape::API
    version ['v2', 'v1'], using: :path

    mount API::V1::Places
    mount API::V1::Users

    add_swagger_documentation api_version: 'v1', mount_path: '/docs'
  end
end

...and mount my v2 endpoints like so:

module API::V2
  class Root < Grape::API
    version 'v2', using: :path, cascade: true

    mount API::V2::Users

    add_swagger_documentation api_version: 'v2', mount_path: '/docs'
  end
end

...then grape-swagger should understand the version cascading and include the API::V1::Places endpoints in the v2 docs. Currently, grape-swagger only reads the endpoints that are explicitly mounted in the module in which it is defined.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions