mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-22 22:26:41 +00:00
Ensures type safety
This commit is contained in:
parent
dc89944058
commit
6908df347a
@ -297,7 +297,7 @@ module Schemable
|
||||
#
|
||||
# @param hash [Hash] The hash with all the keys camelized.
|
||||
#
|
||||
# @return [Hash] The hash with all the keys camelized.
|
||||
# @return [Hash, Array] The hash with all the keys camelized.
|
||||
#
|
||||
# @example
|
||||
# { first_name: 'John', last_name: 'Doe' } => { firstName: 'John', lastName: 'Doe' }
|
||||
|
||||
@ -25,8 +25,8 @@ module Schemable
|
||||
def excluded_update_request_attributes: -> Array[Symbol]
|
||||
def optional_create_request_attributes: -> Array[Symbol]
|
||||
def optional_update_request_attributes: -> Array[Symbol]
|
||||
def camelize_keys: (Hash[Symbol, any]) -> (Hash[Symbol, any])
|
||||
def additional_create_request_attributes: -> Hash[Symbol, any]
|
||||
def additional_update_request_attributes: -> Hash[Symbol, any]
|
||||
def camelize_keys: (Hash[Symbol, any]) -> (Array[Hash[Symbol, any]] | Hash[Symbol, any])
|
||||
end
|
||||
end
|
||||
|
||||
@ -5,9 +5,7 @@ module Schemable
|
||||
attr_reader relationships: Hash[Symbol, any]
|
||||
|
||||
def initialize: (Definition) -> void
|
||||
|
||||
def generate: (?relationships_to_exclude_from_expansion: Array[String], ?expand: bool) -> (Hash[Symbol, any])
|
||||
def prepare_schema_for_included: (Definition, ?relationships_to_exclude_from_expansion: Array[String], ?expand: bool) -> Hash[Symbol, any]
|
||||
|
||||
def generate: (?relationships_to_exclude_from_expansion: Array[String], ?expand: bool) -> (Hash[Symbol, any] | Array[Hash[Symbol, any]])
|
||||
end
|
||||
end
|
||||
|
||||
@ -5,9 +5,7 @@ module Schemable
|
||||
attr_reader relationships: Hash[Symbol, any]
|
||||
|
||||
def initialize: (Definition) -> void
|
||||
|
||||
def generate: (?relationships_to_exclude_from_expansion: Array[String], ?expand: bool) -> (Hash[Symbol, any] | Array[Hash[Symbol, any]])
|
||||
|
||||
def generate_schema: (String, ?collection: bool) -> Hash[Symbol, any]
|
||||
def generate: (?relationships_to_exclude_from_expansion: Array[String], ?expand: bool) -> (Hash[Symbol, any])
|
||||
end
|
||||
end
|
||||
|
||||
@ -4,7 +4,7 @@ module Schemable
|
||||
attr_reader schema_modifier: SchemaModifier
|
||||
|
||||
def initialize: (Definition) -> void
|
||||
def generate_for_create: () -> (Hash[Symbol, any] | Array[Hash[Symbol, any]])
|
||||
def generate_for_update: () -> (Hash[Symbol, any] | Array[Hash[Symbol, any]])
|
||||
def generate_for_create: () -> (Hash[Symbol, any])
|
||||
def generate_for_update: () -> (Hash[Symbol, any])
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user