Skip to content

Adding version to path only possible via configuration key 'version'? #403

Closed
@cank

Description

@cank

This is for grape-swagger (0.20.2).

Not sure if this is a bug or an undocumented configuration option, but I am unable to get the version to correctly appear in the JSON file under 'paths' unless I do the following:

add_swagger_documentation(
  version: 'v1',
  add_version: true,
)

This will produce:

"paths": {
  "/api/v1/experiments": {
  }
}

The configuration instructions in README.md lists api_version as a configuration option, but not version. This is clearly the intended behavior as shown here:

if options[:version] && options[:add_version]

and in tests here:

https://github.com/ruby-grape/grape-swagger/blob/master/spec/lib/path_string_spec.rb

Should the documentation be updated to reflect this?

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