module Croods::Resource::JsonSchema::Links::Destroy
Public Class Methods
link(resource)
click to toggle source
# File lib/croods/resource/json_schema/links/destroy.rb, line 9 def link(resource) { href: resource.member_path, method: 'DELETE', rel: 'self', schema: schema, targetSchema: target_schema(resource) } end
schema()
click to toggle source
# File lib/croods/resource/json_schema/links/destroy.rb, line 19 def schema { strictProperties: true, properties: {}, type: ['object'] } end
target_schema(resource)
click to toggle source
# File lib/croods/resource/json_schema/links/destroy.rb, line 27 def target_schema(resource) { anyOf: [ resource.ref, { '$ref': '#/definitions/error' } ] } end