python-odata
python-odata copied to clipboard
Code expects metadata to be present at .../$metadata/ instead of .../$metadata (no slash)
According to the OData specification $metadata urls should work without trailing '/'. They may also work with trailing slash.
4.1 Addressing the Model for a Service
OData services expose their entity
model according to OData-CSDL at the metadata URL, formed by
appending $metadata to the service root URL
Example 5: Metadata document URL
http://host/service/$metadata
OData services MAY expose their entity model as a service, according to [OData-CSDL], by appending a trailing slash (/) to the metadata document URL.
Example 6: Metadata service root URL
http://host/service/$metadata/
Olingo Odata services for example do not have the trailing '/' in their $metadata url.
I forked your repo and fixed that. I did not fix the unit test yet. Do you want a pull request?
Fixes:
- https://github.com/nicenemo/python-odata/commit/cf980c2f55f43b553f54193fda16cfa2a8942e96
- https://github.com/nicenemo/python-odata/commit/c814e95f07433dcfe817634c50c5dcded7aa60a5