so no one wants to support Swagger / OData so will OData just die as no one seems to want to support it for real world use.
âš Do not edit this section. It is required for docs.microsoft.com âžź GitHub issue linking.
I wrote https://docs.microsoft.com/en-us/odata/webapi/odata-expand and have another in PR.
Doesn’t OData have its own metadata description format? There are OData extension libraries for Swashbuckle/NSwag but it might be conceptually problematic to use OAI for OData because the response contract is not static but changes dynamically depending on the input parameters.
Btw: The modern replacement of OData is GraphQL and not OpenAPI. I’d say they are conceptually the same but it seems that the community “decided” that GraphQL is the winner...
some interesting replies...
i do not see how GraphQL replaces OData, but i will do some research.
the first few things i found seem to be saying that GraphQL lacks some features that OData has.
also as far as Odata and OpenAPI - swashbuckle with the Odata extension works fine in classic .net web api's.
it is my understanding that OpenAPI is just an update to Swagger , yes the OData reply is dynamic but the ability to describe the api calls is the most needed item, and the reply is based on the tables in the entity model. at a minium all you need is to show the primary table structure.
some info for anyone who needs to make this work:
i found a sample on github that makes swashbuckle for asp.net core and Odata work:
https://github.com/tizianovicentini/SwaggerAndODataWithDotNetCore3
no need to get the swashbuckle odata extension. just a few hacks in the setup.
some info for anyone who needs to make this work:
i found a sample on github that makes swashbuckle for asp.net core and Odata work:
https://github.com/tizianovicentini/SwaggerAndODataWithDotNetCore3no need to get the swashbuckle odata extension. just a few hacks in the setup.
With this, the swagger ui can render properly for web api controllers instead of throwing error. But still, it will not render the odata controller. I think it is the best we can have for now.
There is this library https://github.com/microsoft/openapi.net.odata which will generate OpenAPI descriptions from CSDL. We are using it extensively to convert Microsoft Graph to OpenAPI to drive AutoREST PowerShell generation
Most helpful comment
There is this library https://github.com/microsoft/openapi.net.odata which will generate OpenAPI descriptions from CSDL. We are using it extensively to convert Microsoft Graph to OpenAPI to drive AutoREST PowerShell generation