must have gone wild when I removed the "self."
pull/2550/head
Jan Sandbrink 10 years ago
parent 943e01c978
commit cd51dd98bc
  1. 36
      lib/api/decorators/schema.rb

@ -32,12 +32,12 @@ module API
class Schema < Single class Schema < Single
class << self class << self
def schema(property, def schema(property,
type:, type:,
title: make_title(property), title: make_title(property),
required: true, required: true,
writable: true, writable: true,
min_length: nil, min_length: nil,
max_length: nil) max_length: nil)
raise ArgumentError if property.nil? raise ArgumentError if property.nil?
schema = ::API::Decorators::PropertySchemaRepresenter.new(type: type, schema = ::API::Decorators::PropertySchemaRepresenter.new(type: type,
@ -53,11 +53,11 @@ module API
end end
def schema_with_allowed_link(property, def schema_with_allowed_link(property,
type: make_type(property), type: make_type(property),
title: make_title(property), title: make_title(property),
href_callback:, href_callback:,
required: true, required: true,
writable: true) writable: true)
raise ArgumentError if property.nil? raise ArgumentError if property.nil?
property property, property property,
@ -78,13 +78,13 @@ module API
end end
def schema_with_allowed_collection(property, def schema_with_allowed_collection(property,
type: make_type(property), type: make_type(property),
title: make_title(property), title: make_title(property),
values_callback:, values_callback:,
value_representer:, value_representer:,
link_factory:, link_factory:,
required: true, required: true,
writable: true) writable: true)
raise ArgumentError unless property raise ArgumentError unless property
property property, property property,

Loading…
Cancel
Save