active_model_serializers_validator 0.1.2 → 0.1.3

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.
data/README.md CHANGED
@@ -19,17 +19,19 @@ class MySerializer < ActiveModel::Serializer
19
19
  json_schema '/path/to/my/schema.jsonschema'
20
20
 
21
21
  attribute :foo
22
- attribute :bar
23
22
  end
24
23
 
25
24
  serializer = MySerializer.new(OpenStruct.new(foo: 'bla'))
25
+
26
26
  serializer.valid?
27
27
  # => false
28
+
29
+ serializer.errors
30
+ # => [The property '#/foo' of type String did not match the following type: integer in schema /path/to/my/schema.jsonschema]
28
31
  ```
29
32
 
30
33
  ## Todo
31
34
 
32
- * Provide more details as to why the validation failed.
33
35
  * Add more features! :smile:
34
36
 
35
37
  ## License
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.description = 'An extension to ActiveModel::Serializer that validates serializers output against a JSON schema'
12
12
  spec.summary = 'An extension to ActiveModel::Serializer that validates serializers output against a JSON schema'
13
13
  spec.homepage = 'https://github.com/mirego/active_model_serializers_validator'
14
- spec.license = 'MIT'
14
+ spec.license = 'New BSD'
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -1,7 +1,7 @@
1
1
  module ActiveModel
2
2
  class Serializer
3
3
  module Validator
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_model_serializers_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-27 00:00:00.000000000 Z
12
+ date: 2013-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -148,7 +148,7 @@ files:
148
148
  - spec/validator_spec.rb
149
149
  homepage: https://github.com/mirego/active_model_serializers_validator
150
150
  licenses:
151
- - MIT
151
+ - New BSD
152
152
  post_install_message:
153
153
  rdoc_options: []
154
154
  require_paths:
@@ -161,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  segments:
163
163
  - 0
164
- hash: -3953196887841094679
164
+ hash: 199562626635737587
165
165
  required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements:
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  version: '0'
171
171
  segments:
172
172
  - 0
173
- hash: -3953196887841094679
173
+ hash: 199562626635737587
174
174
  requirements: []
175
175
  rubyforge_project:
176
176
  rubygems_version: 1.8.23