简体   繁体   中英

Generate JSON Schema for ASP.Net Web API

I'm looking to generate JSON Schema for a WebAPI, including documentation from the XML comments. Its primarily so that I can then import that into our API docs (using apiary.io) I've managed to get a workaround solution by adding swagger (and swashbuckle) and then using the raw link on each service - but ideally I'd like something a bit cleaner, that works across all apis (this has to be done per service / controller), and didnt have so many dependencies.

Before I go and look at how swagger is doing this and seeing if it can be extracted, would be good to know if there are existing ways to do this?

是的,您可以依赖于Swagger,并且有一个名为swashbuckle的扩展名,您可以轻松地将其与Web API一起使用,请查看此帖子http://bitoftech.net/2014/08/25/asp-net-web-api-杂乱无章的文档/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM