November Happy Hour will be moved to Thursday December 5th.

service api 5.0.0 doesn't work work with fields like iList<xxx> anymore ?

Vote:
 

public class ActionTag
{
   public string Tag { get; set; }
}

[PropertyDefinitionTypePlugIn]
public class ActionTagProperty : PropertyList
{
}

[Display(Name = "Action Tags",

Order = 10)]
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor))]
[BackingType(typeof(ActionTagProperty))]
public virtual IList ActionTags { get; set; }

service API : GET /episerverapi/commerce/entries/{Code} results in 

{"Name":"ActionTags","Type":"LongString","Data":[{"Language":"en-GB","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"de","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"de-AT","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"de-CH","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"de-LU","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"fr","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"fr-BE","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"fr-CH","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"fr-LU","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"nl","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"},{"Language":"nl-BE","Value":"System.Collections.ObjectModel.ReadOnlyCollection`1[EpiWebsite.Models.Commerce.PropertyType.ActionTag]"}]},

service api : POST /episerverapi/commerce/entries" results in exception

EPiServer.Core.InvalidPropertyValueException: "[]" is not a valid value for "ActionTag". --->

System.ArgumentException: Property value must implement IList or IEnumerable.
Parameter name: value

#194227
Edited, Jun 16, 2018 13:34
Vote:
 

It is supposed to continue working - we will look into this ASAP. Thanks for bringing this into our attention 

#194235
Jun 17, 2018 9:52
Vote:
 

The problem will be addressed in ServiceAPI 5.0.1

#194263
Jun 18, 2018 12:56
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.