You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -553,7 +553,9 @@ In rare cases, the API may return a response that doesn't match the expected typ
553
553
554
554
By default, the SDK will not throw an exception in this case. It will throw [`OnebusawaySdkInvalidDataException`](onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/errors/OnebusawaySdkInvalidDataException.kt) only if you directly access the property.
555
555
556
-
If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:
556
+
Validating the response is _not_ forwards compatible with new types from the API for existing fields.
557
+
558
+
If you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:
Copy file name to clipboardExpand all lines: onebusaway-sdk-java-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClient.kt
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,9 @@ class OnebusawaySdkOkHttpClient private constructor() {
217
217
/**
218
218
* Whether to call `validate` on every response before returning it.
219
219
*
220
+
* Setting this to `true` is _not_ forwards compatible with new types from the API for
221
+
* existing fields.
222
+
*
220
223
* Defaults to false, which means the shape of the response will not be validated upfront.
221
224
* Instead, validation will only occur for the parts of the response that are accessed.
Copy file name to clipboardExpand all lines: onebusaway-sdk-java-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClientAsync.kt
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,9 @@ class OnebusawaySdkOkHttpClientAsync private constructor() {
217
217
/**
218
218
* Whether to call `validate` on every response before returning it.
219
219
*
220
+
* Setting this to `true` is _not_ forwards compatible with new types from the API for
221
+
* existing fields.
222
+
*
220
223
* Defaults to false, which means the shape of the response will not be validated upfront.
221
224
* Instead, validation will only occur for the parts of the response that are accessed.
Copy file name to clipboardExpand all lines: onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/agencieswithcoverage/AgenciesWithCoverageListResponse.kt
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -267,6 +267,14 @@ private constructor(
267
267
268
268
privatevar validated:Boolean=false
269
269
270
+
/**
271
+
* Validates that the types of all values in this object match their expected types recursively.
272
+
*
273
+
* This method is _not_ forwards compatible with new types from the API for existing fields.
274
+
*
275
+
* @throws OnebusawaySdkInvalidDataException if any value type in this object doesn't match its
0 commit comments