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

False invalid schema status + invalid errors thrown for service with multiple annotations to same target #142

Open
phanak-sap opened this issue Jan 28, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@phanak-sap
Copy link
Contributor

phanak-sap commented Jan 28, 2021

This issue is reproducible with pyodata 1.7.0 and metadata file in https://github.com/phanak-sap/pyodata-issue-files/tree/master/%23142

Root cause is that multiple annotations having same target, which is OK by odata standard. Search Target="FAR_MANAGE_PAYMENT_ADVICES_SRV.C_PaymentAdviceType/PaymentAdviceAccount" in the metadata file.

Pyodata validator wrongly expects 0..1 relationship only.

Possible solutions:
A) fix the validation for 0..* relationships
B) ignore the validation of annotations completely (since there could be literally anything, including other annotation definition), similar to our JS counterpart library, https://github.com/SAP/odata-library - where the service is initialized without problem.

@phanak-sap phanak-sap added the bug Something isn't working label Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant