Open msardana94 opened 3 years ago
You are absolutely right. The current code reads "ABAP Odata annotations" and your service is from SuccessFactors. Honestly, adding support for the SAP attributes to pyodata directly was a bad idea and now we have to find a way how to support different "SAP" namespace URL. It would be nice to have that magically resolved but manual configuration by a programmer would be safer. What do you think?
Thanks for the quick response. Yes I agree that having the ability to pass information such as namespace urls via manual configuration will definitely solve this issue and make the package extensible.
@filak-sap What about having this problem solved same way as our sibling library, odata-library? E.g. sap attributes , namespaces etc. not hardcoded in a model.py but as extension mechanism, with SAP as one possible "metadata-specification lingo" - see https://github.com/SAP/odata-library/tree/master/lib/model/nw/extensions/sap
@phanak-sap Go for it ;)
@phanak-sap but if you have time, I would first finish support for v4 becaus that brings a major redisign of the entire library.
I am using this to extract metadata when I realized the
sap
prefixed attributes are not coming through accurately.Pyodata version: 1.7.0
XML metadata from API for Entity Type
JobApplicationSnapshot_FuncExperience
Api call: https://api4.successfactors.com/odata/v2/JobApplicationSnapshot_FuncExperience/$metadataHere's the code to reproduce the error for above entity:
Expected Output:
After digging into the code, I believe the issue is here. The uri for prefix
sap
that I see in the raw XML data (as shown above) ishttp://www.successfactors.com/edm/sap
.Apologies if I am missing something obvious here. I am still fairly new to XML and successfactors api.