Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@JeremyCaney JeremyCaney released this 03 Mar 00:41

OnTopic Data Transfer 2.0.0 is a major release primarily focused on support for OnTopic 5.0.0's new topic references feature. It includes changes to the JSON serialization format—though it also maintains backward compatibility with the legacy format.

New Features

General

  • Topic References: Full integration of OnTopic 5.0.0's new topic references feature, including support for BaseTopic and merging topic references based on LastModified (2cfbc52, d0cb983).
  • Resolve Associations: The Import() now tracks any associations that it is not able to resolve and attempts to resolve them after the initial Import() has completed, thus accounting for associations to topics that weren't yet imported because they occur later in the interchange data (4a75ff6). This prevents the need for calling Import() twice to ensure that there aren't any unresolved associations.

NuGet Package

  • SourceLink: Configured SourceLink with references to GitHub commits so that packages can be properly debugged by implementers (8e1a5cc).
  • IntelliSense: The NuGet packages now include the XML documentation, thus allowing implementers to benefit from IntelliSense annotations in Visual Studio (cbc66d4).
  • Icon: Added icon to NuGet packages to make them easier to recognize, and consistently branded (d65a81a).

Breaking Changes

The following changes impact the interchange format, but maintain backward compatibility for derserializing legacy JSON files.

  • DerivedTopicKey: Marked DerivedTopicKey as deprecated, and no longer write it during Export() (4705b29, 6c33fb8).
  • AttributeData(Collection): Renamed AttributeData to RecordData and AttributeDataCollection to RecordDataCollection to maintain parity with the TrackedRecord(Collection) in OnTopic, and to provide base support for both attributes as well as topic references (a5df9b1).
  • RelationshipData(Collection): Renamed RelationshipData to KeyValuesPair and RelationshipDataCollection to MultiMap to maintain parity with the KeyValuesPair<T> and TopicRelationshipMultiMap in OnTopic (bc15631). The JSON now writes to Relationships: [{ …, Values: […]}] instead of Relationships: [{ …, Relationships: […]}].

Code Improvements

  • OnTopic Library: Updated to OnTopic 5.0.0, with accommodations for breaking changes, such as the rename of Topic.DerivedTopic to BaseTopic and Topic.Relationships.SetTopic() to SetValue() (2f75a73).
  • JSON (De)Serialization: Updated to System.Json.Text 5.0.0, which allows us to take advantage of .NET 5 annotations, such as [JsonInclude] and [JsonIgnore()], while maintaining compatibility with .NET Core 3.x (439b41c).
  • Code Analysis: Implemented the latest version of Microsoft's code analysis library (NetAnalyzers), as well as the feedback it exposed, including nullable reference annotations (7fa983c).