Skip to content

Configuring swagger for multiple API versions #316

@kriskohlstedt

Description

@kriskohlstedt

Has anyone found a solution for getting grape-swagger to support multiple versions at the same time. For example I have a structure like

/lib/api/root.rb
lib/api/v1/root.rb
lib/api/v2/root.rb
lib/api/v4/root.rb
etc...

If I put the 'add_documentation api_version: "v1"' in any of the root.rb files, swagger does pick up all APIs underneath and mark them as v1 but obviously I'd want those under v2 and v3 to be marked appropriately.

I am able to for example put 'add_documentation api_version: "v2"' in the v2 root.rb but then I only get docs for v2. If I 'add_documentation api_version: '' in all of the root.rb files only 1 gets picked up.

So, is there any way to publish all versions via swagger? Thanks in advance!

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