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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef334fe7ee42e62490cabedbb2d5172c710299e736db3154450d23db23dc4247
4
- data.tar.gz: faa2d9c99a2a4f59ebe38b2ff797bcaae165277cc606075168e8cf3191a3722e
3
+ metadata.gz: 8483c9c6b0071290af337487bdec6ae34c94904497c7dce5abb120c497eef94e
4
+ data.tar.gz: 78a862041af3c393e242185021eb52314f8d47e81c03160c41b46a2437379db7
5
5
  SHA512:
6
- metadata.gz: 6bfe90c227761100d238dec3c51d7f680ce20d39a834b149cdf1426163685e99209b0a4f5b131ff58a9362419d50f5fec966b86747d176609de524d94e17421d
7
- data.tar.gz: ec587259898ef7c0004b97a0ab849fb97624de1dd464159dcbd5eeff549e2877465195d94b67cba3fbc5a2f6f245fb0a5863198048a9ba6c04a09324bb1b420e
6
+ metadata.gz: 8234ded58769039d9366d94d0482be0ea0ba1ed22385ebb8d9f42ec9c1d93e3b3d5b295bc09cc049ba75613886dc7a1e8b7b6d83af953061591bb21d4c4ae80f
7
+ data.tar.gz: 1f0cac157a4601b405199bbddce07cb6bb41f701cb69570ef8e8ecd92ad610a504c066a834f9aad9da157ede3987bd27356e59dd5ecdd29ce3ac2074d6f7ffbc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2023-03-31
4
+
5
+ - Fix links in gemspec
6
+
3
7
  ## [0.2.0] - 2023-03-30
4
8
 
5
9
  - Breaking: Path parameters are unpacked from a hash, which is usually available from the used Rack web framework. This is much simpler and more performant.
data/Gemfile CHANGED
@@ -8,5 +8,6 @@ gemspec
8
8
  gem 'rake', '~> 13.0'
9
9
 
10
10
  gem 'rspec', '~> 3.0'
11
+ gem 'rspec-benchmark'
11
12
  gem 'rubocop'
12
13
  gem 'rubocop-rspec'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openapi_parameters (0.2.0)
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenapiParameters
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
@@ -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 = 'OpenapiParameters is an OpenAPI aware parameter parser'
11
+ spec.summary = 'openapi_parameters is an OpenAPI aware parameter parser'
12
12
  spec.description =
13
- 'OpenapiParameters parses HTTP query parameters exactly as described in an OpenAPI API description.'
14
- spec.homepage = 'https://github.com/ahx/OpenapiParameters'
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/OpenapiParameters'
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.0
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-30 00:00:00.000000000 Z
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: OpenapiParameters parses HTTP query parameters exactly as described in
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/OpenapiParameters
70
+ homepage: https://github.com/ahx/openapi_parameters
71
71
  licenses:
72
72
  - MIT
73
73
  metadata:
74
- homepage_uri: https://github.com/ahx/OpenapiParameters
75
- source_code_uri: https://github.com/ahx/OpenapiParameters
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: OpenapiParameters is an OpenAPI aware parameter parser
96
+ summary: openapi_parameters is an OpenAPI aware parameter parser
97
97
  test_files: []