restful-riskview 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ef860dbae91c2be20b03d673ff39e4eda794926
4
- data.tar.gz: 9dd6335e15d2d1be03518fd5f01d00eaa360240e
3
+ metadata.gz: f6001313915f440bb2e656a9e99531c9da19d6bd
4
+ data.tar.gz: ea0ab43f6a658e7833348fc956d82281e542ce8b
5
5
  SHA512:
6
- metadata.gz: 2668646615d323f027c6a3d9d1578ddeed2f24191dc2ba3fffbc77b98be120167fe28c86513ab865b297da8fb6ebff7db75fed372ed7ca7934770252a0d794c8
7
- data.tar.gz: 5a85feef719778bee488c9ee2b7dc8079ecbb01bcc09b0f2dbd507b225e1c6c08c4d9ae02541b651a0d96bf24ec4d9e05c063704e79aeebc8e0b51d5ea6bd7c1
6
+ metadata.gz: b0e277c5ff7cf57d9ba6b4001ac6d4cefd4a8645ecc6e579cbce1f0c3da3363ff8deac4559e957248eae65e7692e034d60f5d85907b23369a175516801faba7b
7
+ data.tar.gz: 9145d634023da2398187864bbdb2bb5db6256d9637d25284baf20972de32da55342c4d8ff1e775ee28c61c8bb6134606ec1581bff3d6406842475e1f344c668c
@@ -15,6 +15,7 @@ require 'razor_risk/cassini/applications/rest_framework/route_verb_dispatcher'
15
15
  require 'razor_risk/cassini/applications/route_verb_adaptors/risk_view'
16
16
  require 'razor_risk/cassini/applications/secured_microservice'
17
17
  require 'razor_risk/cassini/mixin/razor_response_validator'
18
+ require 'razor_risk/core/diagnostics/logger'
18
19
 
19
20
  require 'pantheios'
20
21
 
@@ -48,6 +49,7 @@ class RiskViewApp < SecuredMicroservice
48
49
  include RouteVerbAdaptors::RiskView
49
50
  include RESTFramework::RouteVerbDispatch
50
51
  include Cassini::Mixin::RazorResponseValidator
52
+ include ::RazorRisk::Core::Diagnostics::Logger
51
53
 
52
54
  include ::Pantheios
53
55
 
@@ -17,7 +17,7 @@ module RESTful
17
17
  module RiskView
18
18
 
19
19
  # Current version of the RazorRisk.Cassini.Microservices.RESTful.RiskView library
20
- VERSION = '0.0.4'
20
+ VERSION = '0.0.5'
21
21
 
22
22
  private
23
23
  VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
@@ -19,6 +19,8 @@ require 'razor_risk/cassini/util/conversion_util'
19
19
  require 'razor_risk/razor/connectivity/razor_3/razor_requester'
20
20
  require 'razor_risk/razor/connectivity/razor_3/entity_connectors/portfolios_connector'
21
21
 
22
+ require 'razor_risk/core/diagnostics/logger'
23
+
22
24
  require 'pantheios'
23
25
  require 'xqsr3/conversion/integer_parser'
24
26
 
@@ -27,321 +29,341 @@ require 'xqsr3/conversion/integer_parser'
27
29
  # module
28
30
 
29
31
  module RazorRisk
30
- module Cassini
31
- module Applications
32
- module RouteVerbAdaptors
33
- module RiskView
32
+ module Cassini
33
+ module Applications
34
+ module RouteVerbAdaptors
35
+ module RiskView
34
36
 
35
37
 
36
38
  # ##########################################################################
37
39
  # classes
38
40
 
