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

Some clarifications of the documentation #386

Open
obromios opened this issue Jul 25, 2018 · 4 comments
Open

Some clarifications of the documentation #386

obromios opened this issue Jul 25, 2018 · 4 comments

Comments

@obromios
Copy link

In the README, there is an example, however I found some aspects of this confusing:

  • Twice there is a line expect(response_body).to eq(<response>), but the angle brackets do not appear to be valid?
  • It uses the route_summary and authentication keywords, but these only seem valid for the open_api format.
  • It does not include the lines:
require 'rails_helper'
require 'rspec_api_documentation/dsl'
  • it would be clearer to put #spec/acceptance/orders_spec.rb at the top of the example to make it clear where it should sit.
  • In this example, and the examples in the examples folder, an exception is triggered by giving an incorrect id. It would be also of interest to show how to generate an exception when there is a missing parameter. I am having trouble doing this, for instance, using two different versions of let(:raw_post) (one with all the required parameters and one with a required parameter missing) does not seem to work.
  • In the section on Viewers>Gemfile, would it be clearer to mention the apitome gem as well, currently it gives the impression that the raddocs gem gives access to apitome functionality. Perhaps this would be clearer
gem 'raddocs'

or

gem 'apitome'
@obromios
Copy link
Author

Also, when I run rake doc:generate I get an error:
An error occurred while loading ./spec/acceptance/matches_api_spec.rb.

Failure/Error:
  Shoulda::Matchers.configure do |config|
    config.integrate do |with|
      with.test_framework :rspec
      with.library :rails
    end
  end

NameError:
  uninitialized constant Shoulda

whereas rails docs:generate works fine. Perhaps for rails 5.1 the instruction should be rails docs:generate?

@obromios
Copy link
Author

Sorry for all the suggestions, but I am finding the gem very useful, but I think that updating the documentation would help others to find it easier to use.

I notice that your rubygems version is almost one year out of date. It looks like there have been a number off issues fixed since then. If you do not have time to do a new release, them perhaps you can change the documentation to indicate the last solid commit e.g.

gem 'rspec_api_documentation', git: 'https://github.com/zipmark/rspec_api_documentation.git', ref: 'xyz'

Also it would be useful to have a CHANGELOG file so people can work out the last solid commit from that.

@oestrich
Copy link
Contributor

I'm not sure what's up with your Shoulda issue, my guess is your acceptance_helper.rb is off slightly and not including it?

As far as any docs are concerned, PRs are welcome! We have this wiki page https://github.com/zipmark/rspec_api_documentation/wiki/Changes along with releases on github to tag when I push a new version to rubygems.

Typically there isn't very much activity on RAD so going this long without a release is sort of normal at where its at. I should cut a new version soon since we have that large PR for openapi finally get merged. (This is also how I typically cut a new release, someone asks for it because I forget after merging things)

@obromios
Copy link
Author

obromios commented Jul 29, 2018 via email

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

No branches or pull requests

2 participants