rspec_api_documentation 资源可以有解释。那么为什么它们不显示在 raddocs html 中?

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

RspecApiDocumentation 中的资源可以有解释。但是当在 raddocs html 浏览器中使用 json 格式时,它们不会显示。

示例:

user_spec.rb:

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

index.json:

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

但是结果中没有出现解释 html:

原来我使用的是 raddocs v 1.1。 raddocs v 2.0 引入了对资源解释的支持。

我遇到了同样的问题,但原因不同。 explanation 命令仅适用于 resourceexample。如果您尝试在其他地方放置多个 explanation,则不会产生相应的输出。