mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-22 22:26:41 +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 |
|
||||
| ----------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------- |
|
||||
| `orm` | The ORM that is used in the application. The options are `:active_record` and `:mongoid`. | `:active_record` |
|
||||
| `timestamps` | Whether or not to include the `created_at` and `updated_at` attributes in the response schema. | `true` |
|
||||
| `orm` | The ORM that is used in the application. The options are `:active_record` and `:mongoid`. | `true` |
|
||||
| `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` |
|
||||
| `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
|
||||
# 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.
|
||||
#
|
||||
# @see Schemable
|
||||
class Configuration
|
||||
attr_accessor(
|
||||
:orm,
|
||||
:timestamps,
|
||||
:float_as_string,
|
||||
:decimal_as_string,
|
||||
:custom_type_mappers,
|
||||
@ -22,7 +21,6 @@ module Schemable
|
||||
|
||||
# Initializes a new Configuration instance with default values.
|
||||
def initialize
|
||||
@timestamps = true
|
||||
@orm = :active_record # orm options are :active_record, :mongoid
|
||||
@float_as_string = false
|
||||
@custom_type_mappers = {}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
module Schemable
|
||||
class Configuration
|
||||
attr_accessor orm: Symbol
|
||||
attr_accessor timestamps: bool
|
||||
attr_accessor float_as_string: bool
|
||||
attr_accessor decimal_as_string: bool
|
||||
attr_accessor disable_factory_bot: bool
|
||||
|
||||
Loading…
Reference in New Issue
Block a user