You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,9 @@
3
3
## 2.2.0
4
4
5
5
- Add ability to define multiple versions using one block.
6
+
- Add `index` attribute type that automatically generates a link list compatible with media_types-serialization.
7
+
- Add support for `collection` to automatically look up a previously defined schema when passing a view.
6
8
- Add ability to mark certain attributes as optional when validating with `loose: true` and required otherwise.
7
-
- Add ability to define multiple versions using one block
8
9
9
10
## 2.1.1
10
11
@@ -23,25 +24,25 @@
23
24
24
25
## 2.0.0
25
26
26
-
-Removed ability to set default suffix. All suffixes now default to `+json`.
27
+
-Remove ability to set default suffix. All suffixes now default to `+json`.
27
28
- Suffixes are now set for a given view and version instead of as a block.
28
-
-Added`suffix :yoursuffix` command to override the default `:json` suffix.
29
-
-Removed defaults block.
30
-
-Removed registrations block.
29
+
-Add`suffix :yoursuffix` command to override the default `:json` suffix.
30
+
-Remove defaults block.
31
+
-Remove registrations block.
31
32
32
33
## 1.0.0
33
34
34
-
-Added the ability to do inline tests when defining validations using `assert_pass '<json>'` and `assert_fail '<json>'`.
35
+
-Add the ability to do inline tests when defining validations using `assert_pass '<json>'` and `assert_fail '<json>'`.
35
36
-`media_type` has been replaced with `use_name`.
36
37
- It is no longer possible to set a default version. Please use `version <x> do` instead.
37
38
- You no longer need to specify a custom format string. If you set an organisation with `def self.organisation` or set a module wide organisation with `MediaTypes::set_organisation <module>, '<organisation>'` the library will generate identifiers for you.
38
39
-`self.base_format` has been replaced by `identifier_format do |type:, view:, version:, suffix:|`.
39
-
-Added the `empty` validation to mark an empty object as valid.
40
-
-Added the `identifier` function to get the [Media Type Identifier](https://en.wikipedia.org/wiki/Media_type) for the validator.
41
-
-Added`version(x)` and `view(x)` functions.
42
-
-Added an `available_validations` functions that returns all defined validations.
43
-
-Fixed an issue where validations could accidentally merge if defined with a bad `base_format`.
44
-
-Fixed an issue where undefined validations would accept an empty object.
40
+
-Add the `empty` validation to mark an empty object as valid.
41
+
-Add the `identifier` function to get the [Media Type Identifier](https://en.wikipedia.org/wiki/Media_type) for the validator.
42
+
-Add`version(x)` and `view(x)` functions.
43
+
-Add an `available_validations` functions that returns all defined validations.
44
+
-Fix an issue where validations could accidentally merge if defined with a bad `base_format`.
45
+
-Fix an issue where undefined validations would accept an empty object.
raiseConflictingTypeDefinitionError,'You cannot apply a block to a non-hash typed collection, either remove the type or the block'ifscheme != ::Hash && block_given? && !scheme.nil?
0 commit comments