rack-json_schema 1.0.3 → 1.0.4

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: 5e80c53d0d282d68127eb359e681eff4c2d44c66
4
- data.tar.gz: 2f7c3a9358f5bd61050d46659d78303875650122
3
+ metadata.gz: 1e0b5338585d499ad7ed74519298916787228c9a
4
+ data.tar.gz: afaa04ccab52b02cc7d46635fd382f73655920f9
5
5
  SHA512:
6
- metadata.gz: 996a3985a0b8b7f9aef82b4d061c50e482cf1ec2fb5a9cf0bc8f1855ff1dd74478eba661a09140418c4d33403ed96377f1642437c4ae77c3578a62e8eba192bf
7
- data.tar.gz: 9f719f845cbd9957cc6790beb8269092b249ab2c9fc711ee8a5235d13744c3637d6ca4e580fbdc1822b31355f6c6cb229b7d7026d97c76ec3b65734f2b117fb7
6
+ metadata.gz: 14f2c52610aed807c0949bd7250bae38944c5f7c99b34f23168f63d03af05f09273ebfdaf957281443ec5b2149495207522d81897ea07a9002df6ec9e2f5e4ec
7
+ data.tar.gz: ab7158997890e654d8007017553be3b20219d9e25bdad5c995eb9d0af9e534582fa30f97afd32e1736fe29db202f3ecd8d0fa3668b01b7a12100f3ea7f0a2772
@@ -1,3 +1,6 @@
1
+ ## 1.0.4
2
+ * Return example of array property
3
+
1
4
  ## 1.0.3
2
5
  * Remove dependency on multi_json
3
6
 
data/README.md CHANGED
@@ -80,7 +80,7 @@ $ curl http://localhost:8080/apps
80
80
  Generates dummy response from JSON schema.
81
81
 
82
82
  ```sh
83
- $ curl http://localhost:8080/apps/1
83
+ $ curl http://localhost:8080/apps
84
84
  [
85
85
  {
86
86
  "id": "01234567-89ab-cdef-0123-456789abcdef",
@@ -68,6 +68,8 @@ module Rack
68
68
  value.data["example"]
69
69
  when value.type.include?("null")
70
70
  nil
71
+ when value.type.include?("array")
72
+ [call(value.items)]
71
73
  else
72
74
  raise ExampleNotFound, "No example found for #{schema.pointer}/#{key}"
73
75
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module JsonSchema
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-json_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-10 00:00:00.000000000 Z
11
+ date: 2014-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jdoc