-
Notifications
You must be signed in to change notification settings - Fork 9.1k
support odata? #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We definitely need more input here. @allan-d-c, @mkrouwer, @arnos - can any of you pitch in? |
love to see at least some of the querying support. $top, $skip, $orderby would be a big start |
That would be very helpful - in terms of allowing users to "try out" the api. |
I wonder if this is still relevant now. |
Why would it NOT ? Also for support calls for the APi, when a user send a request sample that doesn't work i can keep on going... My point is - it's a webAPI, so what that it has this odata rule set on top of it ? |
Yes, i think we should keep this discussion going. |
Well - here's an example that we were able to put together with some work-arounds http://bit.ly/1CUfOsO kinda works for discovery. Had problems with setting up the available content types, still need to 'expose' custom and transient actions somehow need to provide samples (the default one's don't work with odata, cause referenced properties must be specified as Links, but not embeded as a sub-resource) still need to find a way to 'document' $batch operation' support |
@martys - just to explain, my comment was a misunderstood joke (referring to something that was published outside this forum). I didn't mean to imply it's not really relevant anymore. And thanks for adding your input, every little bit helps. |
We are using Apache olingo implementation for OData project and we want to expose the API docs using swagger. With annotations approach of swagger, swagger is depending on the rest API related annotations like @path for paths and swagger is implemented for the Rest API's even. But OData implementation source would not have annotations like @path and API is different from pure Rest API. Then how can we use swagger with annotations in code for generating docs ? Is it our only choice to write manual json files for exposing docs here ? How we can use swagger for OData implementation ? |
@prashanthpatha - can't say I'm familiar with olingo. If it doesn't use JAX-RS annotations, or basic servlets, you can't use swagger-core with it as-is. I imagine it's possible to write a Reader for it, but don't know anything about that project to say how easy it is. |
@prashanthpatha out of curiosity are use using OLingo v2 or v4? If it's v4 we could also ask the Olingo guys if they want to pitch in On Fri, Apr 24, 2015 at 10:29 AM, Ron notifications@github.com wrote:
|
Hi @martys , Could you please let me know what are the workarounds you have made to make Swagger ON on Odata endpoint. |
Hi, I'm a member of the OASIS OData Technical Committee and currently working on a metadata format for OData services based on JSON Schema. I'm also investigating how to use Swagger for describing OData services, and being a fan of the DRY principle I'd like to do it this way:
Unfortunately this does not work because
Until these obstacles are removed we'd have to
Any ideas on how to work around these obstacles are highly welcome! Thanks in advance! |
@ralfhandl @martys OData/ODataSamples#13 supposedly there is an internal ODATA team tool that generates Swagger for odata WebApi's .... |
Swashbuckle can do swagger for ASP.net WebAPI OData by using this nuget |
@webron should this ticket beeing closed ? to me Odata has followed it s own pattern / way that would be quite difficult to map in OAS , especially all the dynamicity. https://docs.oasis-open.org/odata/odata-json-format/v4.0/odata-json-format-v4.0.html there is a video here about OAS & OData but still i do not see too munch what should be for OAS taskforce here ... |
I’m in favor of closing this issue. Main problems when defining an OData to OpenAPI Mapping were
No. 1 has been improved from OpenAPI 2.0 to 3.0 and is now solved with OpenAPI 3.1. No. 2 has been solved with the Formats registry. No. 3 may be improved in Moonwalk with Context property annotations, until then we live with the fact that the generated OpenAPI documents can easily have ten times the size of OData's native API descriptions. No. 4 is acceptable, OData-specific query options are described as |
Thanks, @ralfhandl - this sounds like it's worth closing. Anyone wanting to address No. 4 in more detail should follow #1502 which would provide a way to do that. |
There are many parts of oData that can be supported by swagger easily. Worth investigating if the nuances are added to the future spec.
The text was updated successfully, but these errors were encountered: