rswag-specs 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rswag/specs/example_group_helpers.rb +9 -7
- 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: 23a91d85729add4a8d92afb46fc30d11118a5b4b
|
4
|
+
data.tar.gz: a0d981fd471134e0196481cb44b9785cd555cdb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a397065a774ceca26bb9b7aa4e2a4e0e3db7de7814ebc69344aa4b8861051228fdebb6405e000542da1f6cce379ca0ab36163ce44fb5a55d6afd39b691e1c769
|
7
|
+
data.tar.gz: 252085e99e03892c7e97f6bd741edeb4bea2db8066693bd20a4c58711f693bb2c5a7a2b46a367bedffd3e306c3ce0af12fc0b1089c42324d79e1d4a4caaf54bb
|
@@ -2,9 +2,9 @@ module Rswag
|
|
2
2
|
module Specs
|
3
3
|
module ExampleGroupHelpers
|
4
4
|
|
5
|
-
def path(template, &block)
|
6
|
-
|
7
|
-
describe(template,
|
5
|
+
def path(template, metadata={}, &block)
|
6
|
+
metadata[:path_item] = { template: template }
|
7
|
+
describe(template, metadata, &block)
|
8
8
|
end
|
9
9
|
|
10
10
|
[ :get, :post, :patch, :put, :delete, :head ].each do |verb|
|
@@ -36,7 +36,9 @@ module Rswag
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def parameter(attributes)
|
39
|
-
attributes[:
|
39
|
+
if attributes[:in] && attributes[:in].to_sym == :path
|
40
|
+
attributes[:required] = true
|
41
|
+
end
|
40
42
|
|
41
43
|
if metadata.has_key?(:operation)
|
42
44
|
metadata[:operation][:parameters] ||= []
|
@@ -47,9 +49,9 @@ module Rswag
|
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
50
|
-
def response(code, description, &block)
|
51
|
-
|
52
|
-
context(description,
|
52
|
+
def response(code, description, metadata={}, &block)
|
53
|
+
metadata[:response] = { code: code, description: description }
|
54
|
+
context(description, metadata, &block)
|
53
55
|
end
|
54
56
|
|
55
57
|
def schema(value)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rswag-specs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richie Morris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|