openapi_parameters 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +10 -1
- data/README.md +2 -1
- data/lib/openapi_parameters/version.rb +1 -1
- data/openapi_parameters.gemspec +4 -4
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8483c9c6b0071290af337487bdec6ae34c94904497c7dce5abb120c497eef94e
|
4
|
+
data.tar.gz: 78a862041af3c393e242185021eb52314f8d47e81c03160c41b46a2437379db7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8234ded58769039d9366d94d0482be0ea0ba1ed22385ebb8d9f42ec9c1d93e3b3d5b295bc09cc049ba75613886dc7a1e8b7b6d83af953061591bb21d4c4ae80f
|
7
|
+
data.tar.gz: 1f0cac157a4601b405199bbddce07cb6bb41f701cb69570ef8e8ecd92ad610a504c066a834f9aad9da157ede3987bd27356e59dd5ecdd29ce3ac2074d6f7ffbc
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openapi_parameters (0.2.
|
4
|
+
openapi_parameters (0.2.1)
|
5
5
|
rack (>= 2.2)
|
6
6
|
zeitwerk (~> 2.6)
|
7
7
|
|
@@ -9,6 +9,9 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
ast (2.4.2)
|
12
|
+
benchmark-malloc (0.2.0)
|
13
|
+
benchmark-perf (0.6.0)
|
14
|
+
benchmark-trend (0.4.0)
|
12
15
|
diff-lcs (1.5.0)
|
13
16
|
json (2.6.3)
|
14
17
|
parallel (1.22.1)
|
@@ -23,6 +26,11 @@ GEM
|
|
23
26
|
rspec-core (~> 3.12.0)
|
24
27
|
rspec-expectations (~> 3.12.0)
|
25
28
|
rspec-mocks (~> 3.12.0)
|
29
|
+
rspec-benchmark (0.6.0)
|
30
|
+
benchmark-malloc (~> 0.2)
|
31
|
+
benchmark-perf (~> 0.6)
|
32
|
+
benchmark-trend (~> 0.4)
|
33
|
+
rspec (>= 3.0)
|
26
34
|
rspec-core (3.12.1)
|
27
35
|
rspec-support (~> 3.12.0)
|
28
36
|
rspec-expectations (3.12.2)
|
@@ -63,6 +71,7 @@ DEPENDENCIES
|
|
63
71
|
openapi_parameters!
|
64
72
|
rake (~> 13.0)
|
65
73
|
rspec (~> 3.0)
|
74
|
+
rspec-benchmark
|
66
75
|
rubocop
|
67
76
|
rubocop-rspec
|
68
77
|
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
OpenapiParameters is an an [OpenAPI](https://www.openapis.org/) aware parameter parser.
|
4
4
|
|
5
|
-
OpenapiParameters unpacks HTTP/Rack (query / header / cookie) parameters exactly as described in an [OpenAPI](https://www.openapis.org/) definition. It supports `style`, `explode` and `schema` definitions according to OpenAPI 3.1 (or 3.0).
|
5
|
+
OpenapiParameters unpacks HTTP/Rack (query / header / cookie) parameters exactly as described in an [OpenAPI](https://www.openapis.org/) definition. It supports `style`, `explode` and `schema` definitions according to OpenAPI 3.1 (or 3.0). The gem is mainly build to be used inside of other OpenAPI tooling.
|
6
6
|
|
7
7
|
## Synopsis
|
8
8
|
|
@@ -29,6 +29,7 @@ query_parameters.unpack(query_string) # => { 'ids' => [1, 2] }
|
|
29
29
|
query_parameters.unpack(query_string, convert: false) # => { 'ids' => ['1', '2'] }
|
30
30
|
|
31
31
|
path_parameters = OpenapiParameters::Path.new(parameters)
|
32
|
+
route_params = env['route.params'] # This depends on the webframework you are using
|
32
33
|
path_parameters.unpack(route_params) # => { 'ids' => [1, 2, 3] }
|
33
34
|
|
34
35
|
header_parameters = OpenapiParameters::Header.new(parameters)
|
data/openapi_parameters.gemspec
CHANGED
@@ -8,15 +8,15 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Andreas Haller']
|
9
9
|
spec.email = ['andreas.haller@posteo.de']
|
10
10
|
|
11
|
-
spec.summary = '
|
11
|
+
spec.summary = 'openapi_parameters is an OpenAPI aware parameter parser'
|
12
12
|
spec.description =
|
13
|
-
'
|
14
|
-
spec.homepage = 'https://github.com/ahx/
|
13
|
+
'This parses HTTP query/path/header/cookie parameters exactly as described in an OpenAPI API description.'
|
14
|
+
spec.homepage = 'https://github.com/ahx/openapi_parameters'
|
15
15
|
spec.required_ruby_version = '>= 3.1.0'
|
16
16
|
spec.licenses = ['MIT']
|
17
17
|
|
18
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
19
|
-
spec.metadata['source_code_uri'] = 'https://github.com/ahx/
|
19
|
+
spec.metadata['source_code_uri'] = 'https://github.com/ahx/openapi_parameters'
|
20
20
|
spec.metadata[
|
21
21
|
'changelog_uri'
|
22
22
|
] = 'https://github.com/ahx/openapi_parameters/blob/main/CHANGELOG.md'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openapi_parameters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Haller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -38,8 +38,8 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.6'
|
41
|
-
description:
|
42
|
-
an OpenAPI API description.
|
41
|
+
description: This parses HTTP query/path/header/cookie parameters exactly as described
|
42
|
+
in an OpenAPI API description.
|
43
43
|
email:
|
44
44
|
- andreas.haller@posteo.de
|
45
45
|
executables: []
|
@@ -67,12 +67,12 @@ files:
|
|
67
67
|
- lib/openapi_parameters/version.rb
|
68
68
|
- openapi_parameters.gemspec
|
69
69
|
- sig/openapi_parameters.rbs
|
70
|
-
homepage: https://github.com/ahx/
|
70
|
+
homepage: https://github.com/ahx/openapi_parameters
|
71
71
|
licenses:
|
72
72
|
- MIT
|
73
73
|
metadata:
|
74
|
-
homepage_uri: https://github.com/ahx/
|
75
|
-
source_code_uri: https://github.com/ahx/
|
74
|
+
homepage_uri: https://github.com/ahx/openapi_parameters
|
75
|
+
source_code_uri: https://github.com/ahx/openapi_parameters
|
76
76
|
changelog_uri: https://github.com/ahx/openapi_parameters/blob/main/CHANGELOG.md
|
77
77
|
rubygems_mfa_required: 'true'
|
78
78
|
post_install_message:
|
@@ -93,5 +93,5 @@ requirements: []
|
|
93
93
|
rubygems_version: 3.4.6
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
|
-
summary:
|
96
|
+
summary: openapi_parameters is an OpenAPI aware parameter parser
|
97
97
|
test_files: []
|