python-pyodata
python-pyodata copied to clipboard
Be able to turn of "Unsupported Annotation" warning
That warning is useful only for Metadata validation purposes when you need to make sure all your Annontations were checked.
Example:
WARNING:pyodata.model:Unsupported Annotation(Common.SemanticKey)
WARNING:pyodata.model:Unsupported Annotation(Common.SemanticObject)
WARNING:pyodata.model:Unsupported Annotation(UI.HeaderInfo)
@mamiksik I was under the impression that this issue was fixed few months ago. What's the status of error policies? Can we configure policies to ignore this particular warning?
Yes, you can. By setting the custom_error_policies property. For example:
custom_config = Config(
xml_namespaces=namespaces,
default_error_policy=PolicyFatal(),
custom_error_policies={
ParserError.ANNOTATION: PolicyIgnore(),
ParserError.ASSOCIATION: PolicyWarning()
})