open_api_parser 1.0.0 → 1.0.1

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: 7ebb287c98a211acf8ad3a00f41e6d217f4f18e5
4
- data.tar.gz: 8ab60127e9539f5a2d62294c4a48e577713c8657
3
+ metadata.gz: 652ff455fdfa220aeb8a78e269e490b204f2f0ee
4
+ data.tar.gz: e827c8faea00b025d1f0106bd7167ecf1623efc8
5
5
  SHA512:
6
- metadata.gz: 6b3bebdfc00a16569e432169aa403bf01cba7ef86cac9a23a2670be109116612e7041225b9f891efb96b4c5495fc7a042138587a1896c1cc1297194b30fb7503
7
- data.tar.gz: ea03826b7a5996f341e7958ed203390979c87ce2349056cd00f0479f9bff147353797226c85dbdae3449685cdc8f4dc65fe8040ef32c0dd533d86919b7e34be3
6
+ metadata.gz: 5b7168862dec50927eab83b57701182ecd92a1e80bba3421d2990ed596844b6cbeac9b780a37dba3ae0f31d2127fc35b46b8c269c40645f1e7fd2bc4401bf0be
7
+ data.tar.gz: 7f7dfa9ac716b320ce74f5d0c71ac0357227f9e2698f175c0fe20e1b4130cc60cc08c9fe56f0d3f4a7fc38ac407048e28d860bdb891e56cc027bbf6fa15f2690
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1
4
+
5
+ * Correctly handle known responses with empty schemas
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  * Initial release
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # OpenApiParser
2
2
 
3
- A gem for parsing Open API specifications.
3
+ [![Build Status](https://travis-ci.org/braintree/open_api_parser.svg?branch=master)](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["schema"]
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["schema"]
50
+ response.fetch("schema", restrictive_schema)
51
51
  end
52
52
 
53
53
  def response_header_schema(status)
@@ -1,3 +1,3 @@
1
1
  module OpenApiParser
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_api_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braintree