ruby-swagger 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e4ac438167f5b6401c7c05f95d8e5649be30d22
4
- data.tar.gz: 1b62b58a496e0f9b1d5a4aaaa34e6c8b0f671f8f
3
+ metadata.gz: 17e016df8b39892b97f231d68684a6c1bd6545dd
4
+ data.tar.gz: a65a22a35c28f1f25a5bcc6227fc0f3d930060f4
5
5
  SHA512:
6
- metadata.gz: 73ec4b5357e64a3b16ccc7a1a84c3333ca52bc97045e3a7c9e72c92b2a4d82f8796a7a52e00403efe9545ac76bba06979d62ae96a54f97e853c9a6d3b0092def
7
- data.tar.gz: a5f03988bb34dcbdb044174a2029c563407069cc4b1cbd27b4f8708974b0a2ba0993e7df38a1d8cc6e46bbd8b05648c5eb4533d47f5139cb9bfafd7b563fd683
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 cursor['type'].present? && cursor['type'] == 'array'
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.2
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-08-06 00:00:00.000000000 Z
11
+ date: 2015-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable