-
Notifications
You must be signed in to change notification settings - Fork 365
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
Is it possible to generate only a single API endpoint? #355
Comments
I'm experiencing the same issue. How about a Pull Request which introduces a
|
@iamvery suggested an environment variable instead of an argument since rake task arguments can be tricky across different shells. e.g.
|
(the idea comes from other uses I've seen, e.g. |
At this moment there is a possibility to use this to generate single endpoint: https://github.com/zipmark/rspec_api_documentation#append_json But unfortunately it does not work. I did everything like documented there, but got following error:
Steps to reproduce:
ENV["DOC_FORMAT"] ||= "json"
RspecApiDocumentation.configure do |config|
config.format = ENV["DOC_FORMAT"]
end
desc 'Generate API request documentation from API specs (by appending to existing)'
RSpec::Core::RakeTask.new('docs:generate:append', :spec_file) do |t, task_args|
if spec_file = task_args[:spec_file]
ENV["DOC_FORMAT"] = "append_json"
end
t.pattern = spec_file || 'spec/acceptance/**/*_spec.rb'
t.rspec_opts = ["--format RspecApiDocumentation::ApiFormatter"]
end
|
Looks like the append json format broke sometime recently. If you're interested in fixing it that'd be a great PR! I don't use append_json, so I don't know when I'll get a chance to look at this otherwise. |
here is my solution to generate Markdown file with SPEC_PATH_PATTERN
then run
it would print
and file changes
|
👋 Submitted this PR. Could anyone having problems try it and see if Thanks! |
It's a loading/inheritance issue. If you change
to
it works. Maybe ruby version differences in some |
@oestrich any chance either of making that tiny change, or that a PR would get accepted for it? Maintaining a fork or a monkey patch for three letters case change is a bit bonkers. |
Every time we change one route, we have to update all of the docs. It would be lovely to be able to update only one file (or based on one acceptance test file, etc.). My apologies in advance if the answer is obvious and I failed at finding it.
The text was updated successfully, but these errors were encountered: