sinatra-swagger 0.2.1 → 0.2.2
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 +8 -8
- data/README.md +14 -1
- data/VERSION +1 -1
- data/lib/sinatra/swagger/param_validator.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDU1MzAwYzE1OTIwMWRhYzllOGY5Mjg0NWM3MWRiNjJkNzI0ZGI0Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjQ2MjM1NThmOTM0MDcyYTAxOTk5MGE5ZDcyYWEzYmNiZmZlNTEwYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDQwZDY4ODAxZGMxZjg5NGNlMmNlOTU4MzVkNDkzNjRmNmIzNWM3NmY5Zjdj
|
10
|
+
NDZkZGYxZTFjZjQzMWJhMGI5MDk1MzRhMGM3ZGIxODY5ZjlkZWE1YzZhM2Y1
|
11
|
+
ZDY3ZTRlMmY3ZmIxNGM5NDk1ZmMwZGRlY2JkOTA4OTZhMjcyOTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGM5ZWFmNjQxZTMyN2JlYmIzNGMxN2E1MzVmOTM3MDEyYzhmOThkNzVjY2Vj
|
14
|
+
ZWVhODU4OTJjMWZmNjMxNDQ4M2JjMDU4ODc3ZTFlNzNlMjk2ODUyZjJiM2Qz
|
15
|
+
YzkxZGVjZDg2OGE2ODQ3MjAyOTkwZjVhOTEwMjY3NWFiM2U2NWY=
|
data/README.md
CHANGED
@@ -55,7 +55,20 @@ class Search < Sinatra::Base
|
|
55
55
|
end
|
56
56
|
```
|
57
57
|
|
58
|
-
For now, if you were to request `/search/books
|
58
|
+
For now, if you were to request `/search/books?limit=p` then a `before` hook would catch the error and return a `400` with a JSON description of the issue.
|
59
|
+
|
60
|
+
```json
|
61
|
+
{
|
62
|
+
"error": "invalid_params",
|
63
|
+
"developerMessage": "Some of the given parameters were invalid according to the Swagger spec.",
|
64
|
+
"details": {
|
65
|
+
"invalidities": {
|
66
|
+
"limit": "incorrect_type",
|
67
|
+
"q": "missing"
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
```
|
59
72
|
|
60
73
|
You can override what happens when an invalidity is encountered by overriding the helper method `invalid_params` which takes a hash of invalidities in the form `param_name => issue_description_as_symbol`.
|
61
74
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-swagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Hastings-Spital
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|