apazureck / odatatools

OData Tools for vscode
24 stars 12 forks source link

Creating Interfaces from OData v4.0 Service - Errors Out #22

Closed lelong37 closed 6 years ago

lelong37 commented 6 years ago

OData Endpoint has been made public, so you can see exactly what the behavior is.

OData Endpoint: http://longle.azurewebsites.net/odata/$metadata

Having issues creating Interfaces with command: "Creating Interfaces from OData v4.0 Service" Editor content after running command: /** Created by odatatools: https://marketplace.visualstudio.com/items?itemName=apazureck.odatatools Use Command 'odata: xyUpdate to refresh data while this file is active in the editor. Creation Time: Mon Oct 02 2017 14:12:03 GMT-0500 (Central Daylight Time) DO NOT DELETE THIS IN ORDER TO UPDATE YOUR SERVICE

ODATATOOLSOPTIONS

{ "source": "http://longle.azurewebsites.net/odata/$metadata", "requestOptions": {} }

ODATATOOLSOPTIONSEND

**/

Output Window:

image

@TonySneed

apazureck commented 6 years ago

Hi,

I had a look at your metadata and it seems to be Version 3:

edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0"

My $metadata starts with:

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" 
    xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
    <edmx:DataServices>
        <Schema Namespace="defaultnamespace" 
            xmlns="http://docs.oasis-open.org/odata/ns/edm">

Sadly I did not have the time so far to have a look at OData V3, but if I could use your metadata I may be able to cook something up the coming week, at least for interface extraction, which seems pretty close to OData V4.

tonysneed commented 6 years ago

I think @lelong37 discovered that the public metadata endpoint is v3 but should rather be v4.

lelong37 commented 6 years ago

Thanks @tonysneed closing this one out.