I have encountered an error while creating a service using graphman,
"errors": [
{
"message": "Exception while fetching data (/setServices) : Unable to set the property of the bean com.l7tech.policy.assertion.HttpRoutingAssertion.omitAuthHeaderConnectReuseSystemDefault",
"locations": [
{
"line": 4,
"column": 5
}
],
"path": [
"setServices"
],
"extensions": {
"classification": "DataFetchingException"
}
},
{
"message": "Rolled back the transaction due to errors"
}
]
}
If I remove "omitAuthHeaderConnectReuseSystemDefault":true from the JSON, it works fine. But why is this attribute breaking Graphman?
11.1
The issue you’re running into comes from how GraphMan serializes vs. deserializes policy assertion properties.
In the XML policy you pasted into Policy Manager, the element
exists as a boxedBooleanValue attribute.
When you export with GraphMan (policy { json }), that field gets flattened into:
setServices, GraphMan attempts to map that JSON key onto a Java bean property inside the HttpRoutingAssertion class (com.l7tech.policy.assertion.HttpRoutingAssertion).That bean doesn’t actually have a writable property called omitAuthHeaderConnectReuseSystemDefault. Instead, it only recognizes the OmitAuthHeaderConnectReuseSystemDefault sub-assertion as a nested element (with boxedBooleanValue), not as a simple boolean property.
That's why you see that error of "Unable to set the property of the bean"
When you strip the omitAuthHeaderConnectReuseSystemDefault field, GraphMan no longer tries to bind it to a nonexistent bean property — so the rest of the assertion deserializes fine.
That is why the only work around is to have "omitAuthHeaderConnectReuseSystemDefault":true