Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for grape version cascading #146

Closed
wyattisimo opened this issue Aug 29, 2014 · 8 comments
Closed

Support for grape version cascading #146

wyattisimo opened this issue Aug 29, 2014 · 8 comments

Comments

@wyattisimo
Copy link

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.

@wyattisimo
Copy link
Author

Some relevant/related issues... #28, #38, #141, #130

@florrain
Copy link

👍

@skwp
Copy link

skwp commented Apr 29, 2015

Has anyone come up with a good solution for mounting multiple api versions on one swagger doc endpoint?

@brodock
Copy link

brodock commented May 26, 2015

👍

2 similar comments
@johnnygoodman
Copy link

+1

@przbadu
Copy link

przbadu commented Mar 3, 2016

👍

@LeFnord
Copy link
Member

LeFnord commented Jan 13, 2017

solved in actual versions

@LeFnord LeFnord closed this as completed Jan 13, 2017
@al
Copy link

al commented May 23, 2020

...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.

solved in actual versions

Can anyone confirm that this is actually solved? (And if it is, maybe point to an example.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants