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 +4 -4
- data/README.md +1 -0
- data/lib/swagger/blocks.rb +6 -0
- data/lib/swagger/blocks/version.rb +1 -1
- data/spec/lib/swagger_v2_api_declaration.json +8 -0
- data/spec/lib/swagger_v2_blocks_spec.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87aac20d5b859685b2d9cc9ea4d754575fc5537e
|
4
|
+
data.tar.gz: db8cf213ec618f5f294c5bd3720a64277d8d1c83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/swagger/blocks.rb
CHANGED
@@ -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
|
@@ -210,9 +210,15 @@ class PetV2
|
|
210
210
|
key :type, :integer
|
211
211
|
key :format, :int64
|
212
212
|
end
|
213
|
-
|
214
|
-
|
215
|
-
|
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.
|
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-
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|