rspec_api_documentation icon indicating copy to clipboard operation
rspec_api_documentation copied to clipboard

Bug in OpenApi formatter with multiple examples for same HTTP action?

Open bf4 opened this issue 4 years ago • 2 comments

  • With config.format = "JSON" (and apitome) I see multiple docs for each example, e.g. Screen Shot 2021-03-22 at 12 59 54 PM

  • With config.format = "open_api" (and redoc) I see ONE doc for each example action e.g. Screen Shot 2021-03-22 at 1 00 00 PM.
    (In addition, the 'summary' and 'description' are always empty in the generated open_api.json)

I looked into the code at how route_summary and friends are used and have looked through the issues. I can't imagine I'm the first person to encounter this but I haven't found anything. We don't use a fresh context for every example which I see in the readme example, but aside from that, perhaps there's just an unreported bug in the formatter?

bf4 avatar Mar 22 '21 18:03 bf4

@bf4 it's creating multiple examples per action when there is only one spec? Or you have two specs that are both being documented? Do you have a minimal example?

jakehow avatar Mar 30 '21 01:03 jakehow

I'm using the word example to mean dsl methods example and example_request. I'll see if I can write a failing test

bf4 avatar Mar 30 '21 04:03 bf4