webapi 利用webapiHelp和swagger生成接口文档

webapi 利用webapiHelp和swagger生成接口文档。均依赖xml(需容许项目生成注释xml)git

webapiHelp:微软技术自带,仅含有模块、方法、请求-相应参数的注释。web

swagger:除了上述,还能够执行请求、获取响应等json

详细可看代码:https://gitee.com/nlh774/AspNetWebApiStudy   我是分步骤提交git的,因此应该很清楚。api

后期该项目会不断扩充,做为我的持续研究webapi的笔记restful

 

另外,还能够利用vs2017 添加rest api客户端  生成调用方法,我本身写的demo   https://gitee.com/nlh774/AspNetWebApiStudyasp.net

主要参考 https://www.red-gate.com/simple-talk/dotnet/net-development/visual-studio-2017-swagger-building-documenting-web-apis/visual-studio

如下2篇了解便可,没多大用暂时ui

https://code-maze.com/different-ways-consume-restful-api-csharp/.net

https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclientrest

 

webapi目前我我的只是了解阶段,还不能大规模应用。其实我看上的是他的Rest风格+swaggerUI+vs2017“添加rest api客户端“生成调用方法,很是节省开发对接时间。

本人目前对MVC的api熟悉(就是本质是asp.net MVC,只是返回json)

相关文章
相关标签/搜索