Sha256: a798c839be2a7737ed2a017e04ffbb9648338aa0db1ae15b1774a7ec27e1fad0

Contents?: true

Size: 686 Bytes

Versions: 2

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

json.key_format! camelize: :lower
if mode?(:server)
  json.meta do
    render meta, json: json
  end
end
json.schemas schemas.map(&:id)
json.id id if mode?(:server)
json.external_id external_id if mode?(:client) && external_id
schemas.each do |schema|
  if schema.core?
    schema.attributes.each do |type|
      attribute = dynamic_attributes[type.name]
      render attribute, json: json
    end
  else
    json.set! schema.id do
      schema.attributes.each do |type|
        attribute = dynamic_attributes[type.fully_qualified_name] ||
                    dynamic_attributes[type.name]
        render attribute, json: json
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scim-kit-0.7.2 lib/scim/kit/v2/templates/resource.json.jbuilder
scim-kit-0.7.1 lib/scim/kit/v2/templates/resource.json.jbuilder