contentful.net
contentful.net copied to clipboard
Fix SrcDoc serialization for UI extension
CreateExtension request fails is SrcDoc provided:
contentfulManagementClient.CreateExtension(new UiExtension{
FieldTypes = new List<string>(),
Name = "The Extension",
SrcDoc = "test",
Sidebar = true
});
Post request payload:
{
"extension": {
"srcDoc": "test",
"name": "The Extension",
"fieldTypes": [],
"sidebar": true
}
}
Error:
Contentful.Core.Errors.ContentfulException: Validation error[
{
"name": "unexpected",
"details": "The property \"srcDoc\" is not expected",
"path": [
"extension",
"srcDoc"
]
},
{
"name": "required",
"details": "The property \"src\" is required here",
"path": [
"extension",
"src"
]
},
{
"name": "required",
"details": "The property \"srcdoc\" is required here",
"path": [
"extension",
"srcdoc"
]
},
{
"name": "unless",
"details": "The property \"src\" or \"srcdoc\" are required here",
"path": [
"extension"
]
}
]
Hi @mrkosima thanks for the contribution. I will have a look and get back to you.
hey @Roblinde, kindly remind you to check the PR :)