Open joshbooker opened 9 years ago
We have a internal tool to generate swagger file from OData model. We'll publish the tool in GitHub soon.
Thanks for your reply. Any update on when this tool will be published?
@bixu-ms Hi, did you upload the tool you mentionned ?? Thanks a lot
@bixu-ms When will you upload the tool you mentioned?
@fabm22 & @OzBob The internal tool is here: https://github.com/OData/lab/blob/master/odata2swagger It would be swell if this made it into WebAPI OData.
@joshbooker FYI, I have added Swashbuckle support for OData v4.0. Try out Swashbuckle.OData.
And see it in action here: http://swashbuckleodata.azurewebsites.net/swagger
Feedback is welcome.
@rbeauchamp-lendingtree @rbeauchamp Nice! Hope WebAPI will build https://github.com/rbeauchamp/Swashbuckle.OData into their implementation https://github.com/OData/WebApi/issues/302 https://github.com/OData/WebApi/pull/520 https://github.com/OData/WebApi/pull/552
@rbeauchamp-lendingtree I have not checked latest, but last time I was trying the code, I think the $filter param was missing from the swagger UI to test the REST API. Oh I think I see the filter on the demo page.. How are things going on that?
@chauey The demo page runs against the latest code, so a $filter param should be available to you too from the latest NuGet package.
This project from Microsoft can generate OpenAPI document from OData CSDL: https://github.com/microsoft/OpenAPI.NET.OData
public static void GenerateOpenApiDescription()
{
IEdmModel model = GetEdmModel();
OpenApiConvertSettings settings = new OpenApiConvertSettings
{
// configuration
};
OpenApiDocument document = model.ConvertToOpenApi(settings);
var outputJSON = document.SerializeAsJson(OpenApiSpecVersion.OpenApi3_0);
var outputYAML = document.SerializeAsYaml(OpenApiSpecVersion.OpenApi3_0);
}
How did you generate swagger trippin.json for OData?
We need a tool for this, like OData swagger generator, so any WebAPI OData project can easily be used in Azure AppService.
More info:
https://github.com/OData/WebApi/issues/278
https://social.msdn.microsoft.com/Forums/en-US/7363e392-86d8-4b60-99fd-af98e128ab06/whats-the-odata-story?forum=AzureAPIApps