tuomur / python-odata

A simple library for read/write access to OData services
MIT License
79 stars 59 forks source link

Code expects metadata to be present at .../$metadata/ instead of .../$metadata (no slash) #22

Open nicenemo opened 6 years ago

nicenemo commented 6 years ago

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: