openapi_first 1.3.0 → 1.3.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7e9e0bad95211ba2b4f103089abc40d0e7fc46a24f7ce8e57318ba489655637
|
4
|
+
data.tar.gz: f1d28fbaa79a4eb7e00b242eb9bd89a78789bbb04742e0b87501ac454fb1cf47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f225e3a49d7f582e0f82822b2c9acbcd6008b6cc2464971e1485ef75ec12e508effc2165b6afc91535e27bc9bb9004f92fb160218f7295b0f45c3f58946ed616
|
7
|
+
data.tar.gz: 4c6ef209df4816361bed148f33b4e55ace50a5481172913c5760d014b09247adf74ffdbd2422ae930cd889494fe941c20d492835863d52a9dde67a75c1bd8622
|
@@ -17,9 +17,6 @@ module OpenapiFirst
|
|
17
17
|
def_delegators :operation_object,
|
18
18
|
:[]
|
19
19
|
|
20
|
-
WRITE_METHODS = Set.new(%w[post put patch delete]).freeze
|
21
|
-
private_constant :WRITE_METHODS
|
22
|
-
|
23
20
|
def initialize(path, request_method, path_item_object, openapi_version:)
|
24
21
|
@path = path
|
25
22
|
@method = request_method
|
@@ -56,6 +53,7 @@ module OpenapiFirst
|
|
56
53
|
# Checks if the operation is a write operation.
|
57
54
|
# This is the case for POST, PUT, PATCH and DELETE request methods.
|
58
55
|
# @return [Boolean] `true` if the operation is a write operation, `false` otherwise.
|
56
|
+
# @deprecated Use {#write?} instead.
|
59
57
|
def write?
|
60
58
|
WRITE_METHODS.include?(method)
|
61
59
|
end
|
@@ -158,8 +156,10 @@ module OpenapiFirst
|
|
158
156
|
private
|
159
157
|
|
160
158
|
WRITE_METHODS = Set.new(%w[post put patch delete]).freeze
|
159
|
+
private_constant :WRITE_METHODS
|
161
160
|
|
162
161
|
IGNORED_HEADERS = Set['Content-Type', 'Accept', 'Authorization'].freeze
|
162
|
+
private_constant :IGNORED_HEADERS
|
163
163
|
|
164
164
|
def all_parameters
|
165
165
|
@all_parameters ||= (@path_item_object.fetch('parameters', []) + operation_object.fetch('parameters', []))
|
@@ -37,7 +37,7 @@ module OpenapiFirst
|
|
37
37
|
schema_object = media_type['schema']
|
38
38
|
next unless schema_object
|
39
39
|
|
40
|
-
result[type] = Schema.new(schema_object, write:
|
40
|
+
result[type] = Schema.new(schema_object, write: true,
|
41
41
|
openapi_version: @operation.openapi_version)
|
42
42
|
end
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openapi_first
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Haller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_refs
|