OpenUI5 Support for OData v4? - odata

I was trying to use OpenUI5 with a .NET OData v4 Web API service. It looks like the client embeds the "Max OData Service Version" header with the HTTP request by default and my service doesn't like that. Additionally, documentation notes support for v2 experimental v3.
Does anyone know when support for v4 is expected?
Thanks so much!

There are people working on the v4 support, but don't expect it to be available in the next few months.
Currently a new version of the v2 model is being implemented that has performance optimizations and better batch support, after that one is finished I guess the v4 support will be an important part of the agenda.

OData V4 finaly just got released.
https://sapui5.netweaver.ondemand.com/sdk#docs/api/symbols/sap.ui.model.odata.v4.ODataModel.html
But keep in mind what Jens Ittel said:
[...] Due to its limited feature scope, we will not recommend to use
the first of these releases of the model implementation for productive
usage. [...]

Related

Olingo - OData Help needed?

Am pretty new to OData.
Per my internet reading what I've gathered is Apache Olingo is better (vs OData4j) for Java implementation of OData service and OData consumer.
Can you please help me with sample code of Olingo service and Olingo consumer?
Any help in this regard is much appreciated.
Have a good one.
Thanks.
First you'll want to consult Olingo's documentation here. Their documentation is alright for basics but once you start extending it there's not much out there. As you can tell from no one answering this for 18 hours OData doesn't seem to be a hot topic right now.
If you want to create a basic service without JPA this is a good resource: OData Service with Olingo
If you want to create an OData service that uses JPA this is a good resource: OData JPA Web App. Also this one is helpful Olingo OData with MySQL.
Here's a document on how to create a client: Olingo Client We actually use Excel as a client which is quite nice for Excel users. However, there are times when Excel has compatibility issues with certain features (EDM Complex Types). Here's some good documentation on how to use Excel and OData

How to document OData endpoints (swagger, swashbuckle, other)?

What is the best way of documenting OData endpoints?
Is there a way to use Swashbuckle for it?
Yes, try Swashbuckle.OData. It adds Swashbuckle support for ODataControllers.
See it in action here: http://swashbuckleodata.azurewebsites.net/swagger
Yes, we are trying to support it like yaml -> Swagger, yaml -> csdl ..
But it will need time to implementation, you can see a prototype and track there https://github.com/OData/model-first
I actually got something working for this using the IDocumentFilter function within Swashbuckle. I answered a similar question on the GitHub repo for Swashbuckle. Check out my response here (it's either at bottom or toward bottom):
https://github.com/domaindrivendev/Swashbuckle/issues/149
I've posted an example of a working IDocumentFilter implementation that you could leverage to get your OData endpoint set up in the Swagger ui.
Asp NET and Asp NET Core Api Versioning
You can use Api Versioning (as it extends ApiExplorer with Odata information) for both WebApi and AspNetCore.
There are samples available for both:
WebApi
Asp Net Core
This sample how it integrates well with Swashbuckle/Swagger ui.
The easiest way to do that I found is to convert OData definition to Open API spec using https://github.com/oasis-tcs/odata-openapi
Then import the spec document into swagger is very easy.

sample app to illustrate use of OData in NancyFx

I am developing a sample app to illustrate use of OData in my application(NancyFx based).
Can any one help in get started with this.
First, I'm not familiar with NanchFx. As far as I know, it is a different framework to build Web application than Web API.
Second, what do you mean a "sample app" ? Is that a app to build an OData service or to consume a OData service? If it's for server side, maybe you need to get started with ODataLib. If it's for consuming, then maybe a little bit more options like OData client for .NET, OData client code generator, and other JavaScript library supporting OData like JayData, Olingo ODataJS, Breeze, etc. HTH

Rest API V1 No longer Active

I'm using a twitter API to fetch latest tweets from some person.
It was working well until 16 June 2013.
But now it gives me error - "410 error - rest api v1 not active" while fetching tweets.
Can anyone please help me out to migrate api version 1.1 over 1.0?
or
any other solution
Thanks
I never worked with twitter http api directly. If your twitter codebase is small then you can refactor your code by using a library or implementing some kind of abstraction to make migration to later minor API changes less painful.
As I can see from this article migration seems pretty straightforward. You should always authenticate your requests for all API calls.
API v1 was retired recently, as outlined here. To get up and running again, look at the changes from 1.0 to 1.1 here or here.

Aspnet Web Api - data contract and operations [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
ASP.NET web api: documenting/specifying a service
I'm new to Asp.net Web API. It seems there is no formal definition of the input and outputs for the Web APIs, unlike SOAP-based ones where a WSDL document contains all the schema required for requests and responses to the service. I am very familiar to this concept due to my past experiences in WCF.
How a client knows how to consume those APIs ? Does we need to provide 'examples' ?
I think your best bet is to go for ASP.NET Web API Help Page nuget package - http://nuget.org/packages/Microsoft.AspNet.WebApi.HelpPage. It's been released the same day as Web API RTM was released, that's why there is no so much info on the web about it yet, and why most people would still point you to IApiExplorer.
There is a really nice introduction screencast by Yao Huang from MSFT about how to use it - http://blogs.msdn.com/b/yaohuang1/archive/2012/08/15/introducing-the-asp-net-web-api-help-page-preview.aspx
It's not as low level as IApiExplorer (it operates on top of that) and should be more than fine for most use cases.
Also, if you are building a REST service do not use WSDL. It has not been designed to document REST services, and its much closer to RPC type of API.
ApiExplorer is the way to go for Asp.net Webapi.
Since there is no WSDL or anything for REST Apis that can exactly tell the consuming client about the operations/ contract exposed. Webapi had IApiExplorer that can be used for generating documentation of your api

Resources