Sha256: 03de098d1c1f20fbdb7241d4f32ee0cb8f7d1959355c96ab1f8e8094110d0c0c

Contents?: true

Size: 369 Bytes

Versions: 28

Compression:

Stored size: 369 Bytes

Contents

require_dependency "scimitar/application_controller"

module Scimitar
  class SchemasController < ApplicationController
    def index
      schemas = Scimitar::Engine.schemas
      schemas_by_id = schemas.reduce({}) do |hash, schema|
        hash[schema.id] = schema
        hash
      end

      render json: schemas_by_id[params[:name]] || schemas
    end

  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
scimitar-1.6.0 app/controllers/scimitar/schemas_controller.rb
scimitar-2.5.0 app/controllers/scimitar/schemas_controller.rb
scimitar-2.4.3 app/controllers/scimitar/schemas_controller.rb
scimitar-1.5.3 app/controllers/scimitar/schemas_controller.rb
scimitar-1.5.2 app/controllers/scimitar/schemas_controller.rb
scimitar-2.4.2 app/controllers/scimitar/schemas_controller.rb
scimitar-2.4.1 app/controllers/scimitar/schemas_controller.rb
scimitar-2.4.0 app/controllers/scimitar/schemas_controller.rb
scimitar-1.5.0 app/controllers/scimitar/schemas_controller.rb
scimitar-1.4.0 app/controllers/scimitar/schemas_controller.rb
scimitar-2.3.0 app/controllers/scimitar/schemas_controller.rb
scimitar-2.2.0 app/controllers/scimitar/schemas_controller.rb
scimitar-1.3.3 app/controllers/scimitar/schemas_controller.rb
scimitar-2.1.3 app/controllers/scimitar/schemas_controller.rb
scimitar-1.3.1 app/controllers/scimitar/schemas_controller.rb
scimitar-2.1.1 app/controllers/scimitar/schemas_controller.rb
scimitar-2.1.0 app/controllers/scimitar/schemas_controller.rb
scimitar-1.3.0 app/controllers/scimitar/schemas_controller.rb
scimitar-1.2.1 app/controllers/scimitar/schemas_controller.rb
scimitar-2.0.2 app/controllers/scimitar/schemas_controller.rb