Adds infer_expand_nested_from_expand global configuration option

This commit is contained in:
Muhammad Nawzad 2024-01-30 16:29:38 +03:00
parent 49992ff75b
commit f90a997e30
No known key found for this signature in database
GPG Key ID: B954B6AAE33940B2
2 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,7 @@ module Schemable
:enum_prefix_for_simple_enum,
:enum_suffix_for_simple_enum,
:custom_meta_response_schema,
:infer_expand_nested_from_expand,
:infer_attributes_from_custom_method,
:infer_attributes_from_jsonapi_serializable
)
@ -32,6 +33,7 @@ module Schemable
@custom_meta_response_schema = nil
@enum_prefix_for_simple_enum = nil
@enum_suffix_for_simple_enum = nil
@infer_expand_nested_from_expand = false
@infer_attributes_from_custom_method = nil
@infer_attributes_from_jsonapi_serializable = false
end

View File

@ -8,6 +8,7 @@ module Schemable
attr_accessor custom_defined_enum_method: Symbol?
attr_accessor enum_prefix_for_simple_enum: String?
attr_accessor enum_suffix_for_simple_enum: String?
attr_accessor infer_expand_nested_from_expand: bool
attr_accessor custom_type_mappers: Hash[Symbol, any]
attr_accessor infer_attributes_from_custom_method: Symbol?
attr_accessor custom_meta_response_schema: Hash[Symbol, any]?