0

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

MikeMarsian
  • 608
  • 1
  • 7
  • 21

2 Answers2

0

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

MikeMarsian
  • 608
  • 1
  • 7
  • 21
0

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.

Obromios
  • 15,408
  • 15
  • 72
  • 127