Sha256: 5379ee8a5ae53dedffcc0230ec7c36ce9ebbc7da423e47e0a7c1d35f60975b1a
Contents?: true
Size: 477 Bytes
Versions: 12
Compression:
Stored size: 477 Bytes
Contents
require_dependency "scimitar/application_controller" module Scimitar class SchemasController < ApplicationController def index schemas = Scimitar::Engine.schemas schemas.each do |schema| schema.meta.location = scim_schemas_url(name: schema.id) end 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
12 entries across 12 versions & 2 rubygems