We are using rspec_api_documentation
and managed to generate the documentation for the 2 versions we have so far with the following code:
RspecApiDocumentation.configure do |config|
config.docs_dir = Rails.root.join('doc', 'api', 'all')
config.define_group :v1 do |config|
config.filter = :v1
config.docs_dir = Rails.root.join('doc', 'api', 'v1')
config.api_name = 'API V1'
end
config.define_group :v2 do |config|
config.filter = :v2
config.docs_dir = Rails.root.join('doc', 'api', 'v2')
config.api_name = 'API V2'
end
end
We are using apitome
to render these docs, however, we haven't been able to find a way to mount the routes for the 2 versions of the API 2 so far.
Any ideas?