AI OnAI Off
I believe you can use the expand property of ConverterContext to control it, something like
new ConverterContext(currentVariantProduct.ContentLink, language, contentApiOptions, ContextMode.Default, null, "*", false));
expand = "*" means expand all. otherwise it's matching property names (I think)
It's actually FlattenPropertyModel
that controls this:
new ConverterContext(
currentVariantProduct.ContentLink,
language,
new ContentApiOptions
{
FlattenPropertyModel = true
},
ContextMode.Default,
null,
null,
false);
Hi all,
I am currently working on creating a custom endpoint which would return a a list of IContentApiModel. Now I was able to convert my content to a IContentApiModel using the following statement:
Now When I returned the productContentApiModel from the api I noticed that the properties for the content are returned inside of a property called "properties". This is different from the response coming back from the content delivery api where the properties are flattend into the object itself and not inside the "properties" property. What changes do I need to have my properties returned outside of the "properties" property? Is there a step I'm missing in my code above?
Please note the contentApiOptions are injected into my service and it's the same options used by the content delivery api.
Any help is appreciated.