39
- class ItemGet < RESTFramework::VerbHandler
40
-
41
- # ##########################################################
42
- # includes
43
-
44
- include Cassini::Mixin::RazorResponseValidator
45
- include Cassini::Util::ConversionUtil
46
-
47
- include Razor::Connectivity::EntityConnectors::Exceptions
48
- include Razor::Connectivity::Razor3
49
- include Razor::Connectivity::Razor3::EntityConnectors
50
-
51
- include ::Pantheios
52
-
53
-
54
- # ##########################################################
55
- # Constants
56
-
57
- private
58
- module Constants
59
-
60
- VALID_DOMAINS = [ 'Counterparty', 'Country', 'GroupCounterparty' ]
61
-
62
- FieldXpathFormatString = 'fields/field[@id="%s"]'
63
-
64
- RPD_YES = 'YES'
65
- RPD_NO = 'NO'
66
- end
67
-
68
- public
69
- HTTP_VERB = :get
70
- HTTP_ACCEPTS = [
71
- 'application/xml',
72
- 'application/json',
73
- 'text/xml',
74
- ]
75
- QUERY_PARAMETERS = [
76
- 'page-base',
77
- 'page-extent',
78
- 'group',
79
- ]
80
- ROUTE_VARIABLES = [
81
- 'domain',
82
- 'id',
83
- ]
84
-
85
- def initialize *args, **options
86
-
87
- @ptf_connector_class = options[:ptf_connector_class] || PortfoliosConnector
88
- @rpd_connector_class = options[:rpd_connector_class] || RiskPointData::DomainsConnector
89
- super
90
- end
91
-
92
- private
93
- # Finds the ID of the group leader.
94
- #
95
- # @param id [String] the ID of the counterpary
96
- #
97
- # @return [String] the ID of the group leader if one is found
98
- # @return [nil] if the group leader is not found
99
- def find_group_leader_ id
100
-
101
- domain = 'GroupLimitRelations'
102
- cr = get_required_credentials
103
- rr = settings.razor_requester
104
- ec = @rpd_connector_class.new(rr, credentials: cr)
105
- qr = ec.get_records domain, indicate_result_by: :qualified_result
106
-
107
- validate_qualified_razor_response qr
108
-
109
- unless qr.succeeded?
110
- log :warning, 'Failed to get GroupLimitRelations'
111
- error(
112
- HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
113
- 'Oop! Something went wrong!'
114
- )
115
- end
116
-
117
- qr.result.xpath('//record').each do |r|
118
- parent = r.at_xpath(
119
- Constants::FieldXpathFormatString % 'GLParentCounterparty'
120
- ).text
121
- child = r.at_xpath(
122
- Constants::FieldXpathFormatString % 'ChildCpty'
123
- ).text
124
- type = r.at_xpath(
125
- Constants::FieldXpathFormatString % 'GroupLimitType'
126
- ).text
127
-
128
- if 'STANDARD' == type and [ parent, child ].include?(id)
129
- return parent
130
- end
131
- end
132
-
133
- nil
134
- end
135
-
136
- def get_limit_types_
137
-
138
- domain = 'LimitType'
139
- cr = get_required_credentials
140
- rr = settings.razor_requester
141
- ec = @rpd_connector_class.new(rr, credentials: cr)
142
- qr = ec.get_records domain, indicate_result_by: :qualified_result
143
-
144
- validate_qualified_razor_response qr
145
-
146
- unless qr.succeeded?
147
- log :warning, 'Failed to get LimitType'
148
- error(
149
- HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
150
- 'Oops! Something went wrong!'
151
- )
152
- end
153
-
154
- records = qr.result.xpath('//record')
155
-
156
- limit_types = {
157
- counterparty: [],
158
- country: [],
159
- counterparty_group: [],
160
- }
161
-
162
- records.each do |record|
163
- id = record.at_xpath('@id').value
164
- counterparty = Constants::RPD_YES == record.at_xpath(
165
- Constants::FieldXpathFormatString % 'IsCounterpartyRelevant'
166
- )&.text
167
- country = Constants::RPD_YES == record.at_xpath(
168
- Constants::FieldXpathFormatString % 'IsCountryRelevant'
169
- )&.text
170
- group = Constants::RPD_YES == record.at_xpath(
171
- Constants::FieldXpathFormatString % 'IsGroupLimitRelevant'
172
- )&.text
173
-
174
- if counterparty
175
- if group
176
- limit_types[:counterparty_group] << id
177
- else
178
- limit_types[:counterparty] << id
179
- end
180
- elsif country
181
- limit_types[:country] << id
182
- end
183
- end
184
-
185
- limit_types
186
- end
187
- public
188
-
189
-
190
- # ##########################################################
191
- # Handler
192
-
193
- def handle env, params, request, response
194
-
195
- trace ParamNames[ :env, :params, :request, :response ], env, params, request, response
196
-
197
- domain = check_option(
198
- params,
199
- 'domain',
200
- strip_str_whitespace: true,
201
- values: Constants::VALID_DOMAINS,
202
- nothrow: true,
203
- ) || error(HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY, 'Invalid domain')
204
-
205
- id = check_option(
206
- params,
207
- 'id',
208
- strip_str_whitespace: true,
209
- reject_empty: true,
210
- nothrow: true,
211
- ) || error(HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY, 'Invalid ID')
212
-
213
- page_base = ::Xqsr3::Conversion::IntegerParser.to_integer(
214
- params['page-base'] || 0
215
- ) do |x, arg|
216
- error(
217
- HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY,
218
- "invalid page specifier: 'page-base'=#{arg}"
219
- )
220
- end
221
- page_extent = ::Xqsr3::Conversion::IntegerParser.to_integer(
222
- params['page-extent'] || 1000
223
- ) do |x, arg|
224
- error(
225
- HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY,
226
- "invalid page specifier: 'page-extent'=#{arg}"
227
- )
228
- end
229
-
230
- if page_base < 0 || page_extent < 1
231
- error(
232
- HTTP_STATUS_NAMES::RANGE_NOT_SATISFIABLE,
233
- "invalid page specifier: 'page-base'=#{page_base}; 'page-extent'=#{page_extent}"
234
- )
235
- end
236
-
237
- group = 0 == (
238
- /^t(rue)?$/i =~ check_option(
239
- params,
240
- 'group',
241
- strip_str_whitespace: true,
242
- reject_empty: true,
243
- nothrow: true,
244
- )
245
- )
246
-
247
- if group
248
- leader_id = find_group_leader_(id)
249
- if leader_id
250
- id = leader_id
251
- else
252
- log :debug1, "Counterpary #{id} is not part of a group"
253
- end
254
- end
255
-
256
- limit_types = get_limit_types_
257
-
258
- # Handle Globals
259
- risk_view = { domain => id }
260
- if 'Counterparty' == domain
261
- if group
262
- risk_view['LimitType'] = limit_types[:counterparty_group]
263
- else
264
- risk_view['LimitType'] = limit_types[:counterparty]
265
- end
266
- elsif 'Country' == domain
267
- risk_view['LimitType'] = limit_types[:country]
268
- end
269
-
270
- rq_opts = {
271
- :page_base => page_base,
272
- :page_extent => page_extent,
273
- :risk_view => risk_view,
274
- :is_group => group,
275
- }
276
-
277
- cr = get_required_credentials
278
- rr = settings.razor_requester
279
- ec = @ptf_connector_class.new(rr, credentials: cr, **rq_opts)
280
-
281
- # TODO: allow these exceptions to be handled by the frame work. This
282
- # will require significant change to the unit tests.
283
- begin
284
- qr = ec.get_hierarchy indicate_result_by: :qualified_result
285
- rescue ::ArgumentError, ::NameError, ::NoMethodError, ::TypeError => x
286
- log(:violation) { "(#{x.class}): #{x.message}" }
287
- raise
288
- rescue RazorRequester::InvalidCredentialsException => x
289
- log(:failure) { "exception (#{x.class}): #{x}" }
290
- error HTTP_STATUS_NAMES::UNAUTHORIZED, 'Invalid credentials'
291
- rescue DataNotFoundException => x
292
- log(:failure) { "exception (#{x.class}): #{x}" }
293
- error HTTP_STATUS_NAMES::NOT_FOUND, x.message
294
- rescue => x
295
- log(:failure) { "exception (#{x.class}): #{x}" }
296
- error HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR, x.message
297
- end
298
-
299
- log :debug1, "qr(#{qr.class})='#{qr}'"
300
-
301
- validate_qualified_razor_response qr
302
-
303
- unless qr.succeeded?
304
- log :warning, "Failed to retrieve risk-view for '#{id}' for an unkown reason."
305
- error(
306
- HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
307
- 'Oops! Something went wrong!'
308
- )
309
- end
310
-
311
- r = qr.result.to_s
312
-
313
- status HTTP_STATUS_NAMES::OK
314
-
315
- if request.accept?('application/xml')
316
- log :debug1, 'application/xml'
317
- content_type 'application/xml'
318
- r
319
- elsif request.accept?('text/xml')
320
- log :debug1, 'text/xml'
321
- content_type 'text/xml'
322
- r
323
- elsif request.accept?('application/json')
324
- log :debug1, 'application/json'
325
- content_type 'application/json'
326
- convert_XML_to_JSON r, { scheme: :gdata }
327
- else
328
- log :violation, "unexpected failure to match given 'Accept' header '#{request.accept}'"
329
- error(
330
- HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
331
- 'Oops! Something went wrong!'
332
- )
333
- end
334
- end
335
- end # class ItemGet
41
+ class ItemGet < RESTFramework::VerbHandler
42
+
43
+ # ##########################################################
44
+ # includes
45
+
46
+ include Cassini::Mixin::RazorResponseValidator
47
+ include Cassini::Util::ConversionUtil
48
+
49
+ include Razor::Connectivity::EntityConnectors::Exceptions
50
+ include Razor::Connectivity::Razor3
51
+ include Razor::Connectivity::Razor3::EntityConnectors
52
+
53
+ include ::RazorRisk::Core::Diagnostics::Logger
54
+ include ::Pantheios
55
+
56
+
57
+ # ##########################################################
58
+ # Constants
59
+
60
+ private
61
+ module Constants
62
+
63
+ VALID_DOMAINS = [ 'Counterparty', 'Country', 'GroupCounterparty' ]
64
+
65
+ FieldXpathFormatString = 'fields/field[@id="%s"]'
66
+
67
+ RPD_YES = 'YES'
68
+ RPD_NO = 'NO'
69
+ end
70
+
71
+ public
72
+ HTTP_VERB = :get
73
+ HTTP_ACCEPTS = [
74
+ 'application/xml',
75
+ 'application/json',
76
+ 'text/xml',
77
+ ]
78
+ QUERY_PARAMETERS = [
79
+ 'page-base',
80
+ 'page-extent',
81
+ 'group',
82
+ 'facility',
83
+ ]
84
+ ROUTE_VARIABLES = [
85
+ 'domain',
86
+ 'id',
87
+ ]
88
+
89
+ def initialize *args, **options
90
+
91
+ @ptf_connector_class = options[:ptf_connector_class] || PortfoliosConnector
92
+ @rpd_connector_class = options[:rpd_connector_class] || RiskPointData::DomainsConnector
93
+ super
94
+ end
95
+
96
+ private
97
+ # Finds the ID of the group leader.
98
+ #
99
+ # @param id [String] the ID of the counterpary
100
+ #
101
+ # @return [String] the ID of the group leader if one is found
102
+ # @return [nil] if the group leader is not found
103
+ def find_group_leader_ id
104
+
105
+ domain = 'GroupLimitRelations'
106
+ cr = get_required_credentials
107
+ rr = settings.razor_requester
108
+ ec = @rpd_connector_class.new(rr, credentials: cr)
109
+ qr = ec.get_records domain, indicate_result_by: :qualified_result
110
+
111
+ validate_qualified_razor_response qr
112
+
113
+ unless qr.succeeded?
114
+ log :warning, 'Failed to get GroupLimitRelations'
115
+ error(
116
+ HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
117
+ 'Oop! Something went wrong!'
118
+ )
119
+ end
120
+
121
+ qr.result.xpath('//record').each do |r|
122
+ parent = r.at_xpath(
123
+ Constants::FieldXpathFormatString % 'GLParentCounterparty'
124
+ ).text
125
+ child = r.at_xpath(
126
+ Constants::FieldXpathFormatString % 'ChildCpty'
127
+ ).text
128
+ type = r.at_xpath(
129
+ Constants::FieldXpathFormatString % 'GroupLimitType'
130
+ ).text
131
+
132
+ if 'STANDARD' == type and [ parent, child ].include?(id)
133
+ return parent
134
+ end
135
+ end
136
+
137
+ nil
138
+ end
139
+
140
+ def get_limit_types_
141
+
142
+ domain = 'LimitType'
143
+ cr = get_required_credentials
144
+ rr = settings.razor_requester
145
+ ec = @rpd_connector_class.new(rr, credentials: cr)
146
+ qr = ec.get_records domain, indicate_result_by: :qualified_result
147
+
148
+ validate_qualified_razor_response qr
149
+
150
+ unless qr.succeeded?
151
+ log :warning, 'Failed to get LimitType'
152
+ error(
153
+ HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
154
+ 'Oops! Something went wrong!'
155
+ )
156
+ end
157
+
158
+ records = qr.result.xpath('//record')
159
+
160
+ limit_types = {
161
+ counterparty: [],
162
+ country: [],
163
+ counterparty_group: [],
164
+ counterparty_facility_group: [],
165
+ }
166
+ #print("records: #{records}")
167
+ records.each do |record|
168
+ id = record.at_xpath('@id').value
169
+ counterparty = Constants::RPD_YES == record.at_xpath(
170
+ Constants::FieldXpathFormatString % 'IsCounterpartyRelevant'
171
+ )&.text
172
+ country = Constants::RPD_YES == record.at_xpath(
173
+ Constants::FieldXpathFormatString % 'IsCountryRelevant'
174
+ )&.text
175
+ group = Constants::RPD_YES == record.at_xpath(
176
+ Constants::FieldXpathFormatString % 'IsGroupLimitRelevant'
177
+ )&.text
178
+
179
+ limit_types[:counterparty_facility_group] = ["GLOBAL","GLGLOBAL"]
180
+ if counterparty
181
+ if group
182
+ limit_types[:counterparty_group] << id
183
+ else
184
+ limit_types[:counterparty] << id
185
+ end
186
+ elsif country
187
+ limit_types[:country] << id
188
+ end
189
+ end
190
+
191
+ limit_types
192
+ end
193
+ public
194
+
195
+
196
+ # ##########################################################
197
+ # Handler
198
+
199
+ def handle env, params, request, response
200
+ #print("params risk_view: #{params}")
201
+
202
+ trace ParamNames[ :env, :params, :request, :response ], env, params, request, response
203
+ domain = check_option(
204
+ params,
205
+ 'domain',
206
+ strip_str_whitespace: true,
207
+ values: Constants::VALID_DOMAINS,
208
+ nothrow: true,
209
+ ) || error(HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY, 'Invalid domain')
210
+
211
+ id = check_option(
212
+ params,
213
+ 'id',
214
+ strip_str_whitespace: true,
215
+ reject_empty: true,
216
+ nothrow: true,
217
+ ) || error(HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY, 'Invalid ID')
218
+
219
+ page_base = ::Xqsr3::Conversion::IntegerParser.to_integer(
220
+ params['page-base'] || 0
221
+ ) do |x, arg|
222
+ error(
223
+ HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY,
224
+ "invalid page specifier: 'page-base'=#{arg}"
225
+ )
226
+ end
227
+ page_extent = ::Xqsr3::Conversion::IntegerParser.to_integer(
228
+ params['page-extent'] || 1000
229
+ ) do |x, arg|
230
+ error(
231
+ HTTP_STATUS_NAMES::UNPROCESSABLE_ENTITY,
232
+ "invalid page specifier: 'page-extent'=#{arg}"
233
+ )
234
+ end
235
+
236
+ if page_base < 0 || page_extent < 1
237
+ error(
238
+ HTTP_STATUS_NAMES::RANGE_NOT_SATISFIABLE,
239
+ "invalid page specifier: 'page-base'=#{page_base}; 'page-extent'=#{page_extent}"
240
+ )
241
+ end
242
+
243
+ group = 0 == (
244
+ /^t(rue)?$/i =~ check_option(
245
+ params,
246
+ 'group',
247
+ strip_str_whitespace: true,
248
+ reject_empty: true,
249
+ nothrow: true,
250
+ )
251
+ )
252
+
253
+ facility = 0 == (
254
+ /^t(rue)?$/i =~ check_option(
255
+ params,
256
+ 'facility',
257
+ strip_str_whitespace: true,
258
+ reject_empty: true,
259
+ nothrow: true,
260
+ )
261
+ )
262
+
263
+ #print("new data isfacility: #{facility}")
264
+
265
+ if group
266
+ leader_id = find_group_leader_(id)
267
+ if leader_id
268
+ id = leader_id
269
+ else
270
+ log :debug1, "Counterpary #{id} is not part of a group"
271
+ end
272
+ end
273
+
274
+ limit_types = get_limit_types_
275
+
276
+ #print("limit_types: #{limit_types}")
277
+ # Handle Globals
278
+ risk_view = { domain => id }
279
+ if 'Counterparty' == domain
280
+ if facility
281
+ risk_view['LimitType'] = limit_types[:counterparty_facility_group]
282
+ elsif group
283
+ risk_view['LimitType'] = limit_types[:counterparty_group]
284
+ else
285
+ risk_view['LimitType'] = limit_types[:counterparty]
286
+ end
287
+ elsif 'Country' == domain
288
+ risk_view['LimitType'] = limit_types[:country]
289
+ end
290
+
291
+ rq_opts = {
292
+ :page_base => page_base,
293
+ :page_extent => page_extent,
294
+ :risk_view => risk_view,
295
+ :is_group => group,
296
+ :is_facility => facility,
297
+ }
298
+ #print("risk_view: #{risk_view}")
299
+ cr = get_required_credentials
300
+ rr = settings.razor_requester
301
+ ec = @ptf_connector_class.new(rr, credentials: cr, **rq_opts)
302
+
303
+ # TODO: allow these exceptions to be handled by the frame work. This
304
+ # will require significant change to the unit tests.
305
+ begin
306
+ qr = ec.get_hierarchy indicate_result_by: :qualified_result
307
+ rescue ::ArgumentError, ::NameError, ::NoMethodError, ::TypeError => x
308
+ log(:violation) { "(#{x.class}): #{x.message}" }
309
+ raise
310
+ rescue RazorRequester::InvalidCredentialsException => x
311
+ log(:failure) { "exception (#{x.class}): #{x}" }
312
+ error HTTP_STATUS_NAMES::UNAUTHORIZED, 'Invalid credentials'
313
+ rescue DataNotFoundException => x
314
+ log(:failure) { "exception (#{x.class}): #{x}" }
315
+ error HTTP_STATUS_NAMES::NOT_FOUND, x.message
316
+ rescue => x
317
+ log(:failure) { "exception (#{x.class}): #{x}" }
318
+ error HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR, x.message
319
+ end
320
+
321
+ log :debug1, "qr(#{qr.class})='#{qr}'"
322
+
323
+ validate_qualified_razor_response qr
324
+
325
+ unless qr.succeeded?
326
+ log :warning, "Failed to retrieve risk-view for '#{id}' for an unkown reason."
327
+ error(
328
+ HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
329
+ 'Oops! Something went wrong!'
330
+ )
331
+ end
332
+
333
+ r = qr.result.to_s
334
+
335
+ status HTTP_STATUS_NAMES::OK
336
+
337
+ if request.accept?('application/xml')
338
+ log :debug1, 'application/xml'
339
+ content_type 'application/xml'
340
+ r
341
+ elsif request.accept?('text/xml')
342
+ log :debug1, 'text/xml'
343
+ content_type 'text/xml'
344
+ r
345
+ elsif request.accept?('application/json')
346
+ log :debug1, 'application/json'
347
+ content_type 'application/json'
348
+ convert_XML_to_JSON r, { scheme: :gdata }
349
+ else
350
+ log :violation, "unexpected failure to match given 'Accept' header '#{request.accept}'"
351
+ error(
352
+ HTTP_STATUS_NAMES::INTERNAL_SERVER_ERROR,
353
+ 'Oops! Something went wrong!'
354
+ )
355
+ end
356
+ end
357
+ end # class ItemGet
336
358
 
337
359
 
338
360
  # ##########################################################################
339
361
  # module
340
362
 
341
- end # module RiskView
342
- end # module RouteVerbAdaptors
343
- end # module Applications
344
- end # module Cassini
363
+ end # module RiskView
364
+ end # module RouteVerbAdaptors
365
+ end # module Applications
366
+ end # module Cassini
345
367
  end # module RazorRisk
346
368
 
347
369
  # ############################## end of file ############################# #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful-riskview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Razor Risk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-30 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: razorrisk-cassini-common