False invalid schema status + invalid errors thrown for service with multiple annotations to same target
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 268
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the metadata file linked in the issue and search for Target="FAR_MANAGE_PAYMENT_ADVICES_SRV.C_PaymentAdviceType/PaymentAdviceAccount". Trace the pyodata validator handling annotations with that target and reproduce the service initialization using pyodata 1.7.0. Done means the service accepts multiple annotations for one target without reporting an invalid schema or throwing invalid errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100