English | 日本語
OpenAPI drift check for StructuredParams.
It detects differences between OpenAPI request schemas and StructuredParams::Params
classes, so a change on one side cannot silently diverge from the other.
# Gemfile
gem 'structured_params-openapi'Bundler requires it automatically (structured_params/openapi). In a Rails application
the Rake task structured_params:openapi:drift_check is registered for you.
# config/initializers/structured_params_openapi.rb
StructuredParams::OpenAPI.configure do |config|
config.document = Rails.root.join('docs/api/openapi.yaml').to_s
config.parameter_class_filter = ->(klass) { klass.name&.start_with?('Api::') }
endbundle exec rake structured_params:openapi:drift_checkSee the guide for naming conventions, multiple OpenAPI files, ignoring findings, and the supported schema features.