request_handler 2.1.0 → 2.1.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 +6 -0
- data/README.md +4 -2
- data/lib/request_handler/fieldsets_parser.rb +3 -3
- data/lib/request_handler/filter_parser.rb +1 -1
- data/lib/request_handler/include_option_parser.rb +1 -1
- data/lib/request_handler/page_parser.rb +1 -1
- data/lib/request_handler/query_parser.rb +1 -1
- data/lib/request_handler/sort_option_parser.rb +1 -1
- data/lib/request_handler/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f859646a0aa398cdae621ee5fa65dfc141041f2d7459130e43c6dd187f33cd34
|
4
|
+
data.tar.gz: 58ac3fcdfdace2cef4810ff885cf9f43b98902c37a84aea56489359df14741ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 246011e015199ccabf514606819ee30ff53784e658f756fb891c3dba75b8af20a962910c4251401a9b770f194c06a089c15f2f10e1eadd78061128bba8c49872
|
7
|
+
data.tar.gz: ab07fa30b9095bcc7dbc41cd5fe948e80fa84d55252fb9b02b6a8ea656324f4c597d7e469b6d70b976b66a08f013f66feb71fbe141208deb71bc82a491292502
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [2.1.1] - 2021-06-14
|
10
|
+
### Fixed
|
11
|
+
- Change error object's source attribute from `param` to `parameters` to align with JSONAPI specification
|
12
|
+
|
7
13
|
## [2.1.0] - 2020-04-01
|
8
14
|
### Added
|
9
15
|
- Headers validation
|
data/README.md
CHANGED
@@ -82,7 +82,7 @@ the abstract class `RequestHandler::Validation::Engine`
|
|
82
82
|
To set up a handler, you need create a class which inherits from
|
83
83
|
`RequestHandler::Base`, providing at least the options block and a `to_dto`
|
84
84
|
method with the parts you want to use. To use it, create a new instance of the
|
85
|
-
handler passing in the request, after that you can use the handler.
|
85
|
+
handler passing in the request, after that you can use the handler.to_dto method to
|
86
86
|
process and access the data. Here is a short example, check
|
87
87
|
`spec/integration/request_handler_spec.rb` for a detailed one.
|
88
88
|
|
@@ -249,7 +249,7 @@ class CreateQuestionHandler < RequestHandler::Base
|
|
249
249
|
end
|
250
250
|
```
|
251
251
|
|
252
|
-
Assuming that the request consists of a json file `question.json` containing
|
252
|
+
Assuming that the request consists of a json file `question.json` containing
|
253
253
|
``` json
|
254
254
|
{
|
255
255
|
"id": "1",
|
@@ -472,6 +472,8 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/runtas
|
|
472
472
|
This project is intended to be a safe, welcoming space for collaboration, and
|
473
473
|
contributors are expected to adhere to the [code of conduct][cc].
|
474
474
|
|
475
|
+
Check out our [career page](https://www.runtastic.com/career/) if you'd like to work with us.
|
476
|
+
|
475
477
|
## License
|
476
478
|
The gem is available as open source under [the terms of the MIT License][mit].
|
477
479
|
|
@@ -46,7 +46,7 @@ module RequestHandler
|
|
46
46
|
raise FieldsetsParamsError, [{ code: 'INVALID_QUERY_PARAMETER',
|
47
47
|
status: '400',
|
48
48
|
detail: "allowed fieldset does not include '#{option}'",
|
49
|
-
source: {
|
49
|
+
source: { parameter: "fields[#{type}]" } }]
|
50
50
|
end
|
51
51
|
|
52
52
|
def check_required_fieldsets_types(fieldsets)
|
@@ -62,7 +62,7 @@ module RequestHandler
|
|
62
62
|
code: 'INVALID_QUERY_PARAMETER',
|
63
63
|
status: '400',
|
64
64
|
detail: "fieldset for '#{type}' not allowed",
|
65
|
-
source: {
|
65
|
+
source: { parameter: "fields[#{type}]" }
|
66
66
|
}
|
67
67
|
]
|
68
68
|
end
|
@@ -77,7 +77,7 @@ module RequestHandler
|
|
77
77
|
{
|
78
78
|
code: 'MISSING_QUERY_PARAMETER',
|
79
79
|
status: '400',
|
80
|
-
source: {
|
80
|
+
source: { parameter: '' },
|
81
81
|
detail: "missing required parameter fields[#{type}]"
|
82
82
|
}
|
83
83
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: request_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Eger
|
8
8
|
- Dominik Goltermann
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-06-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: docile
|
@@ -319,7 +319,7 @@ homepage: https://github.com/runtastic/request_handler
|
|
319
319
|
licenses:
|
320
320
|
- MIT
|
321
321
|
metadata: {}
|
322
|
-
post_install_message:
|
322
|
+
post_install_message:
|
323
323
|
rdoc_options: []
|
324
324
|
require_paths:
|
325
325
|
- lib
|
@@ -334,8 +334,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
- !ruby/object:Gem::Version
|
335
335
|
version: '0'
|
336
336
|
requirements: []
|
337
|
-
rubygems_version: 3.
|
338
|
-
signing_key:
|
337
|
+
rubygems_version: 3.1.2
|
338
|
+
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: shared base for request_handler using dry-* gems
|
341
341
|
test_files: []
|