Giter VIP home page Giter VIP logo

selfpage's Introduction

SelfPage 项目类型 目标框架 开发工具 开发语言

项目地址https://github.com/520xchly/SelfPage.git
src/SelfPage_Service 服务端接口文档描述项目
src/SelfPage_TestWebAPI 服务端测试WepAPI项目

帮助

阅读 帮助文档 方便您快速了解。

NuGet包

接口文档服务src/SelfPage_Service Nuget包所在地址:SelfPage.Nugethttps://www.nuget.org/packages/SelfPage_Service/

快速开始 如何使用接口文档描述服务

1、在你的 Asp.Net Core 2.2 WebApi项目中添加nuget包SelfPage_Service引用,用VS在线搜索nuget包即可。
2、在 WebApi项目的StartUp.cs文件中使用示例代码

app.UseSelfPage(
                //SelfPage配置信息
                opt =>
                {
                    //opt.EndPointPath = "/selfpage";  //配置接口文档路径。如:https://localhost/selfpage
                    opt.AddAuthorizationHeader = true; //接口文档中是否使用身份验证请求头
                    opt.IfUseXmlInfo = true;           //接口文档中是否使用注释信息展示(controller|action)
                    opt.Groups.AddRange(new List<string> { "manage", "v1", "v2" }); //接口分组,可不分组
                }
                ,
                //自定义分组策略,默认无分组策略。返回结果为true代表对应的controller在对应的groupname。
                (groupName, controllerInfo) =>
                {
                    return controllerInfo.ControllerRoute.StartsWith($"{groupName}");
                }
            );

3、运行 WebApi项目,在浏览器中输入: https://localhost/selfpage 即可看到接口文档。

selfpage's People

Contributors

xtjly avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.