Skip to content

Commit 4d0321e

Browse files
committed
revert payload to camel case
1 parent 2801a66 commit 4d0321e

File tree

6 files changed

+73
-72
lines changed

6 files changed

+73
-72
lines changed

bugsnag/src/main/java/com/bugsnag/Report.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public Map<String, String> getUser() {
123123
}
124124

125125
@Expose
126+
@com.fasterxml.jackson.annotation.JsonProperty("metaData")
126127
public Map<String, Object> getMetadata() {
127128
return new RedactedMap(diagnostics.metadata, Set.of(config.redactedKeys));
128129
}

features/async_method.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ Scenario: Notify an exception from a spring boot async method
1818
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
1919
And the exception "errorClass" equals "java.lang.RuntimeException"
2020
And the exception "message" equals "test from before async"
21-
And the event "metadata.thread.controllerMethod" equals "meta data from controller method"
22-
And the event "metadata.thread.inAsyncMethod" is null
21+
And the event "metaData.thread.controllerMethod" equals "meta data from controller method"
22+
And the event "metaData.thread.inAsyncMethod" is null
2323
Then I discard the oldest error
2424

2525
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
2626
And the exception "errorClass" equals "java.lang.RuntimeException"
2727
And the exception "message" equals "test from async"
28-
And the event "metadata.thread.controllerMethod" is null
29-
And the event "metadata.thread.inAsyncMethod" equals "meta data from async method"
28+
And the event "metaData.thread.controllerMethod" is null
29+
And the event "metaData.thread.inAsyncMethod" equals "meta data from async method"
3030

3131
Scenario: Report an exception from a plain spring async method
3232
Given I run the plain spring app

features/meta_data.feature

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,159 +4,159 @@ Scenario: Sends a handled exception which includes custom metadata added in a no
44
When I run "MetadataScenario" with the defaults
55
And I wait to receive an error
66
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
7-
And the event "metadata.Custom.foo" equals "Hello World!"
7+
And the event "metaData.Custom.foo" equals "Hello World!"
88

99
Scenario: Sends a handled exception which includes custom metadata added in a notify callback for Spring Boot app
1010
When I run spring boot "MetadataScenario" with the defaults
1111
And I wait to receive an error
1212
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
13-
And the event "metadata.Custom.foo" equals "Hello World!"
13+
And the event "metaData.Custom.foo" equals "Hello World!"
1414

1515
Scenario: Sends a handled exception which includes custom metadata added in a notify callback for plain Spring app
1616
When I run plain Spring "MetadataScenario" with the defaults
1717
And I wait to receive an error
1818
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
19-
And the event "metadata.Custom.foo" equals "Hello World!"
19+
And the event "metaData.Custom.foo" equals "Hello World!"
2020

2121
Scenario: Test logback appender with metadata in the config file
2222
When I run "LogbackScenario" with logback config "meta_data_config.xml"
2323
And I wait to receive an error
2424
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
2525
And the error payload field "events" is an array with 1 elements
2626
And the exception "errorClass" equals "java.lang.RuntimeException"
27-
And the event "metadata.configTab.foo" equals "tabValue1"
28-
And the event "metadata.configTab.bar" equals "tabValue2"
27+
And the event "metaData.configTab.foo" equals "tabValue1"
28+
And the event "metaData.configTab.bar" equals "tabValue2"
2929

3030
Scenario: Test logback appender with thread metadata
3131
When I run "LogbackThreadMetadataScenario" with logback config "basic_config.xml"
3232
And I wait to receive an error
3333
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
3434
And the error payload field "events" is an array with 1 elements
3535
And the exception "errorClass" equals "java.lang.RuntimeException"
36-
And the event "metadata.thread.foo" equals "threadvalue1"
37-
And the event "metadata.thread.bar" equals "threadvalue2"
36+
And the event "metaData.thread.foo" equals "threadvalue1"
37+
And the event "metaData.thread.bar" equals "threadvalue2"
3838

3939
Scenario: Test logback appender with metadata in a callback
4040
When I run "LogbackMetadataScenario" with logback config "basic_config.xml"
4141
And I wait to receive an error
4242
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
4343
And the error payload field "events" is an array with 1 elements
4444
And the exception "errorClass" equals "java.lang.RuntimeException"
45-
And the event "metadata.user.foo" equals "hunter2"
46-
And the event "metadata.custom.foo" equals "hunter2"
47-
And the event "metadata.custom.bar" equals "hunter2"
45+
And the event "metaData.user.foo" equals "hunter2"
46+
And the event "metaData.custom.foo" equals "hunter2"
47+
And the event "metaData.custom.bar" equals "hunter2"
4848

