API Versioning (ARCH6202)
هذا المحتوى غير متوفر بلغتك بعد.
Key ruby.quality.api-versioning · Severity info · Category quality
Unversioned public API routes make it impossible to ship backward-incompatible changes without breaking clients; the version should be explicit in the path.
Incorrect
Section titled “Incorrect”Rails.application.routes.draw do resources :orders resources :usersendCorrect
Section titled “Correct”Rails.application.routes.draw do namespace :v1 do resources :orders resources :users endendGroup routes under an explicit version namespace (e.g. /v1) so future breaking changes can run side by side.