api_schema 0.1.9 → 0.1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_schema/resource_definition.rb +6 -0
- data/lib/api_schema/version.rb +1 -1
- 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: 175bb9264dcf923158ad05b31808e0699700cb7b
|
4
|
+
data.tar.gz: 5b5b6d436295f1addfcdb2186fc2341a5b5d14ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f33a130676995f9d8d81d0c3c2cb1ac5bdd37155dbbdb5d5b1f18b9a7cbc64b8f6c4659334c667a310a1028904a3a6b115748fad7a52f732b48becbba211724b
|
7
|
+
data.tar.gz: 49d29e82afd8cd701acdc12d9cae5917197999c7e8f3b04402055f19c3634435e5c3e3546c7ba35a1ebaff3ec55fe1b6282fb202308ebc8a7f0f80fee97b6e16
|
@@ -10,6 +10,7 @@ module ApiSchema
|
|
10
10
|
@header_params = []
|
11
11
|
@path_params = []
|
12
12
|
@query_params = []
|
13
|
+
@errors = []
|
13
14
|
end
|
14
15
|
|
15
16
|
HeaderParam = ::Struct.new(:name, :type, :required)
|
@@ -67,6 +68,11 @@ module ApiSchema
|
|
67
68
|
!!body_param
|
68
69
|
end
|
69
70
|
|
71
|
+
def body_defined?
|
72
|
+
return true if api_version.serializers.detect {|s| s.id == body_param }
|
73
|
+
raise "There is no '#{body_param}' body parameter defined for #{full_path} resource. Please define it with 'request_body' method"
|
74
|
+
end
|
75
|
+
|
70
76
|
def with_errors?
|
71
77
|
!errors.empty?
|
72
78
|
end
|
data/lib/api_schema/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.9
|
4
|
+
version: 0.1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Chopey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|