4949
Scenario: Test logback appender with metadata from the MDC
5050
When I run "LogbackMDCScenario" with logback config "basic_config.xml"
5151
And I wait to receive an error
5252
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
5353
And the error payload field "events" is an array with 1 elements
5454
And the exception "errorClass" equals "java.lang.RuntimeException"
55-
And the event "metadata.Context.foo" equals "hunter2"
56-
And the event "metadata.Context.bar" equals "hunter2"
55+
And the event "metaData.Context.foo" equals "hunter2"
56+
And the event "metaData.Context.bar" equals "hunter2"
5757

5858
Scenario: Test thread metadata
5959
When I run "ThreadMetadataScenario" with the defaults
6060
And I wait to receive an error
6161
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
6262
And the error payload field "events" is an array with 1 elements
6363
And the exception "errorClass" equals "java.lang.RuntimeException"
64-
And the event "metadata.Custom.test" equals "Global value"
65-
And the event "metadata.Custom.foo" equals "Thread value"
66-
And the event "metadata.Custom.bar" equals "Hello World!"
67-
And the event "metadata.Custom.something" is null
64+
And the event "metaData.Custom.test" equals "Global value"
65+
And the event "metaData.Custom.foo" equals "Thread value"
66+
And the event "metaData.Custom.bar" equals "Hello World!"
67+
And the event "metaData.Custom.something" is null
6868

6969
Scenario: Test thread metadata for Spring Boot app
7070
When I run spring boot "ThreadMetadataScenario" with the defaults
7171
And I wait to receive an error
7272
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
7373
And the error payload field "events" is an array with 1 elements
7474
And the exception "errorClass" equals "java.lang.RuntimeException"
75-
And the event "metadata.Custom.test" equals "Global value"
76-
And the event "metadata.Custom.foo" equals "Thread value"
77-
And the event "metadata.Custom.bar" equals "Hello World!"
78-
And the event "metadata.Custom.something" is null
75+
And the event "metaData.Custom.test" equals "Global value"
76+
And the event "metaData.Custom.foo" equals "Thread value"
77+
And the event "metaData.Custom.bar" equals "Hello World!"
78+
And the event "metaData.Custom.something" is null
7979

8080
Scenario: Test thread metadata for plain Spring app
8181
When I run plain Spring "ThreadMetadataScenario" with the defaults
8282
And I wait to receive an error
8383
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
8484
And the error payload field "events" is an array with 1 elements
8585
And the exception "errorClass" equals "java.lang.RuntimeException"
86-
And the event "metadata.Custom.test" equals "Global value"
87-
And the event "metadata.Custom.foo" equals "Thread value"
88-
And the event "metadata.Custom.bar" equals "Hello World!"
89-
And the event "metadata.Custom.something" is null
86+
And the event "metaData.Custom.test" equals "Global value"
87+
And the event "metaData.Custom.foo" equals "Thread value"
88+
And the event "metaData.Custom.bar" equals "Hello World!"
89+
And the event "metaData.Custom.something" is null
9090

9191
Scenario: Test unhandled thread metadata
9292
When I run "UnhandledThreadMetadataScenario" with the defaults
9393
And I wait to receive an error
9494
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
9595
And the error payload field "events" is an array with 1 elements
9696
And the exception "errorClass" equals "java.lang.RuntimeException"
97-
And the event "metadata.Custom.test" equals "Global value"
98-
And the event "metadata.Custom.foo" equals "Thread value 1"
99-
And the event "metadata.Custom.bar" equals "Thread value 2"
100-
And the event "metadata.Custom.something" is null
97+
And the event "metaData.Custom.test" equals "Global value"
98+
And the event "metaData.Custom.foo" equals "Thread value 1"
99+
And the event "metaData.Custom.bar" equals "Thread value 2"
100+
And the event "metaData.Custom.something" is null
101101

102102
Scenario: Test unhandled thread metadata for Spring Boot app
103103
When I run spring boot "UnhandledThreadMetadataScenario" with the defaults
104104
And I wait to receive an error
105105
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
106106
And the error payload field "events" is an array with 1 elements
107107
And the exception "errorClass" equals "java.lang.RuntimeException"
108-
And the event "metadata.Custom.test" equals "Global value"
109-
And the event "metadata.Custom.foo" equals "Thread value 1"
110-
And the event "metadata.Custom.bar" equals "Thread value 2"
111-
And the event "metadata.Custom.something" is null
108+
And the event "metaData.Custom.test" equals "Global value"
109+
And the event "metaData.Custom.foo" equals "Thread value 1"
110+
And the event "metaData.Custom.bar" equals "Thread value 2"
111+
And the event "metaData.Custom.something" is null
112112

