rspec-openapi
rspec-openapi copied to clipboard
Generate multiple examples
I tried to do the generation of a few examples as described here. I would like to get a review of my approach before I continue working on this feature.
The very design of this feature is also questionable, perhaps it makes sense to use the feature in roughly this way for simpler cases:
describe '#index', openapi: { enable_examples: true } do
context 'when foo', openapi: { example_name: :foo }
context 'when bar', openapi: { example_name: :bar }
end
In other cases I am concerned about the definition of unique examples, do I need to remove non-unique examples, or should I keep all examples? Maybe both options are needed for flexibility 🤔