main
1# frozen_string_literal: true
2
3module Scim
4 module V2
5 class SchemasController < ::Scim::Controller
6 skip_before_action :authenticate!
7
8 def index
9 render json: schemas.values.to_json
10 end
11
12 def show
13 current_schema = schemas[params[:id]]
14 raise ActiveRecord::RecordNotFound unless current_schema
15
16 render json: current_schema.to_json
17 end
18
19 private
20
21 def schemas
22 Scim::Kit::V2.configuration.schemas
23 end
24 end
25 end
26end