python-pyodata icon indicating copy to clipboard operation
python-pyodata copied to clipboard

Be able to turn of "Unsupported Annotation" warning

Open filak-sap opened this issue 6 years ago • 2 comments

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)

filak-sap avatar Aug 13 '19 16:08 filak-sap

@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?

filak-sap avatar Oct 21 '19 04:10 filak-sap

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()
        })

mamiksik avatar Oct 23 '19 12:10 mamiksik