open_api_parser 1.0.0 → 1.0.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -1
- data/lib/open_api_parser/specification/endpoint.rb +2 -2
- data/lib/open_api_parser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 652ff455fdfa220aeb8a78e269e490b204f2f0ee
|
|
4
|
+
data.tar.gz: e827c8faea00b025d1f0106bd7167ecf1623efc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b7168862dec50927eab83b57701182ecd92a1e80bba3421d2990ed596844b6cbeac9b780a37dba3ae0f31d2127fc35b46b8c269c40645f1e7fd2bc4401bf0be
|
|
7
|
+
data.tar.gz: 7f7dfa9ac716b320ce74f5d0c71ac0357227f9e2698f175c0fe20e1b4130cc60cc08c9fe56f0d3f4a7fc38ac407048e28d860bdb891e56cc027bbf6fa15f2690
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# OpenApiParser
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://travis-ci.org/braintree/open_api_parser)
|
|
4
|
+
|
|
5
|
+
A gem for parsing [Open API](https://openapis.org/) specifications.
|
|
4
6
|
|
|
5
7
|
## Usage
|
|
6
8
|
|
|
@@ -20,7 +20,7 @@ module OpenApiParser
|
|
|
20
20
|
body_param = parameters.detect { |param| param["in"] == "body" }
|
|
21
21
|
return restrictive_schema if body_param.nil?
|
|
22
22
|
|
|
23
|
-
body_param
|
|
23
|
+
body_param.fetch("schema", restrictive_schema)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def header_schema
|
|
@@ -47,7 +47,7 @@ module OpenApiParser
|
|
|
47
47
|
response = response_from_status(status)
|
|
48
48
|
return restrictive_schema if response.nil?
|
|
49
49
|
|
|
50
|
-
response
|
|
50
|
+
response.fetch("schema", restrictive_schema)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def response_header_schema(status)
|