structify 0.3.3 → 0.3.4
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/structify/model.rb +10 -6
- data/lib/structify/schema_serializer.rb +1 -1
- data/lib/structify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7adef1550b7b34f172ceeea0509d60cc709a211732a12a5dd48c402be9dfa9f
|
4
|
+
data.tar.gz: 56198ac66113f0f857e7a79dc13addea1e4a01efd8a62330c0067899a731a48d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9f5f3cf3d39d1d3b837ac0ed0118d7accfd2ac4d21f9b3385d9c7179fbb24771801387f545754205abb8418a6cb4a9d20141689d8d5f9f2d7669d061cc07fd2
|
7
|
+
data.tar.gz: 9b75d78dcb6a1202952ce3253690ca9e8290c7970759258290a7a13f1f1e2cf625086969b40fbc5f138f4021efa0c55dbce02544457b5571b756e46034e8d428
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [0.3.4] - 2025-03-19
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- Renamed schema `title` to `name` to align with JSON Schema standards
|
10
|
+
- Added validation for schema name to ensure it matches the pattern `^[a-zA-Z0-9_-]+$`
|
11
|
+
|
5
12
|
## [0.3.3] - 2025-03-19
|
6
13
|
|
7
14
|
### Fixed
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/structify/model.rb
CHANGED
@@ -111,11 +111,11 @@ module Structify
|
|
111
111
|
class SchemaBuilder
|
112
112
|
# @return [Class] The model class
|
113
113
|
# @return [Array<Hash>] The field definitions
|
114
|
-
# @return [String] The schema
|
114
|
+
# @return [String] The schema name
|
115
115
|
# @return [String] The schema description
|
116
116
|
# @return [Integer] The schema version
|
117
117
|
# @return [Boolean] Whether thinking mode is enabled
|
118
|
-
attr_reader :model, :fields, :
|
118
|
+
attr_reader :model, :fields, :name_str, :description_str, :version_number, :thinking_enabled
|
119
119
|
|
120
120
|
# Initialize a new SchemaBuilder
|
121
121
|
#
|
@@ -136,12 +136,16 @@ module Structify
|
|
136
136
|
@thinking_enabled = enabled
|
137
137
|
end
|
138
138
|
|
139
|
-
# Set the schema
|
139
|
+
# Set the schema name
|
140
140
|
#
|
141
|
-
# @param
|
141
|
+
# @param value [String] The name
|
142
142
|
# @return [void]
|
143
|
-
def
|
144
|
-
|
143
|
+
def name(value)
|
144
|
+
# Validate the name pattern (must match ^[a-zA-Z0-9_-]+$)
|
145
|
+
unless value =~ /^[a-zA-Z0-9_-]+$/
|
146
|
+
raise ArgumentError, "Schema name must only contain alphanumeric characters, underscores, and hyphens"
|
147
|
+
end
|
148
|
+
@name_str = value
|
145
149
|
end
|
146
150
|
|
147
151
|
# Set the schema description
|
data/lib/structify/version.rb
CHANGED