Skip to content

Latest commit

 

History

History
161 lines (123 loc) · 5.65 KB

BREAKING.md

File metadata and controls

161 lines (123 loc) · 5.65 KB

Breaking Changes

2024-09-01 IRN Meetings API SDK: Attachments-related functions

Endpoints that return attachments now correctly return a file or stream object (depending on the programming language) instead of an empty response or generic object.

2024-10-01 Formula API SDK: Deserialization of BatchData

When a long-running BatchRequest is made to the /time-series endpoint, the /batch-result response containing BatchData may be incorrectly deserialized as CrossSectionalResponseObjectItems instead of TimeSeriesResponseObjectItems.

This issue stems from the polymorphic nature of the BatchData object, which can represent either CrossSectionalResponseObjectItems or TimeSeriesResponseObjectItems. During deserialization, the process may default to CrossSectionalResponseObjectItems, if the data for TimeSeriesResponseObjectItems closely resembles the former.

Impact

Applications that rely on the correct type for downstream processing can experience disrupted functionality if a CrossSectionalResponseObjectItems is encountered instead of an expected TimeSeriesResponseObjectItems. This type mismatch can lead to runtime errors.

Recommendation

Before casting BatchData to the expected type, perform a type check to ensure it matches the expected type.

Java

if (batchData.getActualInstance() instanceof TimeSeriesResponseObjectItems) {
    // Process TimeSeriesResponseObjectItems
} else {
    CrossSectionalResponseObjectItems crossSectionalResponseObjectItems = (CrossSectionalResponseObjectItems) batchData.getActualInstance();
    // Process CrossSectionalResponseObjectItems
}

Dotnet

if (batchData.ActualInstance is TimeSeriesResponseObjectItems timeSeriesResponseObjectItems) {
    // Process TimeSeriesResponseObjectItems
} else {
    CrossSectionalResponseObjectItems crossSectionalResponseObjectItems = (CrossSectionalResponseObjectItems) batchData.ActualInstance;
    // Process CrossSectionalResponseObjectItems
}

Python

if isinstance(batch_data, time_series_response_object_items):
    # Process TimeSeriesResponseObjectItems
elif isinstance(batch_data, cross_sectional_response_object_items):
    # Process CrossSectionalResponseObjectItems
else:
    raise TypeError(f"Unexpected type: {type(batch_data)}")

TypeScript

if (batchData instanceof TimeSeriesResponseObjectItems) {
    const timeSeriesResponseObjectItems = batchData as TimeSeriesResponseObjectItems;
    // Process TimeSeriesResponseObjectItems
} else {
    const crossSectionalResponseObjectItems = batchData as CrossSectionalResponseObjectItems;
    // Process CrossSectionalResponseObjectItems
}

Affected SDKs:

  • Formula

2024-06-13 Dotnet: HashSet instead of a List when uniqueItems: true

Schema of type: array which has uniqueItems: true now generates a HashSet to reflect that property.

# OpenAPI Spec Example
components:
  schemas:
    MySchema:
      type: array
      uniqueItems: true
      items:
        type: string

Generated property with the old code:

List<string> MySchema

Generated property with the new code:

HashSet<string> MySchema

Affected SDKs:

2024-04-17 Java: Update from Jersey 2.35 to 3.0

  • Library Update: The Jersey library version has been updated from 2.35 to 3.0.
  • Package Change: All imports that previously used javax.ws.rs.client are now updated to use jakarta.ws.rs.client.
  • Spring Boot / Spring Framework
    • This update makes the Java SDKs compatible with Spring Boot 3 and Spring Framework 6.
    • And incompatible with earlier versions (e.g. Spring Boot 2 and Spring Framework 5).

Affected SDKs: All Java SDKs

2023-01-25 Dotnet: Handling of schemas with named and additionalProperties

Accessing values of schemas with named properties and additionalProperties in the OpenAPI spec changed.

# OpenAPI Spec Example
components:
  schemas:
    MySchema:
      type: object
      properties:
        namedProperty:
          # ...
      additionalProperties: true

Accessing properties with the old code:

... = instance.NamedProperty // this was null
... = instance["namedProperty"] // to get the named property
... = instance["AnyOtherAdditionalProperty"] // to get additional properties

Accessing properties with the new code:

... = instance.NamedProperty // to get the named property
... = instance.AdditionalProperties["AnyOtherAddtionalProperty"] // to get additional properties

Affected SDKs: