swagger-blocks 1.3.0 → 1.3.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: 9c7496406adf0203039b05240d05884c3797dbe6
4
- data.tar.gz: 04a0a51888a8984b63b0ba0e5afd1e7b1e1f69d2
3
+ metadata.gz: 87aac20d5b859685b2d9cc9ea4d754575fc5537e
4
+ data.tar.gz: db8cf213ec618f5f294c5bd3720a64277d8d1c83
5
5
  SHA512:
6
- metadata.gz: 8741eca62a459b7efa76feafd0437f4659d964013776ac719cf84d654139917ea2d64827583dd2b1236014bdf728d49b37138e081f7d7dffe59340da783d5d38
7
- data.tar.gz: aa8fa55c5e433bf6dd0aa02ab64a527639985a9409ec8e518e300db2b972b35c17134b92260375ae6bec2dc51b0e2774d70382a338793028938dc78f62f3cbb1
6
+ metadata.gz: 95be424f669c95b24a7c5ac615997ce1b7dafa65ad7c0ab00d1cf7b26a74b50115b133cf7634807efd34a4341c954caf8fafd9e639306dd4361b622b0bc67f90
7
+ data.tar.gz: 6d023103e6f7ca26f067f57406726a20795eed4fd0b92cf267aa92f4cf4bfe2d1099a65d55dbaf3f70396cd4f49aa1b48fefcfbc252c7af27e87951da78d5c1d
data/README.md CHANGED
@@ -413,6 +413,7 @@ Throw a ★ on it! :)
413
413
 
414
414
  ## Release notes
415
415
 
416
+ * v1.3.1: Bugfix allow nested objects via `property` nested in `property`.
416
417
  * v1.3.0: Added support for condensed syntax via inline keys on every block.
417
418
  * v1.2.0: Improved support for `$ref` Path Item Object parameters.
418
419
  * v1.1.3: Rename tags directive to tag for consistency.
@@ -756,6 +756,12 @@ module Swagger
756
756
  def items(inline_keys = nil, &block)
757
757
  self.data[:items] = Swagger::Blocks::ItemsNode.call(version: version, inline_keys: inline_keys, &block)
758
758
  end
759
+
760
+ def property(name, inline_keys = nil, &block)
761
+ self.data[:properties] ||= Swagger::Blocks::PropertiesNode.new
762
+ self.data[:properties].version = version
763
+ self.data[:properties].property(name, inline_keys, &block)
764
+ end
759
765
  end
760
766
  end
761
767
  end
@@ -1,5 +1,5 @@
1
1
  module Swagger
2
2
  module Blocks
3
- VERSION = '1.3.0'
3
+ VERSION = '1.3.1'
4
4
  end
5
5
  end
@@ -243,6 +243,14 @@
243
243
  },
244
244
  "name": {
245
245
  "type": "string"
246
+ },
247
+ "nestedObject": {
248
+ "type": "object",
249
+ "properties": {
250
+ "name": {
251
+ "type": "string"
252
+ }
253
+ }
246
254
  }
247
255
  }
248
256
  }
@@ -210,9 +210,15 @@ class PetV2
210
210
  key :type, :integer
211
211
  key :format, :int64
212
212
  end
213
- property :name do
214
- key :type, :string
215
- end
213
+ property :name do
214
+ key :type, :string
215
+ end
216
+ property :nestedObject do
217
+ key :type, :object
218
+ property :name do
219
+ key :type, :string
220
+ end
221
+ end
216
222
  end
217
223
  end
218
224
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger-blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Fotinakis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-29 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler