Method: Scimitar::Schema::Base#as_json

Defined in:
app/models/scimitar/schema/base.rb

#as_json(options = {}) ⇒ Object

Converts the schema to its json representation that will be returned by /SCHEMAS end-point of a SCIM service provider.



15
16
17
18
19
# File 'app/models/scimitar/schema/base.rb', line 15

def as_json(options = {})
  @meta.location ||= Scimitar::Engine.routes.url_helpers.scim_schemas_path(name: id)
  original = super
  original.merge('attributes' => original.delete('scim_attributes'))
end