lacerda 0.13.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf9cdcab9b0b20b1febda478e06f431a48250ec8
4
- data.tar.gz: 12499578a02c7c5e57c6393d93312a3a21284e9d
3
+ metadata.gz: 80b98ebf42e7ed35930cb10db57a3881d5e981cd
4
+ data.tar.gz: 3928dcda4bc9ed3e7acd49859cb581f2a8d01a3d
5
5
  SHA512:
6
- metadata.gz: fbcffea2beb291540f0fe39203f1e50fabbe76ba8ec1021e98b39dd335224dfd9accf4a2457fd49403b63371a99caf945ef6d5ba86c03fda3438093ff9c4dec9
7
- data.tar.gz: f0e514af65dea7e6b16ea849ff0bfc3d1539eeb1a79fbf943142749829c01d32806fbb228adad90803c384e6737995021bb9437da60b63f274a099712aabd16c
6
+ metadata.gz: 65f3a0acecd4291f21c0304ff95053d94b0a3fbc35d072b6255681c5b7271457f73fcc2a7be0c99dd8245d1f186f4691430b60b726f1e8edc3bcb43faa71d4eb
7
+ data.tar.gz: 09067d6844600f0aee410e6f6c69f7a420e4ed47eef0c0b91cead42cd609f498e712f0792194f06e25215e82ccee56d2afcf3f2b4a014433aa38ad1010d8317e
@@ -1,3 +1,7 @@
1
+ # 0.13.1
2
+ - don't set type and oneOf in json schema, just oneOf
3
+ - update blumquist from ~> 0.3 to ~> 0.4
4
+
1
5
  # 0.13.0
2
6
  - enhance some error messages (invalid object types)
3
7
  - make non required properties nullable https://github.com/moviepilot/lacerda/pull/21
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_runtime_dependency "redsnow", ["~> 0.4.3"]
29
29
  spec.add_runtime_dependency "colorize"
30
- spec.add_runtime_dependency "blumquist", ["~> 0.3"]
30
+ spec.add_runtime_dependency "blumquist", ["~> 0.4"]
31
31
 
32
32
  # Tins 1.7.0 is ruby 2.0 only
33
33
  spec.add_runtime_dependency "tins", ["~> 1.6.0"]
@@ -7,7 +7,7 @@ module Lacerda
7
7
  :ERR_MISSING_POINTER => "A JSON pointer could not be resolved.",
8
8
  :ERR_MISSING_PROPERTY => "The published object is missing a property required by your specification.",
9
9
  :ERR_MISSING_REQUIRED => "The published object has an optional property that you marked as required in your specification.",
10
- :ERR_MISSING_TYPE_AND_REF => 'A property has to either have a "type" or a "$ref" property.',
10
+ :ERR_MISSING_TYPE_AND_REF_AND_ONE_OF => 'A property has to either have a "type", "oneOf" or "$ref" property.',
11
11
  :ERR_TYPE_MISMATCH => "The published object has a property with a different type than the consumer's specification.",
12
12
  :ERR_NOT_SUPPORTED => 'I don\'t yet know what to do when the consumer\'s specification has a "$ref" defined and the publisher\'s specification has a "type".'
13
13
  }
@@ -32,9 +32,9 @@ module Lacerda
32
32
 
33
33
  # We can only compare types and $refs, so let's make
34
34
  # sure they're there
35
- return _e(:ERR_MISSING_TYPE_AND_REF, location) unless
36
- (consume['type'] or consume['$ref']) and
37
- (publish['type'] or publish['$ref'])
35
+ return _e(:ERR_MISSING_TYPE_AND_REF_AND_ONE_OF, location) unless
36
+ (consume['type'] or consume['$ref'] or consume['oneOf']) and
37
+ (publish['type'] or publish['$ref'] or publish['oneOf'])
38
38
 
39
39
  # There's four possibilities here:
40
40
  #
@@ -111,7 +111,6 @@ module Lacerda
111
111
  types = [{'$ref' => "#/definitions/#{self.class.scope(@scope, type['literal'])}" }]
112
112
  types << { 'type' => 'null' } unless is_required
113
113
  {
114
- 'type' => 'object',
115
114
  'oneOf' => types
116
115
  }
117
116
  end
@@ -1,3 +1,3 @@
1
1
  module Lacerda
2
- VERSION = '0.13.0'
2
+ VERSION = '0.13.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lacerda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-27 00:00:00.000000000 Z
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.3'
89
+ version: '0.4'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.3'
96
+ version: '0.4'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: tins
99
99
  requirement: !ruby/object:Gem::Requirement