113113
Scenario: Test unhandled thread metadata for plain Spring app
114114
When I run plain Spring "UnhandledThreadMetadataScenario" with the defaults
115115
And I wait to receive an error
116116
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
117117
And the error payload field "events" is an array with 1 elements
118118
And the exception "errorClass" equals "java.lang.RuntimeException"
119-
And the event "metadata.Custom.test" equals "Global value"
120-
And the event "metadata.Custom.foo" equals "Thread value 1"
121-
And the event "metadata.Custom.bar" equals "Thread value 2"
122-
And the event "metadata.Custom.something" is null
119+
And the event "metaData.Custom.test" equals "Global value"
120+
And the event "metaData.Custom.foo" equals "Thread value 1"
121+
And the event "metaData.Custom.bar" equals "Thread value 2"
122+
And the event "metaData.Custom.something" is null
123123

124124
Scenario: Test logback appender with thread metadata
125125
When I run "LogbackThreadMetadataScenario" with logback config "basic_config.xml"
126126
And I wait to receive an error
127127
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
128128
And the error payload field "events" is an array with 1 elements
129129
And the exception "errorClass" equals "java.lang.RuntimeException"
130-
And the event "metadata.thread.foo" equals "threadvalue1"
131-
And the event "metadata.thread.bar" equals "threadvalue2"
132-
And the event "metadata.Custom.something" is null
130+
And the event "metaData.thread.foo" equals "threadvalue1"
131+
And the event "metaData.thread.bar" equals "threadvalue2"
132+
And the event "metaData.Custom.something" is null
133133

134-
Scenario: Test thread meta data in plain spring async method
134+
Scenario: Test thread metadata in plain spring async method
135135
Given I run the plain spring app
136136
When I navigate to the route "/run-async-task" on port "8080"
137137
And I wait to receive an error
138138
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
139-
And the event "metadata.thread.key1" is null
140-
And the event "metadata.thread.key2" equals "should be included in metadata"
139+
And the event "metaData.thread.key1" is null
140+
And the event "metaData.thread.key2" equals "should be included in metadata"
141141

142142
Scenario: Test thread meta data in spring boot async method
143143
When I run spring boot "AsyncMethodScenario" with the defaults
144144
And I wait to receive an error
145145
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
146-
And the event "metadata.thread.key1" is null
147-
And the event "metadata.thread.key2" equals "should be included in metadata"
146+
And the event "metaData.thread.key1" is null
147+
And the event "metaData.thread.key2" equals "should be included in metadata"
148148

149149
Scenario: Test thread meta data in plain spring scheduled task
150150
Given I set environment variable "RUN_SCHEDULED_TASK" to "true"
151151
And I run the plain spring app
152152
And I wait to receive an error
153153
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
154-
And the event "metadata.thread.key1" is null
155-
And the event "metadata.thread.key2" equals "should be included in metadata"
154+
And the event "metaData.thread.key1" is null
155+
And the event "metaData.thread.key2" equals "should be included in metadata"
156156

157157
Scenario: Test thread meta data in spring boot scheduled task
158158
When I run spring boot "ScheduledTaskScenario" with the defaults
159159
And I wait to receive an error
160160
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
161-
And the event "metadata.thread.key1" is null
162-
And the event "metadata.thread.key2" equals "should be included in metadata"
161+
And the event "metaData.thread.key1" is null
162+
And the event "metaData.thread.key2" equals "should be included in metadata"

features/redacting_metadata.feature

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,51 @@ Scenario: Using the default metadata redaction
55
And I wait to receive an error
66
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
77
And the exception "message" equals "AutoRedactScenario"
8-
And the event "metadata.custom.foo" equals "hunter2"
9-
And the event "metadata.custom.password" equals "[REDACTED]"
10-
And the event "metadata.user.password" equals "[REDACTED]"
8+
And the event "metaData.custom.foo" equals "hunter2"
9+
And the event "metaData.custom.password" equals "[REDACTED]"
10+
And the event "metaData.user.password" equals "[REDACTED]"
1111

1212
Scenario: Adding a custom metadata redaction
1313
When I run "ManualRedactScenario" with the defaults
1414
And I wait to receive an error
1515
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
1616
And the exception "message" equals "ManualRedactScenario"
17-
And the event "metadata.custom.foo" equals "[REDACTED]"
18-
And the event "metadata.user.foo" equals "[REDACTED]"
19-
And the event "metadata.custom.bar" equals "hunter2"
17+
And the event "metaData.custom.foo" equals "[REDACTED]"
18+
And the event "metaData.user.foo" equals "[REDACTED]"
19+
And the event "metaData.custom.bar" equals "hunter2"
2020

