easy_talk 2.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6244697afea285526b5b9cd3b58d036f3dd00e99ba25703777076a2c21a8f49
4
- data.tar.gz: 6cc2cc8f918d064d0907f56f234bc8e4cfa30497292559d9690bfc0dd8377522
3
+ metadata.gz: b091eaff6c33ddcc23f0c5d0147bf28f94a7421c95a0ca47ad917af8e42fad20
4
+ data.tar.gz: 9a6c0de5afff453a566940b7b1684e2075e70b53379b2bf3b7583a46ca370c58
5
5
  SHA512:
6
- metadata.gz: 25e6c5f5eee7497bb4cddc0eb7f13beceafb551b0b7e5a2322467ec41e18ac66524ec4162307c881db65c6dc39a8e465fea8ddfcfcb6373ba07b4daf4ed68358
7
- data.tar.gz: 6d1b2f9635436aa41b8eb83c3eb40d9af9ce8f984e76d3ad36bf9f4025e26e3c774e286ca6886ad48e5fa48f38142fcf3208a9b2b2b201e936fde07d8e91283a
6
+ metadata.gz: 32a49bfa38a5279340b6699ff26d8ac415c1574f83da1488d403d422d4b49cd4aea94d5424d858c5ae2326e914c4e83995a97eb67fe4b005543e6f8984d6a60c
7
+ data.tar.gz: 02ad31d7b34aac67a4777a709ffb286487675f28e6a2c18757dd87e7a006743ab6cd0f75b817fdb6abb23d3f9ef63384fcbd5f063e1eb2d0dc8a06c7107ae0e0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,59 @@
1
+ ## [3.1.0] - 2025-12-18
2
+
3
+ ### Added
4
+ - **JSON Schema `$schema` Keyword Support**: Added ability to declare which JSON Schema draft version schemas conform to
5
+ - New `schema_version` configuration option supporting Draft-04, Draft-06, Draft-07, Draft 2019-09, and Draft 2020-12
6
+ - Global configuration via `EasyTalk.configure { |c| c.schema_version = :draft202012 }`
7
+ - Per-model override using `schema_version` keyword in `define_schema` block
8
+ - Support for custom schema URIs
9
+ - `$schema` only appears at root level (not in nested models)
10
+ - Default is `:none` for backward compatibility
11
+
12
+ - **JSON Schema `$id` Keyword Support**: Added ability to provide a unique identifier URI for schemas
13
+ - New `schema_id` configuration option for setting schema identifiers
14
+ - Global configuration via `EasyTalk.configure { |c| c.schema_id = 'https://example.com/schema.json' }`
15
+ - Per-model override using `schema_id` keyword in `define_schema` block
16
+ - Supports absolute URIs, relative URIs, and URN formats
17
+ - `$id` only appears at root level (not in nested models)
18
+ - Default is `nil` for backward compatibility
19
+
20
+ - **JSON Schema `$ref` and `$defs` Support**: Added ability to reference reusable schema definitions for nested models
21
+ - New `use_refs` configuration option to globally enable `$ref` for nested EasyTalk models
22
+ - Global configuration via `EasyTalk.configure { |c| c.use_refs = true }`
23
+ - Per-property override using `ref: true` or `ref: false` constraint
24
+ - Nested models are automatically added to `$defs` when `$ref` is enabled
25
+ - Supports direct model properties, `T::Array[Model]`, and `T.nilable(Model)` types
26
+ - Nilable models with `$ref` use `anyOf` with `$ref` and `null` type
27
+ - Multiple references to the same model only create one `$defs` entry
28
+ - Additional constraints (title, description) can be combined with `$ref`
29
+ - Default is `false` for backward compatibility (nested schemas are inlined)
30
+
31
+ ## [3.0.0] - 2025-01-03
32
+
33
+ ### BREAKING CHANGES
34
+ - **Removed ActiveRecord Support**: Completely removed ActiveRecord integration including:
35
+ - Deleted `ActiveRecordSchemaBuilder` class and database schema introspection
36
+ - Removed `enhance_schema` method for ActiveRecord models
37
+ - Removed ActiveRecord-specific configuration options (`excluded_columns`, `exclude_foreign_keys`,
38
+ `exclude_primary_key`, `exclude_timestamps`, `exclude_associations`)
39
+ - Deleted all ActiveRecord integration tests
40
+
41
+ ### Changed
42
+ - **Simplified Architecture**: EasyTalk now focuses exclusively on Plain Ruby classes with ActiveModel integration
43
+ - **Unified Integration Path**: All models now follow the same integration pattern using `ActiveModel::API` and `ActiveModel::Validations`
44
+ - **Streamlined Configuration**: Removed ActiveRecord-specific configuration options, keeping only core options
45
+ - **Updated Documentation**: Removed ActiveRecord examples and configuration references from README
46
+
47
+ ### Fixed
48
+ - **Code Quality**: Fixed ValidationBuilder class length violation by consolidating format validation methods
49
+ - **Documentation**: Updated all examples to use `define_schema` pattern instead of removed `enhance_schema`
50
+
51
+ ### Migration Guide
52
+ If you were using EasyTalk with ActiveRecord models:
53
+ - Replace `enhance_schema` calls with `define_schema` blocks
54
+ - Manually define properties instead of relying on database schema introspection
55
+ - Remove ActiveRecord-specific configuration options from your EasyTalk.configure blocks
56
+
1
57
  ## [2.0.0] - 2025-06-05
2
58
 
3
59
  ### Added