none
What's the OData Story?

All replies

  • The API Apps platform doesn't really restrict the implementation of your REST API in anyway. So you can definitely use OData. Many capabilities like simple access control and authentication will just work.

    Having said that, we do light up more capabilities if you can provide Swagger 2.0 metadata:

    1. You will be use it in Logic Apps
    2. You will have Auto SDK code gen from VS with our tooling

    If you can manually create Swagger 2.0 metadata to describe your REST API, it will work perfectly.

    Thanks.

    Wednesday, March 25, 2015 6:50 PM
    Owner
  • Thanks for your reply.

    I don't get why OData is not a first class citizen.

    I put a user voice suggestion

    Vote:

    http://feedback.azure.com/forums/287595-api-apps/suggestions/7329905-make-odata-a-first-class-citizen

    Josh

    Thursday, March 26, 2015 1:57 AM
  • My understanding is that App Service designer needs metadata not just to describe APIs but to enforce their constraints. It's not enough to display a label that says you should't connect a GasolinePump to a Toaster, the designer needs to prevent you from doing it. Can OData services provide metadata rich enough for that? Isn't the point of OData not to be restrictive concerning the kinds of inputs and, especially, outputs it provides? And if you could write an OData API that promised to always output electricity instead of gasoline, and had a way to express that promise in metadata, what would you be gaining by using OData?

    Thursday, March 26, 2015 7:06 PM
  • Bennett,

    Not sure about gas and toast, but my OData does indeed output exactly what it's metadata promises.

    What I do know, is that we have many Web API OData endpoints which we'd like to use across multiple WebApp and MobileApp front ends and also maybe design a cloud based resilient workflow - LogicApp - all while sharing easy admin, pub and auth - you know, all the things AppService offers.

    These are MSFT ASP.Net WebAPI projects which expose data in a RESTful way using MSFTs much touted data transfer protocol, OData.  Yet it appears MSFT's chosen metadata agent (swagger) may not play nice with WebAPI OData.

    I just wanna know when that'll be fixed so I benefit from the AppService Platform.

    TIA,

    Josh

    Thursday, March 26, 2015 7:48 PM
  • If you can manually create Swagger 2.0 metadata to describe your REST API, it will work perfectly.

    Guang,

    I'd say it's working less than perfectly.

    I was able to get swagger to work, I think, albeit with changes to route prefixes and my own build of System.Web.Http.OData - both changes required by swagger limitation apparently.

    I was able to view the OData methods in the swagger UI:

    Then I followed Convert and Deploy tutorial and the APIApp did indeed publish successfully.

    Now I get this in the portal:

    For those who cannot read the error message, neither can I.  But the text is here:

    502 - Web server received an invalid response while acting as a gateway or proxy server.

    \r\n

    There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

    Thanks in advance for any help you may be able to provide.

    Josh

    Friday, March 27, 2015 6:00 PM
  • I'm in the same boat as Josh on this one. We use Web API 2.2 OData v4.0 extensively. Swashbuckle V5's (the Swagger helper for Web API) reliance on ApiExplorer for metadata exploration and ApiExplorer's lack of working support for OData controller classes inhibit this path.

    Unfortunately until this is addressed, it is a non-starter for us for API Apps. Sure seems like a great opportunity for someone to unblock others who are facing this same problem.

    Saturday, June 06, 2015 12:00 AM
  • FYI --- Looks like WebAPI OData will have swagger gen in next release (v5.8) - albeit not via swashbuckle.  Get your suggestions in now and they'll may even tweak to your liking by morning:

    https://github.com/OData/WebApi/issues/302

    https://github.com/OData/WebApi/pull/520

    HTH,

    Josh

    Friday, November 13, 2015 7:40 PM
  • I'm in a similar boat as Josh  Charles, however I don't have control of the code that is exposing the OData endpoint. What I want to do is use Azure API Apps & Logic Apps and Flow and Power Apps, etc. to integrate with Dynamics AX (A.K.A. AX7) which publishes OData endpoints for it's entities with the requisite discoverable metadata. However, I want to have a Swagger endpoint to access those entities with the Azure related API tools. Ideally, since it isn't likely on the near-term road map for AX, I would like to have a utility that I can point at an OData metadata endpoint and have it "discover" and create a Swagger file that can be used for Logic Apps or Flow / et al to access the entities at the corresponding data endpoint.

    Any ideas?

    Thanks,

    Tory

    Monday, October 10, 2016 7:29 PM
  • Hey Tony, 

    Lucky for you, with the up-coming launch of Dynamics365, MSFT just released a new bunch of connectors including support for DYN AX:

    https://flow.microsoft.com/en-us/blog/more-september-updates/

    But the hard way is to 'wrap' your AX service endpoint in a WebAPI and then expose swagger from the wrapper service using swashbuckle.  Like this:

    http://mcaconnect.com/blog/how-to-integrate-microsoft-dynamics-ax-with-azure-logic-and-other-apps/

    HTH,

    Josh


    • Edited by joshbooker Monday, October 10, 2016 8:41 PM
    Monday, October 10, 2016 8:35 PM
  • I'm in the same boat as Josh on this one. We use Web API 2.2 OData v4.0 extensively. Swashbuckle V5's (the Swagger helper for Web API) reliance on ApiExplorer for metadata exploration and ApiExplorer's lack of working support for OData controller classes inhibit this path.

    Unfortunately until this is addressed, it is a non-starter for us for API Apps. Sure seems like a great opportunity for someone to unblock others who are facing this same problem.

    Charles,

    For ODatav4, suggest you take a look at this:

    https://github.com/rbeauchamp/Swashbuckle.OData

    HTH,

    Josh

    Monday, October 10, 2016 8:37 PM