module Roda::RodaPlugins::RestApi
Constants
- APPLICATION_JSON
- OPTS
- SINGLETON_ROUTES
Public Class Methods
configure(app, opts = OPTS)
click to toggle source
# File lib/roda/plugins/rest_api.rb, line 23 def self.configure(app, opts = OPTS) all_keys = Resource::OPTIONS.keys << :serialize if (opts.keys & all_keys).any? raise "For version 2.0 all options [#{Resource::OPTIONS.keys.join(' ')}] must be set at the api, version or resource level." end end
load_dependencies(app, _opts = OPTS)
click to toggle source
# File lib/roda/plugins/rest_api.rb, line 16 def self.load_dependencies(app, _opts = OPTS) app.plugin :all_verbs app.plugin :symbol_matchers app.plugin :header_matchers app.plugin :drop_body end