Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to turn of "Unsupported Annotation" warning #47

Open
filak-sap opened this issue Aug 13, 2019 · 2 comments
Open

Be able to turn of "Unsupported Annotation" warning #47

filak-sap opened this issue Aug 13, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@filak-sap
Copy link
Contributor

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 filak-sap added the enhancement New feature or request label Aug 23, 2019
@filak-sap
Copy link
Contributor Author

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

@mamiksik
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants