OData / lab

This repository is for exploring new ideas and developing early prototypes of various OData stacks.
Other
48 stars 59 forks source link

"OData Connected Service" templates are completely broken right now... #81

Closed BrainSlugs83 closed 4 years ago

BrainSlugs83 commented 6 years ago

There's lots of issues with the OData Connected Service tool in Visual Studio. Just trying to generate an API for URLs like "https://outlook.office365.com/api/beta/$metadata" and "https://graph.microsoft.com/beta/$metadata" always fail, regardless of the options you choose.

Additionally, depending on the options chosen, the t4 templates that are generated may contain code that won't even compile (for example, it's missing the proper assembly references, and may specify the CultureInfo parameters for string.Format twice, which is a syntax error, etc.).

Reproduction steps

Try to add a connected OData service to your project; any of the following will totally fail: "https://outlook.office365.com/api/beta/$metadata", "https://graph.microsoft.com/beta/$metadata", and depending on what options you choose, even a simple API may fail, because the t4 code that's generated will contain syntax errors (duplicate parameter names, etc.)

Expected result

I expect to be able to add a functional OData Connected Service to my project.

Actual result

If I include the T4 templates, they will either fail to run with various errors (including assembly reference and syntax errors depending on the options checked), and even upon fixing those, you end up with other null reference errors.

If I don't include the T4 templates, the connected service fails to add with the same error that you get if you were to fix the assembly reference and syntax errors.

Additional detail

This tool has been broken for months. -- The old one for VS 2015 seemed to work alright, but it's gone now, the tool appears to only be available for 2017 now, and it's completely fubar'd.

If I want something to work I end up having to modify the crap out of the .tt and .ttinclude files... and that's sometimes enough to make it work for one endpoint, but not a different endpoint. :(

DanielGoehler commented 6 years ago

I have the same problem.

Pangamma commented 6 years ago

My team has this issue as well.

unchase commented 5 years ago

I fix it in my service version 0.3.9. You can try my Unchase OData ConnectedService for solve this problem.

habbes commented 4 years ago

@BrainSlugs83 @DanielGoehler @Pangamma this issue has been fixed in the latest release of OData Connected Service (0.5.0).

Also note that the OData Connected Service project has moved to its own repository at https://github.com/OData/ODataConnectedService