mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-23 06:36:40 +00:00
Removes timestamps config
This commit is contained in:
parent
6908df347a
commit
6fa863ab93
@ -49,8 +49,7 @@ The Schemable gem provides a number of configuration options that can be used to
|
|||||||
|
|
||||||
| Option Name | Description | Default Value |
|
| Option Name | Description | Default Value |
|
||||||
| ----------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- |
|
| ----------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- |
|
||||||
| `orm` | The ORM that is used in the application. The options are `:active_record` and `:mongoid`. | `:active_record` |
|
| `orm` | The ORM that is used in the application. The options are `:active_record` and `:mongoid`. | `true` |
|
||||||
| `timestamps` | Whether or not to include the `created_at` and `updated_at` attributes in the response schema. | `true` |
|
|
||||||
| `float_as_string` | Whether or not to convert the `float` type to a `string` type in the schema. | `false` |
|
| `float_as_string` | Whether or not to convert the `float` type to a `string` type in the schema. | `false` |
|
||||||
| `decimal_as_string` | Whether or not to convert the `decimal` type to a `string` type in the schema. | `false` |
|
| `decimal_as_string` | Whether or not to convert the `decimal` type to a `string` type in the schema. | `false` |
|
||||||
| `custom_type_mappers` | A hash of custom type mappers that can be used to override the default type mappers. A specific method should be used, see annex 1.0 for more information. | `{}` |
|
| `custom_type_mappers` | A hash of custom type mappers that can be used to override the default type mappers. A specific method should be used, see annex 1.0 for more information. | `{}` |
|
||||||
|
|||||||
@ -1,13 +1,12 @@
|
|||||||
module Schemable
|
module Schemable
|
||||||
# The Configuration class provides a set of configuration options for the Schemable module.
|
# The Configuration class provides a set of configuration options for the Schemable module.
|
||||||
# It includes options for setting the ORM, handling timestamps, custom type mappers, and more.
|
# It includes options for setting the ORM, handling enums, custom type mappers, and more.
|
||||||
# It is worth noting that the configuration options are global, and will affect all Definitions.
|
# It is worth noting that the configuration options are global, and will affect all Definitions.
|
||||||
#
|
#
|
||||||
# @see Schemable
|
# @see Schemable
|
||||||
class Configuration
|
class Configuration
|
||||||
attr_accessor(
|
attr_accessor(
|
||||||
:orm,
|
:orm,
|
||||||
:timestamps,
|
|
||||||
:float_as_string,
|
:float_as_string,
|
||||||
:decimal_as_string,
|
:decimal_as_string,
|
||||||
:custom_type_mappers,
|
:custom_type_mappers,
|
||||||
@ -22,7 +21,6 @@ module Schemable
|
|||||||
|
|
||||||
# Initializes a new Configuration instance with default values.
|
# Initializes a new Configuration instance with default values.
|
||||||
def initialize
|
def initialize
|
||||||
@timestamps = true
|
|
||||||
@orm = :active_record # orm options are :active_record, :mongoid
|
@orm = :active_record # orm options are :active_record, :mongoid
|
||||||
@float_as_string = false
|
@float_as_string = false
|
||||||
@custom_type_mappers = {}
|
@custom_type_mappers = {}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
module Schemable
|
module Schemable
|
||||||
class Configuration
|
class Configuration
|
||||||
attr_accessor orm: Symbol
|
attr_accessor orm: Symbol
|
||||||
attr_accessor timestamps: bool
|
|
||||||
attr_accessor float_as_string: bool
|
attr_accessor float_as_string: bool
|
||||||
attr_accessor decimal_as_string: bool
|
attr_accessor decimal_as_string: bool
|
||||||
attr_accessor disable_factory_bot: bool
|
attr_accessor disable_factory_bot: bool
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user