JsonSchemaRails::Engine.routes.draw do
  resources :schemas, only: :show, path: '', id: /[\/a-zA-Z0-9_-]+/, defaults: { format: 'json' }
end

JsonSchemaRails::Engine.routes.draw do
  get '*id(.:format)', to: 'schemas#show', as: :schema, id: /[\/a-zA-Z0-9_-]+/, defaults: { format: 'json' }
end

Fix route to get schema for Rails 4.1.2
Fix route to get schema for Rails 4.1.2

Due to changes in Rails 4.1.2, slashes in a path generated by
json_schema_rails url helper were escaped to '%2F', which is not
comfortable for nested schema names.

To avoid the escaping, we need to use wildcard segments ('*foo') to
express a parameter of schema name. So stopped using "resources" routing
and uses "get" with "as" parameter for url helpers.
