ruby-swagger 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby-swagger/data/mime.rb +3 -1
- data/lib/ruby-swagger/grape/type.rb +5 -6
- 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: 17e016df8b39892b97f231d68684a6c1bd6545dd
|
4
|
+
data.tar.gz: a65a22a35c28f1f25a5bcc6227fc0f3d930060f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0acb37a9c4a5ab744bc928f793b05e526a3e37313e76b324fc44904f6f19452d96591d93c200c976a45c7ec2177d40a9c8fd484838384a881d00bbdefb3f1548
|
7
|
+
data.tar.gz: 3436927c4dff0917e1fcd56ffcec044a10064462c87586afc39da42b840693312bb68f5e86a4d824a78e1204c91bb9d1462637e9db316bbe146cc5e1e5891309
|
@@ -6,6 +6,7 @@ module Swagger::Data
|
|
6
6
|
'text/plain; charset=utf-8',
|
7
7
|
'application/octet-stream',
|
8
8
|
'application/json',
|
9
|
+
'application/hal+json',
|
9
10
|
'application/postscript',
|
10
11
|
'application/pdf',
|
11
12
|
'application/postscript',
|
@@ -14,6 +15,7 @@ module Swagger::Data
|
|
14
15
|
'application/zip',
|
15
16
|
'text/xml',
|
16
17
|
'text/tab-separated-values',
|
18
|
+
'application/vnd.api+json',
|
17
19
|
'application/vnd.github+json',
|
18
20
|
'application/vnd.github.v3+json',
|
19
21
|
'application/vnd.github.v3.raw+json',
|
@@ -28,4 +30,4 @@ module Swagger::Data
|
|
28
30
|
end
|
29
31
|
|
30
32
|
end
|
31
|
-
end
|
33
|
+
end
|
@@ -55,8 +55,8 @@ module Swagger::Grape
|
|
55
55
|
when 'date'
|
56
56
|
swagger_type['type'] = 'date'
|
57
57
|
when 'datetime'
|
58
|
+
swagger_type['type'] = 'string'
|
58
59
|
swagger_type['format'] = 'date-time'
|
59
|
-
swagger_type['format'] = 'string'
|
60
60
|
else
|
61
61
|
swagger_type['type'] = "object"
|
62
62
|
|
@@ -93,13 +93,12 @@ module Swagger::Grape
|
|
93
93
|
if definition[:using].present?
|
94
94
|
#it's either an object or an array of object
|
95
95
|
using = type_convert(definition[:using].to_s, true)
|
96
|
-
|
97
|
-
if
|
98
|
-
cursor['items'] = using
|
96
|
+
|
97
|
+
if definition['type'].present? && definition['type'] == 'array'
|
98
|
+
cursor['properties'][target]['items'] = using
|
99
99
|
else
|
100
100
|
cursor['properties'][target] = using
|
101
101
|
end
|
102
|
-
|
103
102
|
end
|
104
103
|
|
105
104
|
cursor['properties'][target]['description'] = definition[:documentation][:desc] if definition[:documentation].present?
|
@@ -138,4 +137,4 @@ module Swagger::Grape
|
|
138
137
|
end
|
139
138
|
|
140
139
|
end
|
141
|
-
end
|
140
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-swagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Bonmassar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|