rspec_api_documentation resources can have explanations. So why they don't show in raddocs html?

88 Views Asked by At

Resources in RspecApiDocumentation can have explanations. But they don't show when using json format with raddocs html browser.

Example:

user_spec.rb:

resource 'User' do
  explanation "a User resource, duh"
...

index.json:

{
      "name": "User",
      "explanation": "a User resource, duh"
      ...
}

But the explanation doesn't appear in the resulting html: enter image description here

2

There are 2 best solutions below

0
On BEST ANSWER

Turns out I was using raddocs v 1.1. The support for resource explanation is introduced in raddocs v 2.0.

1
On

I had the same problem, but the cause was different. The explanation command only works in a resource or an example. If you attempt to put multiple explanation at other places, then no corresponding output is produced.