mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Adds support for proper requestBody examples. Adds mechanism to allow for adding additional ways to add request body examples
Can add externalValue or it will work and produce valid swagger spec. The Symbol name matching the let parameter is always required
This commit is contained in:
@@ -69,6 +69,16 @@ RSpec.configure do |config|
|
||||
required: %w[id headline]
|
||||
}
|
||||
},
|
||||
examples: {
|
||||
flexible_blog_example: {
|
||||
summary: 'Sample example of a flexible blog',
|
||||
value: {
|
||||
id: 1,
|
||||
headline: 'This is a headline',
|
||||
text: 'Some sample text'
|
||||
}
|
||||
}
|
||||
},
|
||||
securitySchemes: {
|
||||
basic_auth: {
|
||||
type: :http,
|
||||
|
||||
Reference in New Issue
Block a user