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

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

Open phanak-sap opened this issue 4 years ago • 0 comments

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 avatar Jan 28 '21 09:01 phanak-sap