All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Updated dependency on
Microsoft.Extensions.DependencyInjection.Abstractions
to version 9 - Updated dependency on
System.Text.Json
to version 9
- Fixed a potential null reference exception in
EnterspeedConnection
when not used before it's disposed again (contribution by Marcin-Niznik)
parentId
on ingested source entity is only saved ifproperties
is of typeIDictionary<string, IEnterspeedProperty>
- Updated dependency on
Microsoft.Extensions.DependencyInjection.Abstractions
to version 8 - Updated dependency on
System.Text.Json
to version 8
- The type for
Properties
onIEnterspeedEntity
has changed fromIDictionary<string, IEnterspeedProperty>
toobject
- A generic version of
IEnterspeedEntity
has been added
With this update you now have way more flexibility when building your EnterspeedEntity
, that you need for ingest.
In V1 you had to build the properties on your EnterspeedEntity
using IEnterspeedProperty
and declare the type of each property using the different IEnterspeedProperty
types
(StringEnterspeedProperty
, NumberEnterspeedProperty
, BooleanEnterspeedProperty
, ObjectEnterspeedProperty
and ArrayEnterspeedProperty
).
Example from Enterspeed.Source.Sdk V1
var entity = new EnterspeedEntity
{
Id = "66c5174a-c173-4503-86f9-ee5bf3defe9b",
Type = "test",
Properties = new Dictionary<string, IEnterspeedProperty>
{
{ "key", new StringEnterspeedProperty("test-product-name") },
{ "productType", new StringEnterspeedProperty("Accessories") },
{ "name", new ObjectEnterspeedProperty(
new Dictionary<string, IEnterspeedProperty>
{
{ "en_US", new StringEnterspeedProperty("Test product name ") },
{ "de_DE", new StringEnterspeedProperty("Produktbezeichnung testen") }
}
) },
{ "description", new ObjectEnterspeedProperty(
new Dictionary<string, IEnterspeedProperty>
{
{ "en_US", new StringEnterspeedProperty("Test product description") },
{ "de_DE", new StringEnterspeedProperty("Produktbeschreibung testen1") }
}
) }
}
}
var response = enterspeedIngestService.Save(entity);
With V2 you can still do it like in V1 by using the generic version of the EnterspeedEntity
(EnterspeedEntity<IDictionary<string, IEnterspeedProperty>>
).
But you can do way more with V2, below are some examples of what you can do with V2.
Ingesting raw json, e.g. data you have from a file or an API endpoint
var entity = new EnterspeedEntity
{
Id = "my-id",
Type = "test",
Properties = "{\"prop1\": \"value1\", \"prop2\": 2, \"prop3\": { \"prop4\": false } }"
};
Setting properties to a custom object
var entity = new EnterspeedEntity
{
Id = "my-id",
Type = "test",
Properties = myOwnObjectType
};
Using a generic version of EnterspeedEntity
var entity = new EnterspeedEntity<Dictionary<string, object>>
{
Id = "my-id",
Type = "test",
Properties = new Dictionary<string, object>
{
{ "prop1", "value1" },
{ "prop2", 2 },
{ "prop3", new Dictionary<string, object> { {"prop4", false} } }
}
};
entity.Properties.Add("prop5", "value5");
- Reverted back to SDK v1 of the Enterspeed ingest API
- Fixed
Test
method used by connectors like (Umbraco, Sitecore, ...)
- Added support for
AddEnterspeedIngestService
extension method for .net 6 and greater - Simplyfied setup by providing default value for baseUrl (https://api.enterspeed.com)
- Option to ingest a raw json string without having to map it to a entity type
- Updated SDK to use v2 of the Enterspeed ingest API
- Updated dependencies to allow System.Text.Json v7
AddEnterspeedIngestService
moved from namespaceEnterspeed.Source.Sdk.Extensions.NETCore.Setup
toEnterspeed.Source.Sdk.Extensions.Setup
- Added extension methods for dependency injection
- Include Enterspeed System Header with version for this package
- Include response content and errors dictionary from Ingest service
- Fixed task awaiter in the EnterspeedIngestService
- Multi-targeted the SDK for .NET Standard 1.1 and .NET Standard 2.0
- Added IJsonSerializer interface
- Added SystemTextJsonSerializer for .NET Standard 2.0
- Fixed Ingest endpoint path
- Added version number
- Removed /api/
- Added interface for EnterspeedConnection: IEnterspeedConnection.
- Added EnterspeedConfigurationProvider
- Added stylecop
- Removed EnterspeedConfigurationService
- Moved EnterspeedConnection.cs, IngestResponse.cs and Response.cs from Enterspeed.Source.Sdk.Domain.Client namespace to Enterspeed.Source.Sdk.Domain.Connection
- Removed MediaDomain from EnterspeedConfiguration.cs