Skip to content

Commit f4c41ce

Browse files
committed
Schema: support XML namespaces used by Northwind
1 parent 3fd0038 commit f4c41ce

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pyodata/v2/model.py

+1
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ def sap_attribute_get_bool(node, attr, default):
909909

910910

911911
NAMESPACES = {
912+
'd': 'http://schemas.microsoft.com/ado/2007/08/dataservices',
912913
'm': 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata',
913914
'sap': 'http://www.sap.com/Protocols/SAPData',
914915
'edmx': 'http://schemas.microsoft.com/ado/2007/06/edmx',

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def metadata():
77
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
88
</edmx:Reference>
99
<edmx:DataServices m:DataServiceVersion="2.0">
10-
<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="EXAMPLE_SRV" xml:lang="en" sap:schema-version="1">
10+
<Schema xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="EXAMPLE_SRV" xml:lang="en" sap:schema-version="1">
1111
<EntityType Name="MasterEntity" sap:content-version="1">
1212
<Key><PropertyRef Name="Key"/></Key>
1313
<Property Name="Key" Type="Edm.String" Nullable="false" sap:unicode="false" sap:label="Key" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>

0 commit comments

Comments
 (0)