mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Fixes response_validator to handle 3.0 responses and validate against the schema.
JSON::Validator already handles anyOf oneOf schema definitions, so those can be passed in and validation errors are returned properly
This commit is contained in:
@@ -54,9 +54,9 @@ RSpec.configure do |config|
|
||||
id: { type: 'integer' },
|
||||
title: { type: 'string' },
|
||||
content: { type: 'string', nullable: true },
|
||||
thumbnail: { type: 'string' }
|
||||
thumbnail: { type: 'string', nullable: true }
|
||||
},
|
||||
required: %w[id title content thumbnail]
|
||||
required: %w[id title]
|
||||
},
|
||||
flexible_blog: {
|
||||
type: 'object',
|
||||
@@ -64,9 +64,9 @@ RSpec.configure do |config|
|
||||
id: { type: 'integer' },
|
||||
headline: { type: 'string' },
|
||||
text: { type: 'string', nullable: true },
|
||||
thumbnail: { type: 'string' }
|
||||
thumbnail: { type: 'string', nullable:true }
|
||||
},
|
||||
required: %w[id headline thumbnail]
|
||||
required: %w[id headline]
|
||||
}
|
||||
},
|
||||
securitySchemes: {
|
||||
|
||||
Reference in New Issue
Block a user