Added
-
Experimental support for
readOnly
andwriteOnly
keywords. (@skryukov)# spec/rails_helper.rb RSpec.configure do |config| # To enable support for readOnly and writeOnly keywords, pass `enforce_access_modes: true` option: config.include Skooma::RSpec[Rails.root.join("docs", "openapi.yml"), enforce_access_modes: true], type: :request end
The enforce_access_modes
option enables using one schema for both request and response bodies. For example, this schema will expect exactly {name, password}
for POST/PUT request bodies and {id, name}
for responses:
components:
schemas:
User:
type: object
required: [id, name, password]
additionalProperties: false
properties:
id:
type: integer
format: int64
readOnly: true
name:
type: string
password:
type: string
writeOnly: true
- Support fallback parsers for vendor-specific media types. (@pvcarrera, @skryukov)
Full Changelog: v0.3.3...v0.3.4