2121
Scenario: Adding a thread metadata redaction using logback
2222
When I run "LogbackThreadMetadataScenario" with logback config "meta_data_redact_config.xml"
2323
And I wait to receive an error
2424
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
2525
And the exception "message" equals "LogbackThreadMetadataScenario"
26-
And the event "metadata.thread.foo" equals "[REDACTED]"
27-
And the event "metadata.thread.bar" equals "threadvalue2"
26+
And the event "metaData.thread.foo" equals "[REDACTED]"
27+
And the event "metaData.thread.bar" equals "threadvalue2"
2828

2929
Scenario: Adding a custom metadata redaction using logback
3030
When I run "LogbackMetadataScenario" with logback config "meta_data_redact_config.xml"
3131
And I wait to receive an error
3232
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
3333
And the exception "message" equals "LogbackMetadataScenario"
34-
And the event "metadata.custom.foo" equals "[REDACTED]"
35-
And the event "metadata.user.foo" equals "[REDACTED]"
36-
And the event "metadata.custom.bar" equals "hunter2"
34+
And the event "metaData.custom.foo" equals "[REDACTED]"
35+
And the event "metaData.user.foo" equals "[REDACTED]"
36+
And the event "metaData.custom.bar" equals "hunter2"
3737

3838
Scenario: Using the default metadata redaction in Spring Boot app
3939
When I run spring boot "AutoRedactScenario" with the defaults
4040
And I wait to receive an error
4141
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
4242
And the exception "message" equals "AutoRedactScenario"
43-
And the event "metadata.custom.foo" equals "hunter2"
44-
And the event "metadata.custom.password" equals "[REDACTED]"
45-
And the event "metadata.user.password" equals "[REDACTED]"
43+
And the event "metaData.custom.foo" equals "hunter2"
44+
And the event "metaData.custom.password" equals "[REDACTED]"
45+
And the event "metaData.user.password" equals "[REDACTED]"
4646

4747
Scenario: Using the default metadata redaction in Spring app
4848
When I run plain Spring "AutoRedactScenario" with the defaults
4949
And I wait to receive an error
5050
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
5151
And the exception "message" equals "AutoRedactScenario"
52-
And the event "metadata.custom.foo" equals "hunter2"
53-
And the event "metadata.custom.password" equals "[REDACTED]"
54-
And the event "metadata.user.password" equals "[REDACTED]"
52+
And the event "metaData.custom.foo" equals "hunter2"
53+
And the event "metaData.custom.password" equals "[REDACTED]"
54+
And the event "metaData.user.password" equals "[REDACTED]"
5555

features/rest_controller.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Scenario: Report an exception from a spring boot rest controller
1010
And the event "context" equals "GET /send-unhandled-exception"
1111
And the exception "errorClass" equals "java.lang.RuntimeException"
1212
And the exception "message" equals "Unhandled exception from TestRestController"
13-
And the event "metadata.request.url" ends with "/send-unhandled-exception"
13+
And the event "metaData.request.url" ends with "/send-unhandled-exception"
1414
And the event "severityReason.type" equals "unhandledExceptionMiddleware"
1515
And the event "severityReason.attributes.framework" equals "Spring"
1616

@@ -25,6 +25,6 @@ Scenario: Report an exception from a plain spring rest controller
2525
And the event "context" equals "GET /send-unhandled-exception"
2626
And the exception "errorClass" equals "java.lang.RuntimeException"
2727
And the exception "message" equals "Unhandled exception from TestRestController"
28-
And the event "metadata.request.url" ends with "/send-unhandled-exception"
28+
And the event "metaData.request.url" ends with "/send-unhandled-exception"
2929
And the event "severityReason.type" equals "unhandledExceptionMiddleware"
3030
And the event "severityReason.attributes.framework" equals "Spring"

features/scheduled_task_executor.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ Scenario: Scheduled tasks execute on a ScheduledExecutorService rather than a si
4141
And I run spring boot "ScheduledTaskExecutorScenario" with the defaults
4242
And I wait to receive an error
4343
And the error is valid for the error reporting API version "4" for the "Bugsnag Spring" notifier
44-
And the event "metadata.executor.multiThreaded" is true
44+
And the event "metaData.executor.multiThreaded" is true

0 commit comments

Comments
 (0)