"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[2583],{5174:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>a,default:()=>j,frontMatter:()=>d,metadata:()=>h,toc:()=>x});var i=r(5893),s=r(1151),c=r(510),l=r(4996),o=r(5162),t=r(4866);const d={id:"specification-document",title:"6. \u89c4\u8303\u5316\u63a5\u53e3\u6587\u6863",sidebar_label:"6. \u89c4\u8303\u5316\u63a5\u53e3\u6587\u6863 (Swagger)"},a=void 0,h={id:"specification-document",title:"6. \u89c4\u8303\u5316\u63a5\u53e3\u6587\u6863",description:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7",source:"@site/docs/specification-document.mdx",sourceDirName:".",slug:"/specification-document",permalink:"/docs/specification-document",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/specification-document.mdx",tags:[],version:"current",lastUpdatedBy:"\u767e\u5c0f\u50e7",lastUpdatedAt:1700660755,formattedLastUpdatedAt:"Nov 22, 2023",frontMatter:{id:"specification-document",title:"6. \u89c4\u8303\u5316\u63a5\u53e3\u6587\u6863",sidebar_label:"6. \u89c4\u8303\u5316\u63a5\u53e3\u6587\u6863 (Swagger)"},sidebar:"docs",previous:{title:"5.6 Vue/React/Angular \u8bf7\u6c42\u4ee3\u7406",permalink:"/docs/clientapi"},next:{title:"7. \u53cb\u597d\u5f02\u5e38\u5904\u7406",permalink:"/docs/friendly-exception"}},u={},x=[{value:"6.1 \u4ec0\u4e48\u662f\u63a5\u53e3\u6587\u6863",id:"61-\u4ec0\u4e48\u662f\u63a5\u53e3\u6587\u6863",level:2},{value:"6.2 \u4e3a\u4ec0\u4e48\u8981\u5199\u63a5\u53e3\u6587\u6863",id:"62-\u4e3a\u4ec0\u4e48\u8981\u5199\u63a5\u53e3\u6587\u6863",level:2},{value:"6.3 \u4e3a\u4ec0\u4e48\u9700\u8981\u89c4\u8303\u5316\u6587\u6863",id:"63-\u4e3a\u4ec0\u4e48\u9700\u8981\u89c4\u8303\u5316\u6587\u6863",level:2},{value:"6.3.1 \u534f\u8bae\u89c4\u8303",id:"631-\u534f\u8bae\u89c4\u8303",level:3},{value:"6.3.2 \u63a5\u53e3\u8def\u5f84\u89c4\u8303",id:"632-\u63a5\u53e3\u8def\u5f84\u89c4\u8303",level:3},{value:"6.3.3 \u7248\u672c\u63a7\u5236\u89c4\u8303",id:"633-\u7248\u672c\u63a7\u5236\u89c4\u8303",level:3},{value:"6.3.4 \u63a5\u53e3\u547d\u540d\u89c4\u8303",id:"634-\u63a5\u53e3\u547d\u540d\u89c4\u8303",level:3},{value:"6.3.5 \u8bf7\u6c42\u53c2\u6570\u89c4\u8303",id:"635-\u8bf7\u6c42\u53c2\u6570\u89c4\u8303",level:3},{value:"6.3.6 \u8fd4\u56de\u6570\u636e\u89c4\u8303",id:"636-\u8fd4\u56de\u6570\u636e\u89c4\u8303",level:3},{value:"6.4 \u4ec0\u4e48\u662f Swagger",id:"64-\u4ec0\u4e48\u662f-swagger",level:2},{value:"6.5 Swagger \u4f7f\u7528",id:"65-swagger-\u4f7f\u7528",level:2},{value:"6.5.1 \u6ce8\u518c\u670d\u52a1",id:"651-\u6ce8\u518c\u670d\u52a1",level:3},{value:"6.5.2 \u9ed8\u8ba4\u5730\u5740",id:"652-\u9ed8\u8ba4\u5730\u5740",level:3},{value:"6.5.3 \u9ed8\u8ba4\u5206\u7ec4",id:"653-\u9ed8\u8ba4\u5206\u7ec4",level:3},{value:"6.5.4 \u6587\u6863\u6ce8\u91ca",id:"654-\u6587\u6863\u6ce8\u91ca",level:3},{value:"6.5.5 \u591a\u5206\u7ec4\u652f\u6301",id:"655-\u591a\u5206\u7ec4\u652f\u6301",level:3},{value:"6.5.6 \u591a\u5206\u7ec4\u6392\u5e8f",id:"656-\u591a\u5206\u7ec4\u6392\u5e8f",level:3},{value:"6.5.7 \u591a\u5206\u7ec4\u4fe1\u606f\u914d\u7f6e",id:"657-\u591a\u5206\u7ec4\u4fe1\u606f\u914d\u7f6e",level:3},{value:"6.5.8 \u63a7\u5236\u5668\u548c\u65b9\u6cd5\u6392\u5e8f",id:"658-\u63a7\u5236\u5668\u548c\u65b9\u6cd5\u6392\u5e8f",level:3},{value:"6.5.9 \u7ec4\u4e2d\u7ec4\uff08\u6807\u7b7e\uff09",id:"659-\u7ec4\u4e2d\u7ec4\u6807\u7b7e",level:3},{value:"\u672a\u8d34\u6807\u7b7e\u4e4b\u524d",id:"\u672a\u8d34\u6807\u7b7e\u4e4b\u524d",level:4},{value:"\u8d34\u6807\u7b7e\u4e4b\u540e",id:"\u8d34\u6807\u7b7e\u4e4b\u540e",level:4},{value:"6.5.10 \u9ed8\u8ba4\u5c55\u5f00\u6240\u6709\u6587\u6863",id:"6510-\u9ed8\u8ba4\u5c55\u5f00\u6240\u6709\u6587\u6863",level:3},{value:"6.5.11 \u914d\u7f6e\u6587\u6863\u6807\u9898",id:"6511-\u914d\u7f6e\u6587\u6863\u6807\u9898",level:3},{value:"6.5.12 \u6388\u6743\u63a7\u5236",id:"6512-\u6388\u6743\u63a7\u5236",level:3},{value:"6.5.13 \u5728\u7ebf\u6d4b\u8bd5",id:"6513-\u5728\u7ebf\u6d4b\u8bd5",level:3},{value:"6.5.14 \u6027\u80fd\u76d1\u89c6 MiniProfiler",id:"6514-\u6027\u80fd\u76d1\u89c6-miniprofiler",level:3},{value:"6.5.15 \u5b9a\u4e49\u63a5\u53e3\u8f93\u51fa\u7c7b\u578b",id:"6515-\u5b9a\u4e49\u63a5\u53e3\u8f93\u51fa\u7c7b\u578b",level:3},{value:"6.5.16 \u9690\u85cf\u7279\u5b9a\u5206\u7ec4",id:"6516-\u9690\u85cf\u7279\u5b9a\u5206\u7ec4",level:3},{value:"6.5.17 \u4e2d\u6587\u4e71\u7801\u95ee\u9898",id:"6517-\u4e2d\u6587\u4e71\u7801\u95ee\u9898",level:3},{value:"6.5.18 \u751f\u4ea7\u73af\u5883\u4e2d\u5173\u95ed Swagger",id:"6518-\u751f\u4ea7\u73af\u5883\u4e2d\u5173\u95ed-swagger",level:3},{value:"6.5.19 \u8bbe\u7f6e Example Value \u9ed8\u8ba4\u503c",id:"6519-\u8bbe\u7f6e-example-value-\u9ed8\u8ba4\u503c",level:3},{value:"6.5.20 \u81ea\u5b9a\u4e49 Swagger \u914d\u7f6e",id:"6520-\u81ea\u5b9a\u4e49-swagger-\u914d\u7f6e",level:3},{value:"6.5.21 \u914d\u7f6e Swagger\u7684 SchemaIds",id:"6521-\u914d\u7f6e-swagger\u7684-schemaids",level:3},{value:"6.5.22 \u81ea\u5b9a\u4e49 swagger.json \u8def\u7531\u6a21\u677f",id:"6522-\u81ea\u5b9a\u4e49-swaggerjson-\u8def\u7531\u6a21\u677f",level:3},{value:"6.5.23 \u5173\u4e8e application/x-www-form-urlencoded \u8bf7\u6c42",id:"6523-\u5173\u4e8e-applicationx-www-form-urlencoded-\u8bf7\u6c42",level:3},{value:"6.5.24 Swagger \u51fa\u73b0 CORS \u95ee\u9898\u89e3\u51b3",id:"6524-swagger-\u51fa\u73b0-cors-\u95ee\u9898\u89e3\u51b3",level:3},{value:"6.5.25 Swagger \u51fa\u73b0\u9ed8\u8ba4 text/xml/text/plain \u53c2\u6570\u95ee\u9898\u89e3\u51b3",id:"6525-swagger-\u51fa\u73b0\u9ed8\u8ba4-textxmltextplain-\u53c2\u6570\u95ee\u9898\u89e3\u51b3",level:3},{value:"6.5.26 Swagger \u591a\u8bed\u8a00\u652f\u6301",id:"6526-swagger-\u591a\u8bed\u8a00\u652f\u6301",level:3},{value:"6.5.27 \u81ea\u5b9a\u4e49\u903b\u8f91\u63a7\u5236 Swagger \u6bcf\u4e00\u4e2a api \u53ef\u89c1\u6027",id:"6527-\u81ea\u5b9a\u4e49\u903b\u8f91\u63a7\u5236-swagger-\u6bcf\u4e00\u4e2a-api-\u53ef\u89c1\u6027",level:3},{value:"6.5.28 \u914d\u7f6e MVC \u63a7\u5236\u5668\u652f\u6301\u89c4\u8303\u5316\u5904\u7406",id:"6528-\u914d\u7f6e-mvc-\u63a7\u5236\u5668\u652f\u6301\u89c4\u8303\u5316\u5904\u7406",level:3},{value:"6.5.29 Swagger \u5237\u65b0\u8bb0\u4f4f\u6388\u6743\u72b6\u6001",id:"6529-swagger-\u5237\u65b0\u8bb0\u4f4f\u6388\u6743\u72b6\u6001",level:3},{value:"6.5.30 \u5e26\u767b\u5f55\u7684 Swagger \u6587\u6863",id:"6530-\u5e26\u767b\u5f55\u7684-swagger-\u6587\u6863",level:3},{value:"\u914d\u7f6e\u8bf4\u660e",id:"\u914d\u7f6e\u8bf4\u660e",level:4},{value:"\u914d\u7f6e\u793a\u4f8b",id:"\u914d\u7f6e\u793a\u4f8b",level:4},{value:"6.5.31 inheritdoc \u5b9e\u73b0\u6ce8\u91ca\u7ee7\u627f",id:"6531-inheritdoc-\u5b9e\u73b0\u6ce8\u91ca\u7ee7\u627f",level:3},{value:"6.5.32 \u542f\u7528 All Groups \u5206\u7ec4\u529f\u80fd",id:"6532-\u542f\u7528-all-groups-\u5206\u7ec4\u529f\u80fd",level:3},{value:"6.5.33 \u63a5\u53e3\u8fc7\u65f6\u63a7\u5236",id:"6533-\u63a5\u53e3\u8fc7\u65f6\u63a7\u5236",level:3},{value:"6.5.34 \u5355\u4e00\u63a5\u53e3\u66f4\u591a\u63cf\u8ff0",id:"6534-\u5355\u4e00\u63a5\u53e3\u66f4\u591a\u63cf\u8ff0",level:3},{value:"6.5.35 Swagger \u5f02\u5e38/\u4e0d\u80fd\u663e\u793a/\u9519\u8bef\u5904\u7406",id:"6535-swagger-\u5f02\u5e38\u4e0d\u80fd\u663e\u793a\u9519\u8bef\u5904\u7406",level:3},{value:"6.5.36 \u81ea\u5b9a\u4e49 Swagger \u7684 SchemaId",id:"6536-\u81ea\u5b9a\u4e49-swagger-\u7684-schemaid",level:3},{value:"6.5.37 \u81ea\u5b9a\u4e49 Swagger \u7684 OperationId",id:"6537-\u81ea\u5b9a\u4e49-swagger-\u7684-operationid",level:3},{value:"6.5.38 Swagger \u63a5\u53e3\u6587\u6863\u652f\u6301\u5b8c\u6574\u7684 Markdown",id:"6538-swagger-\u63a5\u53e3\u6587\u6863\u652f\u6301\u5b8c\u6574\u7684-markdown",level:3},{value:"6.5.39 \u7b2c\u4e09\u65b9 UI \u96c6\u6210\uff0c\u5982 Knife4jUI",id:"6539-\u7b2c\u4e09\u65b9-ui-\u96c6\u6210\u5982-knife4jui",level:3},{value:"6.5.40 \u6dfb\u52a0 Swagger \u8bf7\u6c42\u54cd\u5e94\u62e6\u622a",id:"6540-\u6dfb\u52a0-swagger-\u8bf7\u6c42\u54cd\u5e94\u62e6\u622a",level:3},{value:"6.5.41 \u679a\u4e3e\u7c7b\u578b\u503c",id:"6541-\u679a\u4e3e\u7c7b\u578b\u503c",level:3},{value:"6.6 SpecificationDocumentSettings \u914d\u7f6e",id:"66-specificationdocumentsettings-\u914d\u7f6e",level:2},{value:"6.7 \u7edf\u4e00\u8fd4\u56de\u503c\u6a21\u578b/\u89c4\u8303\u5316\u7ed3\u679c/API \u8fd4\u56de\u503c",id:"67-\u7edf\u4e00\u8fd4\u56de\u503c\u6a21\u578b\u89c4\u8303\u5316\u7ed3\u679capi-\u8fd4\u56de\u503c",level:2},{value:"6.7.1 \u6392\u9664\u89c4\u8303\u5316\u5904\u7406",id:"671-\u6392\u9664\u89c4\u8303\u5316\u5904\u7406",level:3},{value:"6.7.2 \u89c4\u8303\u5316\u7ed3\u679c\u6dfb\u52a0\u989d\u5916\u6570\u636e",id:"672-\u89c4\u8303\u5316\u7ed3\u679c\u6dfb\u52a0\u989d\u5916\u6570\u636e",level:3},{value:"6.7.3 \u81ea\u5b9a\u4e49\u7279\u522b\u63a5\u53e3\u89c4\u8303\u5316\u7ed3\u679c",id:"673-\u81ea\u5b9a\u4e49\u7279\u522b\u63a5\u53e3\u89c4\u8303\u5316\u7ed3\u679c",level:3},{value:"6.8 \u652f\u6301\u591a\u5957\u89c4\u8303\u5316\u914d\u7f6e",id:"68-\u652f\u6301\u591a\u5957\u89c4\u8303\u5316\u914d\u7f6e",level:2},{value:"6.9 \u9488\u5bf9\u7279\u5b9a\u63a7\u5236\u5668\u6216\u7279\u5b9a\u65b9\u6cd5\u914d\u7f6e\u5e8f\u5217\u5316\u9009\u9879",id:"69-\u9488\u5bf9\u7279\u5b9a\u63a7\u5236\u5668\u6216\u7279\u5b9a\u65b9\u6cd5\u914d\u7f6e\u5e8f\u5217\u5316\u9009\u9879",level:2},{value:"6.9.1 \u901a\u8fc7 JsonResult \u8bbe\u7f6e\u7b2c\u4e8c\u4e2a\u53c2\u6570",id:"691-\u901a\u8fc7-jsonresult-\u8bbe\u7f6e\u7b2c\u4e8c\u4e2a\u53c2\u6570",level:3},{value:"6.9.2 \u6ce8\u518c\u591a\u5957\u5e8f\u5217\u5316\u914d\u7f6e\u9009\u9879 (\u63a8\u8350)",id:"692-\u6ce8\u518c\u591a\u5957\u5e8f\u5217\u5316\u914d\u7f6e\u9009\u9879-\u63a8\u8350",level:3},{value:"6.10 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"610-\u53cd\u9988\u4e0e\u5efa\u8bae",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r,{children:[(0,i.jsx)("summary",{children:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7"}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u65b0\u7279\u6027"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u65b0\u589e"})," \u89c4\u8303\u5316\u5904\u7406\u81ea\u52a8\u8fc7\u6ee4 ",(0,i.jsx)(n.code,{children:"SSE"})," \u8bf7\u6c42\u3001\u6587\u4ef6\u8bf7\u6c42\u3001\u56fe\u7247\u8bf7\u6c42 ",(0,i.jsx)("sup",{children:"4.9.1.6"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.11.22"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I8IP6D",children:"#I8IP6D"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u65b0\u589e"})," \u89c4\u8303\u5316\u6587\u6863\u679a\u4e3e\u652f\u6301 ",(0,i.jsx)(n.code,{children:"[EnumToNumber]"})," \u7279\u6027\u914d\u7f6e\u751f\u6210\u524d\u7aef\u679a\u4e3e\u5b9a\u4e49\u4ee3\u7801\u662f\u5b57\u7b26\u4e32\u503c\u8fd8\u662f\u6574\u6570\u503c\u7c7b\u578b\uff0c\u9ed8\u8ba4\u4e3a\u5b57\u7b26\u4e32\u503c ",(0,i.jsx)("sup",{children:"4.8.8.35"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.07.06"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7IZ7S",children:"#I7IZ7S"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u65b0\u589e"})," ",(0,i.jsx)(n.code,{children:"Swagger"})," \u5206\u7ec4\u4fe1\u606f\u53ef\u5728\u4efb\u610f\u914d\u7f6e\u6587\u4ef6\u4e2d\u901a\u8fc7 ",(0,i.jsx)(n.code,{children:"[openapi:\u5206\u7ec4\u540d]"})," \u8fdb\u884c\u914d\u7f6e ",(0,i.jsx)("sup",{children:"4.8.8.26"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.06.20"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/a70eed3ec5f3081fbdc08312fdb4770f39f27cc0",children:"a70eed3"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u65b0\u589e"})," ",(0,i.jsx)(n.code,{children:"Swagger"})," \u8bf7\u6c42\u6388\u6743\u5931\u8d25\u540e\u81ea\u52a8\u9000\u51fa\u6388\u6743\u72b6\u6001 ",(0,i.jsx)("sup",{children:"4.8.6.12"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.02.20"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/717",children:"!717"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u65b0\u589e"})," ",(0,i.jsx)(n.code,{children:"Swagger"})," \u542f\u7528\u767b\u5f55\u540e\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"CheckUrl"})," \u53ef\u83b7\u53d6\u672c\u5730\u5b58\u50a8\u7684 ",(0,i.jsx)(n.code,{children:"Authorization"})," \u8bf7\u6c42\u62a5\u6587\u5934 ",(0,i.jsx)("sup",{children:"4.8.6.2"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.02.10"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6E3LB",children:"#I6E3LB"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u65b0\u589e"})," ",(0,i.jsx)(n.code,{children:"Swagger"})," \u652f\u6301\u590d\u5236\u8def\u7531\u5730\u5740\u529f\u80fd ",(0,i.jsx)("sup",{children:"4.8.4.13"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.01.11"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I5VNJI",children:"#I5VNJI"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u95ee\u9898\u4fee\u590d"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," ",(0,i.jsx)(n.code,{children:"Swagger"})," \u8fdb\u884c\u5206\u7ec4\u540e ",(0,i.jsx)(n.code,{children:"Tags"})," \u4e0d\u80fd\u8fdb\u884c\u5206\u7ec4\u8fc7\u6ee4\u95ee\u9898 ",(0,i.jsx)("sup",{children:"4.8.8.22"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.05.25"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I78A55",children:"#I78A55"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," \u56e0 ",(0,i.jsx)(n.code,{children:"4.8.7.22"})," \u7248\u672c\u5bfc\u81f4\u52a8\u6001 ",(0,i.jsx)(n.code,{children:"WebAPI"})," \u7c7b\u578b\u6ce8\u91ca\u4e22\u5931\u95ee\u9898 ",(0,i.jsx)("sup",{children:"4.8.7.27"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.03.29"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6QM23",children:"#I6QM23"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," ",(0,i.jsx)(n.code,{children:"Swagger UI"})," \u4e0d\u663e\u793a ",(0,i.jsx)(n.code,{children:"ControllerBase"})," \u6d3e\u751f\u7c7b\u6ce8\u91ca ",(0,i.jsx)("sup",{children:"4.8.7.22"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.03.27"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6QM23",children:"#I6QM23"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," \u542f\u7528\u89c4\u8303\u5316\u7ed3\u679c\u540e\u5bfc\u81f4 ",(0,i.jsx)(n.code,{children:"WebSocket"})," \u8fde\u63a5\u65ad\u5f00\u65f6\u51fa\u73b0\u5f02\u5e38 ",(0,i.jsx)("sup",{children:"4.8.7.20"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.03.23"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6PI5E",children:"#I6PI5E"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," ",(0,i.jsx)(n.code,{children:"Swagger"})," \u63a5\u53e3\u6392\u5e8f\u540c\u65f6\u6307\u5b9a ",(0,i.jsx)(n.code,{children:"Tag"})," \u548c ",(0,i.jsx)(n.code,{children:"Order"})," \u4e4b\u540e\u65e0\u6548 ",(0,i.jsx)("sup",{children:"4.8.7.2"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.03.01"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6IQDI",children:"#I6IQDI"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6IP66",children:"#I6IP66"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," \u89c4\u8303\u5316\u7ed3\u679c\u4e0d\u5e26 ",(0,i.jsx)(n.code,{children:"mini-profiler"})," \u7248\u672c\u542f\u52a8\u767b\u5f55 ",(0,i.jsx)(n.code,{children:"UI"})," \u540e\u4e0d\u80fd\u4f20\u9012 ",(0,i.jsx)(n.code,{children:"headers"})," \u95ee\u9898 ",(0,i.jsx)("sup",{children:"4.8.6.11"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.02.20"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6G8IR",children:"#I6G8IR"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," ",(0,i.jsxs)(n.strong,{children:["\u89c4\u8303\u5316\u7ed3\u679c\u4e0d\u652f\u6301 ",(0,i.jsx)(n.code,{children:"OData"})," \u534f\u8bae\u63a7\u5236\u5668"]})," ",(0,i.jsx)("sup",{children:"4.8.5.5"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.02.01"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/571",children:"!571"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u4fee\u590d"})," \u542f\u7528 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u767b\u5f55\u529f\u80fd\u4e4b\u540e\u4e0d\u80fd\u89e6\u53d1\u54cd\u5e94\u62e6\u622a\u5668 ",(0,i.jsx)("sup",{children:"4.8.5.5"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.02.01"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6C9A2",children:"#I6C9A2"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/702",children:"!702"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/703",children:"!703"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u5176\u4ed6\u8c03\u6574"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u8c03\u6574"})," \u89c4\u8303\u5316\u6587\u6863\u679a\u4e3e\u751f\u6210 ",(0,i.jsx)(n.code,{children:"json"})," \u683c\u5f0f\uff0c\u7531 ",(0,i.jsx)(n.code,{children:"int32"})," \u6539\u4e3a ",(0,i.jsx)(n.code,{children:"string"})," ",(0,i.jsx)("sup",{children:"4.8.8.34"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.07.02"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7HOPR",children:"#I7HOPR"})]}),"\n",(0,i.jsxs)(n.li,{children:["\xa0",(0,i.jsx)(c.Z,{children:"\u8c03\u6574"})," \u89c4\u8303\u5316\u6587\u6863\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"Title"})," \u89e3\u6790\u89c4\u5219\uff0c\u4e0d\u518d\u81ea\u52a8\u6dfb\u52a0\u7a7a\u683c ",(0,i.jsx)("sup",{children:"4.8.8.26"})," ",(0,i.jsx)("sup",{children:"\u23f1\ufe0f2023.06.20"})," ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/24b7a4768471d312cbdff6a31739a0d9d4918c83",children:"24b7a47"})]}),"\n"]}),"\n"]}),"\n"]})})})]}),"\n","\n","\n",(0,i.jsx)(n.h2,{id:"61-\u4ec0\u4e48\u662f\u63a5\u53e3\u6587\u6863",children:"6.1 \u4ec0\u4e48\u662f\u63a5\u53e3\u6587\u6863"}),"\n",(0,i.jsx)(n.p,{children:"\u5728\u73b0\u5728\u79fb\u52a8\u4e3a\u738b\u3001\u591a\u7aef\u4e92\u8f85\u3001\u524d\u7aef\u767e\u82b1\u9f50\u653e\u7684\u5f00\u653e\u65f6\u4ee3\uff0c\u4e0d\u518d\u662f\u4e00\u4eba\u5305\u63fd\u5f0f\u5f00\u53d1\uff0c\u5927\u5bb6\u5404\u53f8\u5176\u804c\uff0c\u540e\u7aef\u5de5\u7a0b\u5e08\u8d1f\u8d23\u63a5\u53e3\u5f00\u53d1\uff0c\u524d\u7aef\u8d1f\u8d23\u63a5\u53e3\u8054\u8c03\uff0c\u4e5f\u5c31\u662f\u4e92\u8054\u7f51\u73b0\u5728\u6d41\u884c\u7684\u524d\u540e\u7aef\u5206\u79bb\u67b6\u6784\u3002"}),"\n",(0,i.jsx)(n.p,{children:"\u6240\u4ee5\u5c31\u9700\u8981\u7531\u524d\u540e\u7aef\u5de5\u7a0b\u5e08\u5171\u540c\u5b9a\u4e49\u63a5\u53e3\uff0c\u7f16\u5199\u63a5\u53e3\u6587\u6863\uff0c\u4e4b\u540e\u5927\u5bb6\u6309\u7167\u8fd9\u4e2a\u63a5\u53e3\u6587\u6863\u8fdb\u884c\u5f00\u53d1\u3001\u7ef4\u62a4\u53ca\u5f00\u653e\u7ed9\u7b2c\u4e09\u65b9\u3002"}),"\n",(0,i.jsx)(n.h2,{id:"62-\u4e3a\u4ec0\u4e48\u8981\u5199\u63a5\u53e3\u6587\u6863",children:"6.2 \u4e3a\u4ec0\u4e48\u8981\u5199\u63a5\u53e3\u6587\u6863"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u80fd\u591f\u8ba9\u524d\u7aef\u5f00\u53d1\u4e0e\u540e\u53f0\u5f00\u53d1\u4eba\u5458\u66f4\u597d\u7684\u914d\u5408\uff0c\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387"}),"\n",(0,i.jsx)(n.li,{children:"\u9879\u76ee\u8fed\u4ee3\u6216\u8005\u9879\u76ee\u4eba\u5458\u66f4\u8fed\u65f6\uff0c\u65b9\u4fbf\u540e\u671f\u4eba\u5458\u67e5\u770b\u548c\u7ef4\u62a4"}),"\n",(0,i.jsx)(n.li,{children:"\u65b9\u4fbf\u6d4b\u8bd5\u4eba\u5458\u8fdb\u884c\u63a5\u53e3\u6d4b\u8bd5"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"63-\u4e3a\u4ec0\u4e48\u9700\u8981\u89c4\u8303\u5316\u6587\u6863",children:"6.3 \u4e3a\u4ec0\u4e48\u9700\u8981\u89c4\u8303\u5316\u6587\u6863"}),"\n",(0,i.jsx)(n.p,{children:"\u7531\u4e8e\u6bcf\u4e2a\u516c\u53f8\u540e\u7aef\u4eba\u5458\u6280\u672f\u53c2\u5dee\u4e0d\u9f50\uff0c\u6280\u672f\u6587\u6863\u80fd\u529b\u4e5f\u4e0d\u4f8b\u5916\uff0c\u5bfc\u81f4\u63a5\u53e3\u5b9a\u4e49\u53ca\u6587\u6863\u4e94\u82b1\u516b\u95e8\uff0c\u4e0d\u540c\u9879\u76ee\u6216\u4e0d\u540c\u516c\u53f8\u5bf9\u63a5\u6781\u5176\u56f0\u96be\uff0c\u800c\u4e14\u4f53\u9a8c\u7cdf\u7cd5\u3002\u6240\u4ee5\uff0c\u65e0\u89c4\u77e9\u4e0d\u6210\u65b9\u5706\uff0c\u4e3a\u4e86\u5f00\u53d1\u4eba\u5458\u95f4\u66f4\u597d\u7684\u914d\u5408\uff0c\u8feb\u5207\u9700\u8981\u6574\u7406\u51fa\u4e00\u5957\u89c4\u8303\u3002"}),"\n",(0,i.jsx)(n.p,{children:"\u901a\u5e38\u63a5\u53e3\u89c4\u8303\u5206\u4e3a\u516d\u4e2a\u90e8\u5206\uff1a"}),"\n",(0,i.jsx)(n.h3,{id:"631-\u534f\u8bae\u89c4\u8303",children:"6.3.1 \u534f\u8bae\u89c4\u8303"}),"\n",(0,i.jsx)(n.p,{children:"\u4e3a\u4e86\u786e\u4fdd\u4e0d\u540c\u7cfb\u7edf/\u6a21\u5757\u95f4\u7684\u6570\u636e\u4ea4\u4e92\uff0c\u9700\u8981\u4e8b\u5148\u7ea6\u5b9a\u597d\u901a\u8baf\u534f\u8bae\uff0c\u5982\uff1aTCP\u3001HTTP\u3001HTTPS \u534f\u8bae\u3002\u4e3a\u4e86\u786e\u4fdd\u6570\u636e\u4ea4\u4e92\u5b89\u5168\uff0c\u5efa\u8bae\u4f7f\u7528 HTTPS \u534f\u8bae"}),"\n",(0,i.jsx)(n.h3,{id:"632-\u63a5\u53e3\u8def\u5f84\u89c4\u8303",children:"6.3.2 \u63a5\u53e3\u8def\u5f84\u89c4\u8303"}),"\n",(0,i.jsxs)(n.p,{children:["\u4f5c\u4e3a\u63a5\u53e3\u8def\u5f84\uff0c\u4e3a\u4e86\u65b9\u4fbf\u6e05\u6670\u7684\u533a\u5206\u6765\u81ea\u4e0d\u540c\u7684\u7cfb\u7edf\uff0c\u53ef\u4ee5\u91c7\u7528\u4e0d\u540c\u7cfb\u7edf/\u6a21\u5757\u540d\u4f5c\u4e3a\u63a5\u53e3\u8def\u5f84\u524d\u7f00\uff0c\u5982\uff1a\u652f\u4ed8\u6a21\u5757\uff1a",(0,i.jsx)(n.code,{children:"/pay/xxx"}),"\uff0c\u8ba2\u5355\u6a21\u5757\uff1a",(0,i.jsx)(n.code,{children:"/order/xxx"})]}),"\n",(0,i.jsx)(n.h3,{id:"633-\u7248\u672c\u63a7\u5236\u89c4\u8303",children:"6.3.3 \u7248\u672c\u63a7\u5236\u89c4\u8303"}),"\n",(0,i.jsxs)(n.p,{children:['\u4e3a\u4e86\u4fbf\u4e8e\u540e\u671f\u63a5\u53e3\u7684\u5347\u7ea7\u548c\u7ef4\u62a4\uff0c\u5efa\u8bae\u5728\u63a5\u53e3\u8def\u5f84\u4e2d\u52a0\u5165\u7248\u672c\u53f7\uff0c\u4fbf\u4e8e\u7ba1\u7406\uff0c\u5b9e\u73b0\u63a5\u53e3\u591a\u7248\u672c\u7684\u53ef\u7ef4\u62a4\u6027\u3002\u5982\uff1a\u63a5\u53e3\u8def\u5f84\u4e2d\u6dfb\u52a0\u7c7b\u4f3c"',(0,i.jsx)(n.code,{children:"v1"}),'"\u3001"',(0,i.jsx)(n.code,{children:"v2"}),'"\u7b49\u7248\u672c\u53f7']}),"\n",(0,i.jsx)(n.h3,{id:"634-\u63a5\u53e3\u547d\u540d\u89c4\u8303",children:"6.3.4 \u63a5\u53e3\u547d\u540d\u89c4\u8303"}),"\n",(0,i.jsxs)(n.p,{children:['\u548c C# \u547d\u540d\u89c4\u8303\u4e00\u6837\uff0c\u597d\u7684\u3001\u7edf\u4e00\u7684\u63a5\u53e3\u547d\u540d\u89c4\u8303\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u589e\u5f3a\u5176\u53ef\u8bfb\u6027\uff0c\u800c\u4e14\u8fd8\u4f1a\u51cf\u5c11\u5f88\u591a\u4e0d\u5fc5\u8981\u7684\u53e3\u5934/\u4e66\u9762\u4e0a\u7684\u89e3\u91ca\u3002\u53ef\u4f7f\u7528"\u9a7c\u5cf0\u547d\u540d\u6cd5"\u6309\u7167\u5b9e\u73b0\u63a5\u53e3\u7684',(0,i.jsx)(n.strong,{children:"\u4e1a\u52a1\u7c7b\u578b\u3001\u4e1a\u52a1\u573a\u666f"}),"\u7b49\u547d\u540d\uff0c\u6709\u5fc5\u8981\u65f6\u53ef\u91c7\u53d6\u591a\u7ea7\u76ee\u5f55\u547d\u540d\uff0c\u4f46\u76ee\u5f55\u4e0d\u5b9c\u8fc7\u957f\uff0c\u4e24\u7ea7\u76ee\u5f55\u8f83\u4e3a\u9002\u5b9c"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\u5e38\u89c1\u547d\u540d\u65b9\u5f0f"}),":","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\u63a5\u53e3\u540d\u79f0\u52a8\u8bcd\u524d/\u540e\u7f00\u5316"}),"\uff1a \u63a5\u53e3\u540d\u79f0\u4ee5\u63a5\u53e3\u6570\u636e\u64cd\u4f5c\u7684\u52a8\u8bcd\u4e3a\u524d/\u540e\u7f00\uff0c\u5e38\u89c1\u52a8\u8bcd\u6709\uff1a",(0,i.jsx)(n.code,{children:"Add\u3001Delete\u3001Update\u3001Query\u3001Get\u3001Send\u3001Save\u3001Detail\u3001List"}),"\u7b49\uff0c\u5982\uff1a\u65b0\u5efa\u7528\u6237 ",(0,i.jsx)(n.code,{children:"AddUser"}),"\u3001\u67e5\u8be2\u8ba2\u5355\u8be6\u60c5 ",(0,i.jsx)(n.code,{children:"QueryOrderDetail"}),"\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\u63a5\u53e3\u540d\u79f0\u52a8\u8bcd + \u8bf7\u6c42\u65b9\u5f0f"}),"\uff1a\u63a5\u53e3\u8def\u5f84\u4e2d\u5305\u542b\u5177\u4f53\u63a5\u53e3\u540d\u79f0\u7684\u540d\u8bcd\uff0c\u63a5\u53e3\u6570\u636e\u64cd\u4f5c\u52a8\u4f5c\u4ee5 HTTP \u8bf7\u6c42\u65b9\u5f0f\u6765\u533a\u5206\u3002\u5e38\u7528\u7684 HTTP \u8bf7\u6c42\u65b9\u5f0f\u6709\uff1a","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"GET"}),"\uff1a\u4ece\u670d\u52a1\u5668\u53d6\u51fa\u8d44\u6e90\uff08\u4e00\u9879\u6216\u591a\u9879\uff09"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"POST"}),"\uff1a\u5728\u670d\u52a1\u5668\u65b0\u5efa\u4e00\u4e2a\u8d44\u6e90"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"PUT"}),"\uff1a\u5728\u670d\u52a1\u5668\u66f4\u65b0\u8d44\u6e90\uff08\u5ba2\u6237\u7aef\u63d0\u4f9b\u6539\u53d8\u540e\u7684\u5b8c\u6574\u8d44\u6e90\uff09"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"PATCH"}),"\uff1a\u5728\u670d\u52a1\u5668\u66f4\u65b0\u8d44\u6e90\uff08\u5ba2\u6237\u7aef\u63d0\u4f9b\u6539\u53d8\u7684\u5c5e\u6027\uff09"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"DELETE"}),"\uff1a\u4ece\u670d\u52a1\u5668\u5220\u9664\u8d44\u6e90"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"635-\u8bf7\u6c42\u53c2\u6570\u89c4\u8303",children:"6.3.5 \u8bf7\u6c42\u53c2\u6570\u89c4\u8303"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\u8bf7\u6c42\u65b9\u5f0f"}),"\uff1a\u6309\u7167 ",(0,i.jsx)(n.code,{children:"GET\u3001POST\u3001PUT"})," \u7b49\u542b\u4e49\u5b9a\u4e49\uff0c\u907f\u514d\u51fa\u73b0\u4e0d\u4e00\u81f4\u73b0\u8c61\uff0c\u5bf9\u4eba\u9020\u6210\u8bef\u89e3\u3001\u6b67\u4e49","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\u8bf7\u6c42\u5934"}),"\uff1a\u8bf7\u6c42\u5934\u6839\u636e\u9879\u76ee\u9700\u6c42\u6dfb\u52a0\u914d\u7f6e\u53c2\u6570\u3002\u5982\uff1a\u8bf7\u6c42\u6570\u636e\u683c\u5f0f\uff0c",(0,i.jsx)(n.code,{children:"accept=application/json"})," \u7b49\u3002\u5982\u6709\u9700\u8981\uff0c\u8bf7\u6c42\u5934\u53ef\u6839\u636e\u9879\u76ee\u9700\u6c42\u8981\u6c42\u4f20\u5165\u7528\u6237 token\u3001\u552f\u4e00\u9a8c\u7b7e\u7801\u7b49\u52a0\u5bc6\u6570\u636e"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\u8bf7\u6c42\u53c2\u6570/\u8bf7\u6c42\u4f53"}),"\uff1a \u8bf7\u6c42\u53c2\u6570\u5b57\u6bb5\uff0c\u5c3d\u53ef\u80fd\u4e0e\u6570\u636e\u5e93\u8868\u5b57\u6bb5\u3001\u5bf9\u8c61\u5c5e\u6027\u540d\u7b49\u4fdd\u6301\u4e00\u81f4\uff0c\u56e0\u4e3a\u4fdd\u6301\u4e00\u81f4\u662f\u6700\u7701\u4e8b\uff0c\u6700\u8212\u670d\u7684\u4e00\u4ef6\u4e8b"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"636-\u8fd4\u56de\u6570\u636e\u89c4\u8303",children:"6.3.6 \u8fd4\u56de\u6570\u636e\u89c4\u8303"}),"\n",(0,i.jsxs)(n.p,{children:["\u7edf\u4e00\u89c4\u8303\u8fd4\u56de\u6570\u636e\u7684\u683c\u5f0f\uff0c\u5bf9\u5df1\u5bf9\u5f7c\u90fd\u6709\u597d\u5904\uff0c\u6b64\u5904\u4ee5 json \u683c\u5f0f\u4e3a\u4f8b\u3002\u8fd4\u56de\u6570\u636e\u5e94\u5305\u542b\uff1a",(0,i.jsx)(n.strong,{children:"\u8fd4\u56de\u72b6\u6001\u7801\u3001\u8fd4\u56de\u72b6\u6001\u4fe1\u606f\u3001\u5177\u4f53\u6570\u636e"}),"\u3002",(0,i.jsx)(n.strong,{children:"\u8fd4\u56de\u6570\u636e\u4e2d\u7684\u72b6\u6001\u7801\u3001\u72b6\u6001\u4fe1\u606f\uff0c\u5e38\u6307\u5177\u4f53\u7684\u4e1a\u52a1\u72b6\u6001\uff0c\u4e0d\u5efa\u8bae\u548c HTTP \u72b6\u6001\u7801\u6df7\u5728\u4e00\u8d77"}),"\u3002HTTP \u72b6\u6001\uff0c\u662f\u7528\u6765\u4f53\u73b0 HTTP \u94fe\u8def\u72b6\u6001\u60c5\u51b5\uff0c\u5982\uff1a404-Not Found\u3002HTTP \u72b6\u6001\u7801\u548c json \u7ed3\u679c\u4e2d\u7684\u72b6\u6001\u7801\uff0c\u5e76\u5b58\u5c1a\u53ef\uff0c\u7528\u4e8e\u4f53\u73b0\u4e0d\u540c\u7ef4\u5ea6\u7684\u72b6\u6001\u3002"]}),"\n",(0,i.jsx)(n.h2,{id:"64-\u4ec0\u4e48\u662f-swagger",children:"6.4 \u4ec0\u4e48\u662f Swagger"}),"\n",(0,i.jsx)(n.p,{children:"\u76f8\u4fe1\u65e0\u8bba\u662f\u524d\u7aef\u8fd8\u662f\u540e\u7aef\u5f00\u53d1\uff0c\u90fd\u6216\u591a\u6216\u5c11\u5730\u88ab\u63a5\u53e3\u6587\u6863\u6298\u78e8\u8fc7\u3002\u524d\u7aef\u7ecf\u5e38\u62b1\u6028\u540e\u7aef\u7ed9\u7684\u63a5\u53e3\u6587\u6863\u4e0e\u5b9e\u9645\u60c5\u51b5\u4e0d\u4e00\u81f4\u3002\u540e\u7aef\u53c8\u89c9\u5f97\u7f16\u5199\u53ca\u7ef4\u62a4\u63a5\u53e3\u6587\u6863\u4f1a\u8017\u8d39\u4e0d\u5c11\u7cbe\u529b\uff0c\u7ecf\u5e38\u6765\u4e0d\u53ca\u66f4\u65b0\u3002"}),"\n",(0,i.jsx)(n.p,{children:"\u5176\u5b9e\u65e0\u8bba\u662f\u524d\u7aef\u8c03\u7528\u540e\u7aef\uff0c\u8fd8\u662f\u540e\u7aef\u8c03\u7528\u540e\u7aef\uff0c\u90fd\u671f\u671b\u6709\u4e00\u4e2a\u597d\u7684\u63a5\u53e3\u6587\u6863\u3002\u4f46\u662f\u8fd9\u4e2a\u63a5\u53e3\u6587\u6863\u5bf9\u4e8e\u7a0b\u5e8f\u5458\u6765\u8bf4\uff0c\u5c31\u8ddf\u6ce8\u91ca\u4e00\u6837\uff0c\u7ecf\u5e38\u4f1a\u62b1\u6028\u522b\u4eba\u5199\u7684\u4ee3\u7801\u6ca1\u6709\u5199\u6ce8\u91ca\uff0c\u7136\u800c\u81ea\u5df1\u5199\u8d77\u4ee3\u7801\u8d77\u6765\uff0c\u6700\u8ba8\u538c\u7684\uff0c\u4e5f\u662f\u5199\u6ce8\u91ca\u3002\u6240\u4ee5\u4ec5\u4ec5\u53ea\u901a\u8fc7\u5f3a\u5236\u6765\u89c4\u8303\u5927\u5bb6\u662f\u4e0d\u591f\u7684\uff0c\u968f\u7740\u65f6\u95f4\u63a8\u79fb\uff0c\u7248\u672c\u8fed\u4ee3\uff0c\u63a5\u53e3\u6587\u6863\u5f80\u5f80\u5f88\u5bb9\u6613\u5c31\u8ddf\u4e0d\u4e0a\u4ee3\u7801\u4e86\u3002"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:["\u53d1\u73b0\u4e86\u75db\u70b9\u5c31\u8981\u53bb\u627e\u89e3\u51b3\u65b9\u6848\u3002\u89e3\u51b3\u65b9\u6848\u7528\u7684\u4eba\u591a\u4e86\uff0c\u5c31\u6210\u4e86\u6807\u51c6\u7684\u89c4\u8303\uff0c\u8fd9\u5c31\u662f ",(0,i.jsx)(n.code,{children:"Swagger"})," \u7684\u7531\u6765"]}),"\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u901a\u8fc7\u8fd9\u5957\u89c4\u8303\uff0c\u4f60\u53ea\u9700\u8981\u6309\u7167\u5b83\u7684\u89c4\u8303\u53bb\u5b9a\u4e49\u63a5\u53e3\u53ca\u63a5\u53e3\u76f8\u5173\u7684\u4fe1\u606f\u3002\u518d\u901a\u8fc7 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u884d\u751f\u51fa\u6765\u7684\u4e00\u7cfb\u5217\u9879\u76ee\u548c\u5de5\u5177\uff0c\u5c31\u53ef\u4ee5\u505a\u5230\u751f\u6210\u5404\u79cd\u683c\u5f0f\u7684\u63a5\u53e3\u6587\u6863\uff0c\u751f\u6210\u591a\u79cd\u8bed\u8a00\u7684\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u7684\u4ee3\u7801\uff0c\u4ee5\u53ca\u5728\u7ebf\u63a5\u53e3\u8c03\u8bd5\u9875\u9762\u7b49\u7b49\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u8fd9\u6837\uff0c\u5982\u679c\u6309\u7167\u65b0\u7684\u5f00\u53d1\u6a21\u5f0f\uff0c\u5728\u5f00\u53d1\u65b0\u7248\u672c\u6216\u8005\u8fed\u4ee3\u7248\u672c\u7684\u65f6\u5019\uff0c\u53ea\u9700\u8981\u66f4\u65b0 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u63cf\u8ff0\u6587\u4ef6\uff0c\u5c31\u53ef\u4ee5\u81ea\u52a8\u751f\u6210\u63a5\u53e3\u6587\u6863\u548c\u5ba2\u6237\u7aef\u670d\u52a1\u7aef\u4ee3\u7801\uff0c\u505a\u5230\u8c03\u7528\u7aef\u4ee3\u7801\u3001\u670d\u52a1\u7aef\u4ee3\u7801\u4ee5\u53ca\u63a5\u53e3\u6587\u6863\u7684\u4e00\u81f4\u6027\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u6240\u4ee5\uff0cSwagger \u662f\u4e00\u4e2a\u89c4\u8303\u548c\u5b8c\u6574\u7684\u6846\u67b6\uff0c\u7528\u4e8e\u751f\u6210\u3001\u63cf\u8ff0\u3001\u8c03\u7528\u548c\u53ef\u89c6\u5316",(0,i.jsx)(n.code,{children:"RESTful"})," \u98ce\u683c\u7684 ",(0,i.jsx)(n.code,{children:"Web"})," \u670d\u52a1\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u603b\u4f53\u76ee\u6807\u662f\u4f7f\u5ba2\u6237\u7aef\u548c\u6587\u4ef6\u7cfb\u7edf\u4f5c\u4e3a\u670d\u52a1\u5668\u4ee5\u540c\u6837\u7684\u901f\u5ea6\u6765\u66f4\u65b0\u3002\u6587\u4ef6\u7684\u65b9\u6cd5\u3001\u53c2\u6570\u548c\u6a21\u578b\u7d27\u5bc6\u96c6\u6210\u5230\u670d\u52a1\u5668\u7aef\u7684\u4ee3\u7801\uff0c\u5141\u8bb8 API \u6765\u59cb\u7ec8\u4fdd\u6301\u540c\u6b65\u3002",(0,i.jsx)(n.code,{children:"Swagger"})," \u8ba9\u90e8\u7f72\u7ba1\u7406\u548c\u4f7f\u7528\u529f\u80fd\u5f3a\u5927\u7684 ",(0,i.jsx)(n.code,{children:"API"})," \u4ece\u672a\u5982\u6b64\u7b80\u5355\u3002"]}),"\n",(0,i.jsx)(n.h2,{id:"65-swagger-\u4f7f\u7528",children:"6.5 Swagger \u4f7f\u7528"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u63d0\u4f9b\u4e86\u975e\u5e38\u65b9\u4fbf\u4e14\u7075\u6d3b\u7684 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u914d\u7f6e\uff0c\u65e0\u9700\u589e\u52a0\u989d\u5916\u5b66\u4e60\u6210\u672c\u3002"]}),"\n",(0,i.jsx)(n.h3,{id:"651-\u6ce8\u518c\u670d\u52a1",children:"6.5.1 \u6ce8\u518c\u670d\u52a1"}),"\n",(0,i.jsxs)(n.admonition,{title:"\u5c0f\u63d0\u793a",type:"tip",children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:".AddInject[XXX]()"})," \u5df2\u7ecf\u5305\u542b\u4e86 ",(0,i.jsx)(n.code,{children:".AddSpecificationDocuments()"})," \u6ce8\u518c\uff0c",(0,i.jsx)(n.strong,{children:"\u65e0\u9700\u518d\u6b21\u6ce8\u518c"}),"\u3002"]}),(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:".UseInject()"})," \u5df2\u7ecf\u5305\u542b\u4e86 ",(0,i.jsx)(n.code,{children:".UseSpecificationDocuments()"})," \u6ce8\u518c\uff0c",(0,i.jsx)(n.strong,{children:"\u65e0\u9700\u518d\u6b21\u6ce8\u518c"}),"\u3002"]})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:'showLineNumbers {13,21} title="Furion.Web.Core\\Startup.cs"',children:"using Microsoft.AspNetCore.Builder;\r\nusing Microsoft.AspNetCore.Hosting;\r\nusing Microsoft.Extensions.DependencyInjection;\r\nusing Microsoft.Extensions.Hosting;\r\n\r\nnamespace Furion.Web.Core\r\n{\r\n [AppStartup(800)]\r\n public sealed class FurWebCoreStartup : AppStartup\r\n {\r\n public void ConfigureServices(IServiceCollection services)\r\n {\r\n services.AddSpecificationDocuments();\r\n services.AddControllers();\r\n }\r\n\r\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\r\n {\r\n // Other Codes\r\n\r\n app.UseSpecificationDocuments();\r\n\r\n app.UseEndpoints(endpoints =>\r\n {\r\n endpoints.MapControllers();\r\n });\r\n }\r\n }\r\n}\n"})}),"\n",(0,i.jsx)(n.admonition,{title:"\u5c0f\u77e5\u8bc6",type:"tip",children:(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"services.AddSpecificationDocuments()"})," \u901a\u5e38\u548c ",(0,i.jsx)(n.code,{children:".AddDynamicApiControllers()"})," \u6210\u5bf9\u51fa\u73b0\u3002"]})}),"\n",(0,i.jsx)(n.h3,{id:"652-\u9ed8\u8ba4\u5730\u5740",children:"6.5.2 \u9ed8\u8ba4\u5730\u5740"}),"\n",(0,i.jsxs)(n.p,{children:["\u5728 ",(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u4e2d\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"\u89c4\u8303\u5316\u6587\u6863"})," \u5730\u5740\u4e3a ",(0,i.jsx)(n.code,{children:"/api"})," \u76ee\u5f55\uff0c",(0,i.jsx)(n.strong,{children:"\u652f\u6301\u81ea\u5b9a\u4e49\u914d\u7f6e"}),"\u3002"]}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger1.png")}),"\n",(0,i.jsx)(n.p,{children:"\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u914d\u7f6e\uff1a"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'app.UseInject("\u8def\u7531")'})," \u65b9\u5f0f\uff0c\u5982"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'app.UseInject("testapi"); // \u90a3\u4e48 /testapi \u5c31\u662f\u89c4\u8303\u5316\u5730\u5740\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"\u914d\u7f6e\u6587\u4ef6\u914d\u7f6e"}),"\uff1a"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'{\r\n "SpecificationDocumentSettings": {\r\n "RoutePrefix": "testapi"\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["\u914d\u7f6e\u6587\u4ef6\u4f18\u5148\u7ea7\u5927\u4e8e ",(0,i.jsx)(n.code,{children:"UseInject()"})," \u65b9\u5f0f"]})}),"\n",(0,i.jsx)(n.h3,{id:"653-\u9ed8\u8ba4\u5206\u7ec4",children:"6.5.3 \u9ed8\u8ba4\u5206\u7ec4"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u4e2d\u9ed8\u8ba4\u5206\u7ec4\u540d\u4e3a ",(0,i.jsx)(n.code,{children:"Default"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u652f\u6301\u81ea\u5b9a\u4e49\u914d\u7f6e"}),"\u3002"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'{\r\n "SpecificationDocumentSettings": {\r\n "DefaultGroupName": "MyGroup"\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"654-\u6587\u6863\u6ce8\u91ca",children:"6.5.4 \u6587\u6863\u6ce8\u91ca"}),"\n",(0,i.jsxs)(n.p,{children:["\u89c4\u8303\u5316\u6587\u6863\u9ed8\u8ba4\u626b\u63cf ",(0,i.jsx)(n.code,{children:"Furion.Application"}),"\uff0c",(0,i.jsx)(n.code,{children:"Furion.Web.Core"}),"\uff0c",(0,i.jsx)(n.code,{children:"Furion.Web.Entry"})," \u4e09\u4e2a\u7a0b\u5e8f\u96c6",(0,i.jsx)(n.code,{children:".xml"})," \u6ce8\u91ca\u6587\u4ef6\uff0c",(0,i.jsx)(n.strong,{children:"\u652f\u6301\u81ea\u5b9a\u4e49\u914d\u7f6e"}),"\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u53ea\u652f\u6301 ",(0,i.jsx)(n.code,{children:"///"})," \u6807\u8bc6\u7684\u6ce8\u91ca\u8bed\u6cd5\uff0c\u5982\uff1a",(0,i.jsx)(n.strong,{children:"\u7c7b\u3001\u65b9\u6cd5\u3001\u5c5e\u6027\u3001\u53c2\u6570\u3001\u8fd4\u56de\u503c\u3001\u9a8c\u8bc1\u7279\u6027"}),"\u3002"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5-7,10-13,19-23}",children:'using Furion.DynamicApiController;\r\n\r\nnamespace Furion.Application\r\n{\r\n /// \r\n /// \u7c7b\u6ce8\u91ca\r\n /// \r\n public class FurionAppService : IDynamicApiController\r\n {\r\n /// \r\n /// \u65b9\u6cd5\u6ce8\u91ca\r\n /// \r\n /// \r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n /// \r\n /// \u5e26 ID \u53c2\u6570\u7684\u65b9\u6cd5\u6ce8\u91ca\r\n /// \r\n /// \r\n /// \r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger2.png")}),"\n",(0,i.jsx)(n.admonition,{title:"\u5c0f\u63d0\u793a",type:"note",children:(0,i.jsxs)(n.p,{children:["\u5982\u679c\u6587\u6863\u6ce8\u91ca\u6ca1\u6709\u663e\u793a\uff0c\u8bf7\u68c0\u67e5\u9879\u76ee ",(0,i.jsx)(n.code,{children:"\u5c5e\u6027->\u751f\u6210->\u8f93\u51fa"})," \u4e2d XML \u6587\u6863\u662f\u5426\u914d\u7f6e\u8f93\u51fa\u8def\u5f84\u3002",(0,i.jsx)(n.strong,{children:"\u6ce8\u610f\uff1a\u53ea\u6709\u4e0d\u5e26\u8def\u5f84\u7684 \u3010\u9879\u76ee\u540d\u79f0.xml\u3011 \u624d\u4f1a\u81ea\u52a8\u52a0\u8f7d\u3002"})]})}),"\n",(0,i.jsxs)(n.admonition,{title:"\u7279\u522b\u8bf4\u660e",type:"info",children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Debug"})," \u6a21\u5f0f\u4e0b\u548c ",(0,i.jsx)(n.code,{children:"Release"})," \u6a21\u5f0f\u4e0b\u7684\u6ce8\u91ca\u6587\u4ef6\u662f\u4e0d\u901a\u7528\u7684\uff0c\u6240\u4ee5\u5bfc\u81f4\u5f88\u591a\u5f00\u53d1\u8005\u53d1\u5e03\u5230\u670d\u52a1\u5668\u4e0a\u53d1\u73b0\u6ca1\u6709\u663e\u793a\u6ce8\u91ca\u3002\u6211\u4eec\u53ea\u9700\u8981\u5728 ",(0,i.jsx)(n.code,{children:"Visual Studio"})," \u4e2d\u5207\u6362 ",(0,i.jsx)(n.code,{children:"Debug"})," \u6a21\u5f0f\u4e3a ",(0,i.jsx)(n.code,{children:"Release"}),"\uff0c\u7136\u540e\u91cd\u65b0\u914d\u7f6e\u4e00\u6b21\u5373\u53ef\u3002"]}),(0,i.jsxs)(n.p,{children:["\u8fd9\u6837\u4e0d\u7ba1\u662f ",(0,i.jsx)(n.code,{children:"Debug"})," \u8fd8\u662f ",(0,i.jsx)(n.code,{children:"Release"})," \u6a21\u5f0f\u90fd\u4f1a\u663e\u793a\u6ce8\u91ca\u4e86\u3002"]})]}),"\n",(0,i.jsx)(n.h3,{id:"655-\u591a\u5206\u7ec4\u652f\u6301",children:"6.5.5 \u591a\u5206\u7ec4\u652f\u6301"}),"\n",(0,i.jsxs)(n.p,{children:["\u591a\u5206\u7ec4\u662f\u4e00\u4e2a\u7cfb\u7edf\u4e2d\u5fc5\u5907\u529f\u80fd\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u7cfb\u7edf\u5212\u5206\u4e3a\u591a\u4e2a\u6a21\u5757\uff0c\u6bcf\u4e2a\u6a21\u5757\u90fd\u72ec\u7acb\u7684 ",(0,i.jsx)(n.code,{children:"api"})," \u914d\u7f6e\u3002\u5728 ",(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u4e2d\uff0c\u5b9e\u73b0\u591a\u5206\u7ec4\u975e\u5e38\u7b80\u5355\u3002\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,21,32}",children:'using Furion.DynamicApiController;\r\n\r\nnamespace Furion.Application\r\n{\r\n [ApiDescriptionSettings("Group1")]\r\n public class FurionAppService : IDynamicApiController\r\n {\r\n /// \r\n /// \u968f\u7236\u7c7b Group1 \u5206\u7ec4\r\n /// \r\n /// \r\n public string Post()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n /// \r\n /// \u5728 Group1\u3001Group3 \u90fd\u6709\u6211\r\n /// \r\n /// \r\n [ApiDescriptionSettings("Group1", "Group3")]\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n /// \r\n /// \u6211\u53ea\u5728 Group2 \u51fa\u73b0\r\n /// \r\n /// \r\n /// \r\n [ApiDescriptionSettings("Group2")]\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger3.gif")}),"\n",(0,i.jsx)(n.h3,{id:"656-\u591a\u5206\u7ec4\u6392\u5e8f",children:"6.5.6 \u591a\u5206\u7ec4\u6392\u5e8f"}),"\n",(0,i.jsxs)(t.Z,{defaultValue:"fz1",values:[{label:"\u65b9\u5f0f\u4e00",value:"fz1"},{label:"\u65b9\u5f0f\u4e8c",value:"fz2"}],children:[(0,i.jsxs)(o.Z,{value:"fz1",children:[(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["\u901a\u8fc7\u5206\u7ec4\u540d\u79f0\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"@\u6574\u6570"})," \u8fdb\u884c\u6392\u5e8f"]})}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,19}",children:'using Furion.DynamicApiController;\r\n\r\nnamespace Furion.Application\r\n{\r\n [ApiDescriptionSettings("Group1@1")]\r\n public class FurionAppService : IDynamicApiController\r\n {\r\n public string Post()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n [ApiDescriptionSettings("Group1", "Group3")]\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n [ApiDescriptionSettings("Group@2")]\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n}\n'})}),(0,i.jsxs)(n.p,{children:["\u53ef\u4ee5\u901a\u8fc7\u5728\u5206\u7ec4\u540d\u540e\u9762\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"@\u6574\u6570"})," \u8fdb\u884c\u6392\u5e8f\uff0c",(0,i.jsx)(n.code,{children:"\u6574\u6570"})," \u8d8a\u5927\u6392\u524d\u9762\u3002\u5982\u679c\u5206\u7ec4\u540d\u79f0\u591a\u6b21\u6307\u5b9a\u4e14\u591a\u6b21\u6307\u5b9a\u4e86 ",(0,i.jsx)(n.code,{children:"@\u6574\u6570"})," \uff0c\u5219\u81ea\u52a8",(0,i.jsx)(n.strong,{children:"\u53d6\u8be5\u5206\u7ec4\u6700\u5927\u7684\u6574\u6570"}),"\u8fdb\u884c\u6392\u5e8f\u3002"]})]}),(0,i.jsxs)(o.Z,{value:"fz2",children:[(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u914d\u7f6e\u6392\u5e8f"})}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'showLineNumbers {2-17} title="Furion.Web.Entry/appsettings.json"',children:'{\r\n "SpecificationDocumentSettings": {\r\n "GroupOpenApiInfos": [\r\n {\r\n "Group": "Group1",\r\n "Order": 1\r\n },\r\n {\r\n "Group": "Group2",\r\n "Order": 2\r\n },\r\n {\r\n "Group": "Group3",\r\n "Order": 0\r\n }\r\n ]\r\n }\r\n}\n'})})]})]}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger4.png")}),"\n",(0,i.jsx)(n.admonition,{title:"\u6392\u5e8f\u8bf4\u660e",type:"tip",children:(0,i.jsxs)(n.p,{children:["\u5206\u7ec4\u9ed8\u8ba4\u6392\u5e8f ",(0,i.jsx)(n.code,{children:"Order"})," \u4e3a ",(0,i.jsx)(n.code,{children:"0"}),"\u3002\u5982\u679c\u540c\u65f6\u914d\u7f6e\u4e86 ",(0,i.jsx)(n.code,{children:"@\u6574\u6570"})," \u548c ",(0,i.jsx)(n.code,{children:"appsettings.json"})," \u914d\u7f6e\u6587\u4ef6\uff0c\u90a3\u4e48\u4f18\u5148\u91c7\u7528 ",(0,i.jsx)(n.code,{children:"appsettings.json"})," \u4e2d\u7684 ",(0,i.jsx)(n.code,{children:"Order"})]})}),"\n",(0,i.jsx)(n.h3,{id:"657-\u591a\u5206\u7ec4\u4fe1\u606f\u914d\u7f6e",children:"6.5.7 \u591a\u5206\u7ec4\u4fe1\u606f\u914d\u7f6e"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u63d0\u4f9b\u4e86\u53ef\u901a\u8fc7 ",(0,i.jsx)(n.code,{children:"appsetting.json"})," \u914d\u7f6e\u5206\u7ec4\u4fe1\u606f\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'showLineNumbers {3-20} title="Furion.Web.Entry/appsettings.json"',children:'{\r\n "SpecificationDocumentSettings": {\r\n "GroupOpenApiInfos": [\r\n {\r\n "Group": "Group1",\r\n "Title": "\u5206\u7ec4\u6807\u9898",\r\n "Description": "\u8fd9\u91cc\u662f\u5206\u7ec4\u63cf\u8ff0",\r\n "Version": "\u7248\u672c\u53f7",\r\n "TermsOfService": "http://furion.baiqian.ltd",\r\n "Contact": {\r\n "Name": "\u767e\u5c0f\u50e7",\r\n "Url": "https://gitee.com/monksoul",\r\n "Email": "monksoul@outlook.com"\r\n },\r\n "License": {\r\n "Name": "MIT",\r\n "Url": "https://gitee.com/dotnetchina/Furion/blob/alpha/LICENSE"\r\n }\r\n }\r\n ]\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger5.png")}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion 4.8.8.26 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u81ea\u8be5\u7248\u672c\u5f00\u59cb\uff0c\u53ef\u4ee5\u5728\u4efb\u4f55\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"[openapi:\u5206\u7ec4\u540d]"})," \u4f5c\u4e3a ",(0,i.jsx)(n.code,{children:"Key"})," \u8fdb\u884c\u914d\u7f6e\uff0c\u800c\u65e0\u9700\u5728 ",(0,i.jsx)(n.code,{children:"SpecificationDocumentSettings:GroupOpenApiInfos"})," \u4e2d\u6307\u5b9a\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u5982\u679c\u4e24\u79cd\u65b9\u5f0f\u540c\u65f6\u914d\u7f6e\uff0c\u90a3\u4e48 ",(0,i.jsx)(n.code,{children:"GroupOpenApiInfos"})," \u4e2d\u7684\u5c5e\u6027\u503c\u53ea\u6709\u5728 ",(0,i.jsx)(n.code,{children:"[openapi:\u5206\u7ec4\u540d]"})," \u914d\u7f6e\u4e2d\u5b58\u5728\u624d\u4f1a\u8986\u76d6\uff0c\u4e0d\u5b58\u5728\u5219\u4fdd\u7559\u3002"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2}",children:'{\r\n "[openapi:Group1]": {\r\n "Title": "\u6211\u662f\u81ea\u5b9a\u4e49\u7684\u6807\u9898",\r\n "Order": 10,\r\n "Description": "\u6211\u662f\u81ea\u5b9a\u4e49\u7684\u63cf\u8ff0",\r\n "Version": "2.0.0",\r\n "TermsOfService": "https://furion.net",\r\n "Contact": {\r\n "Name": "Furion.NET",\r\n "Url": "https://gitee.com/monksoul",\r\n "Email": "support@furion.net"\r\n },\r\n "License": {\r\n "Name": "MIT",\r\n "Url": "https://gitee.com/dotnetchina/Furion/blob/v4/LICENSE"\r\n }\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"658-\u63a7\u5236\u5668\u548c\u65b9\u6cd5\u6392\u5e8f",children:"6.5.8 \u63a7\u5236\u5668\u548c\u65b9\u6cd5\u6392\u5e8f"}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u5bf9\u63a7\u5236\u5668\u6216\u8005\u65b9\u6cd5\u8fdb\u884c\u6392\u5e8f\uff0c\u6846\u67b6\u63d0\u4f9b\u4e86 ",(0,i.jsx)(n.code,{children:"[ApiDescriptionSettings]"})," \u7279\u6027\u7684 ",(0,i.jsx)(n.code,{children:"Order"})," \u5c5e\u6027\uff0c",(0,i.jsx)(n.strong,{children:"\u5176\u503c\u8d8a\u5927\u6392\u5e8f\u8d8a\u9760\u524d"}),"\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,9,15,22}",children:"[ApiDescriptionSettings(Order = 10)]\r\npublic class FurionAppService : IDynamicApiController\r\n{\r\n public string Post()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n [ApiDescriptionSettings(Order = 5)]\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n [ApiDescriptionSettings(Order = 4)]\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n}\r\n\r\n[ApiDescriptionSettings(Order = 9)]\r\npublic class Furion2AppService : IDynamicApiController\r\n{\r\n // ...\r\n}\r\n\n"})}),"\n",(0,i.jsx)(n.admonition,{title:"\u6392\u5e8f\u8bf4\u660e",type:"tip",children:(0,i.jsxs)(n.p,{children:["\u6700\u7ec8\u8f93\u51fa\u5230 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u754c\u9762\u65f6\uff0c",(0,i.jsx)(n.code,{children:"FurionAppService"})," \u6bd4 ",(0,i.jsx)(n.code,{children:"Furion2AppService"})," \u9760\u524d\uff0c\u800c ",(0,i.jsx)(n.code,{children:"FurionAppService"})," \u4e2d\u5b9a\u4e49\u7684\u65b9\u6cd5\u6392\u5e8f\u65f6\uff1a",(0,i.jsx)(n.code,{children:"Get"})," > ",(0,i.jsx)(n.code,{children:"Get(int id)"})," > ",(0,i.jsx)(n.code,{children:"Post"}),"\u3002"]})}),"\n",(0,i.jsx)(n.h3,{id:"659-\u7ec4\u4e2d\u7ec4\u6807\u7b7e",children:"6.5.9 \u7ec4\u4e2d\u7ec4\uff08\u6807\u7b7e\uff09"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Tag"})," \u914d\u7f6e\u4e3b\u8981\u7528\u4e8e\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"Swagger"})," \u6807\u7b7e\u5206\u7ec4\u4fe1\u606f\u53ca\u5408\u5e76\u6807\u7b7e\u3002\u4e5f\u5c31\u662f ",(0,i.jsx)(n.code,{children:"\u7ec4\u4e2d\u7ec4"}),":"]}),"\n",(0,i.jsxs)(t.Z,{defaultValue:"tag1",values:[{label:"\u6807\u7b7e\u547d\u540d",value:"tag1"},{label:"\u5408\u5e76\u6807\u7b7e",value:"tag2"}],children:[(0,i.jsxs)(o.Z,{value:"tag1",children:[(0,i.jsx)(n.h4,{id:"\u672a\u8d34\u6807\u7b7e\u4e4b\u524d",children:"\u672a\u8d34\u6807\u7b7e\u4e4b\u524d"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"using Furion.DynamicApiController;\r\n\r\nnamespace Furion.Application\r\n{\r\n public class FurionAppService : IDynamicApiController\r\n {\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n\r\n public class TestAppService : IDynamicApiController\r\n {\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n}\n"})}),(0,i.jsx)(n.h4,{id:"\u8d34\u6807\u7b7e\u4e4b\u540e",children:"\u8d34\u6807\u7b7e\u4e4b\u540e"}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,19}",children:'using Furion.DynamicApiController;\r\n\r\nnamespace Furion.Application\r\n{\r\n [ApiDescriptionSettings(Tag = "\u5206\u7ec4\u4e00")]\r\n public class FurionAppService : IDynamicApiController\r\n {\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n\r\n [ApiDescriptionSettings(Tag = "\u5206\u7ec4\u4e8c")]\r\n public class TestAppService : IDynamicApiController\r\n {\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n}\n'})}),(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),(0,i.jsx)("img",{src:(0,l.Z)("img/tag1.png")})]}),(0,i.jsxs)(o.Z,{value:"tag2",children:[(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,19}",children:'using Furion.DynamicApiController;\r\n\r\nnamespace Furion.Application\r\n{\r\n [ApiDescriptionSettings(Tag = "\u5408\u5e76\u6240\u6709\u6807\u7b7e")]\r\n public class FurionAppService : IDynamicApiController\r\n {\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n\r\n [ApiDescriptionSettings(Tag = "\u5408\u5e76\u6240\u6709\u6807\u7b7e")]\r\n public class TestAppService : IDynamicApiController\r\n {\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n\r\n public int Get(int id)\r\n {\r\n return id;\r\n }\r\n }\r\n}\n'})}),(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),(0,i.jsx)("img",{src:(0,l.Z)("img/tag2.png")})]})]}),"\n",(0,i.jsx)(n.admonition,{title:"\u5c0f\u77e5\u8bc6",type:"tip",children:(0,i.jsxs)(n.p,{children:["\u5982\u679c ",(0,i.jsx)(n.code,{children:"Tag"})," \u540d\u5b57\u4e00\u6837\uff0c\u5219\u4f1a\u81ea\u52a8\u5408\u5e76\uff0c\u5426\u5219\u53ea\u662f\u547d\u540d\u3002"]})}),"\n",(0,i.jsx)(n.h3,{id:"6510-\u9ed8\u8ba4\u5c55\u5f00\u6240\u6709\u6587\u6863",children:"6.5.10 \u9ed8\u8ba4\u5c55\u5f00\u6240\u6709\u6587\u6863"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'showLineNumbers {2-4} title="Furion.Web.Entry/appsettings.json"',children:'{\r\n "SpecificationDocumentSettings": {\r\n "DocExpansionState": "Full"\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger6.gif")}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"DocExpansionState"})," \u914d\u7f6e\u8bf4\u660e\uff1a"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List"}),"\uff1a\u5217\u8868\u5f0f\uff08\u5c55\u5f00\u5b50\u7c7b\uff09\uff0c",(0,i.jsx)(n.strong,{children:"\u9ed8\u8ba4\u503c"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Full"}),"\uff1a\u5b8c\u5168\u5c55\u5f00"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"None"}),"\uff1a\u5217\u8868\u5f0f\uff08\u4e0d\u5c55\u5f00\u5b50\u7c7b\uff09"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"6511-\u914d\u7f6e\u6587\u6863\u6807\u9898",children:"6.5.11 \u914d\u7f6e\u6587\u6863\u6807\u9898"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'showLineNumbers {2-4} title="Furion.Web.Entry/appsettings.json"',children:'{\r\n "SpecificationDocumentSettings": {\r\n "DocumentTitle": "\u6211\u662f\u81ea\u5b9a\u4e49\u6807\u9898"\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger7.png")}),"\n",(0,i.jsx)(n.h3,{id:"6512-\u6388\u6743\u63a7\u5236",children:"6.5.12 \u6388\u6743\u63a7\u5236"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:["\u65b0\u7248\u672c ",(0,i.jsx)(n.code,{children:"Furion"})," \u5df2\u7ecf\u9ed8\u8ba4\u542f\u7528\u4e86 Bearer Token \u6388\u6743\u914d\u7f6e\uff0c\u65e0\u9700\u624b\u52a8\u914d\u7f6e"]}),"\uff0c\u5982\u9700\u624b\u52a8\u914d\u7f6e\uff0c\u53ef\u624b\u52a8\u6dfb\u52a0\u4ee5\u4e0b\u7c7b\u4f3c\u914d\u7f6e\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'showLineNumbers title="Furion.Web.Entry/appsettings.json"',children:'{\r\n "SpecificationDocumentSettings": {\r\n "EnableAuthorized": true,\r\n\r\n "SecurityDefinitions": [\r\n {\r\n "Id": "Bearer",\r\n "Type": "Http",\r\n "Name": "Authorization",\r\n "Description": "JWT Authorization header using the Bearer scheme.",\r\n "BearerFormat": "JWT",\r\n "Scheme": "bearer",\r\n "In": "Header",\r\n\r\n "Requirement": {\r\n "Scheme": {\r\n "Reference": {\r\n "Id": "Bearer",\r\n "Type": "SecurityScheme"\r\n },\r\n "Accesses": []\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"6513-\u5728\u7ebf\u6d4b\u8bd5",children:"6.5.13 \u5728\u7ebf\u6d4b\u8bd5"}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swagger8.gif")}),"\n",(0,i.jsxs)(n.h3,{id:"6514-\u6027\u80fd\u76d1\u89c6-miniprofiler",children:["6.5.14 \u6027\u80fd\u76d1\u89c6 ",(0,i.jsx)(n.code,{children:"MiniProfiler"})]}),"\n",(0,i.jsxs)(n.p,{children:["\u89c4\u8303\u5316\u6587\u6863\u9ed8\u8ba4\u96c6\u6210\u4e86 ",(0,i.jsx)(n.code,{children:"MiniProfiler"})," \u7b2c\u4e09\u65b9\u6027\u80fd\u7ec4\u4ef6\uff0c\u901a\u8fc7\u8be5\u7ec4\u4ef6\u53ef\u4ee5\u65b9\u4fbf\u67e5\u770b\u8bf7\u6c42\u6027\u80fd\u3001\u5f02\u5e38\u5806\u6808\u3001\u6570\u636e\u5e93\u64cd\u4f5c\u7b49\u4fe1\u606f\u3002\u9ed8\u8ba4\u5728 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u9996\u9875\u5de6\u4e0a\u89d2\u663e\u793a\u3002"]}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/mipr.png")}),"\n",(0,i.jsx)(n.admonition,{title:"\u5c0f\u63d0\u793a",type:"note",children:(0,i.jsxs)(n.p,{children:["\u4e5f\u53ef\u4ee5\u901a\u8fc7 ",(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"appsetting.json"})})," \u4e2d ",(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"AppSettings:InjectMiniProfiler"})})," \u8bbe\u4e3a ",(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"false"})})," \u5173\u95ed\u3002"]})}),"\n",(0,i.jsx)(n.h3,{id:"6515-\u5b9a\u4e49\u63a5\u53e3\u8f93\u51fa\u7c7b\u578b",children:"6.5.15 \u5b9a\u4e49\u63a5\u53e3\u8f93\u51fa\u7c7b\u578b"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2,8-9}",children:"using Furion.DynamicApiController;\r\nusing Microsoft.AspNetCore.Mvc;\r\n\r\nnamespace Furion.Application\r\n{\r\n public class FurionAppService : IDynamicApiController\r\n {\r\n [ProducesResponseType(201, Type = typeof(TestDto))]\r\n [ProducesResponseType(400)]\r\n public string Get()\r\n {\r\n return nameof(Furion);\r\n }\r\n }\r\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/fhzlx.png")}),"\n",(0,i.jsx)(n.h3,{id:"6516-\u9690\u85cf\u7279\u5b9a\u5206\u7ec4",children:"6.5.16 \u9690\u85cf\u7279\u5b9a\u5206\u7ec4"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u65b0\u7248\u672c\u63d0\u4f9b\u4e86\u9690\u85cf\u5206\u7ec4\u7684 ",(0,i.jsx)(n.code,{children:"Visible"})," \u914d\u7f6e\uff0c\u8bbe\u7f6e\u4e3a ",(0,i.jsx)(n.code,{children:"false"})," \u4e4b\u540e\u8be5\u5206\u7ec4\u5c06\u4e0d\u663e\u793a\u5728\u89c4\u8303\u5316\u6587\u6863\u4e2d\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'showLineNumbers title="appsetting.json"',children:'{\r\n "SpecificationDocumentSettings": {\r\n "GroupOpenApiInfos": [\r\n {\r\n "Group": "Group1",\r\n "Visible": false\r\n }\r\n ]\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"6517-\u4e2d\u6587\u4e71\u7801\u95ee\u9898",children:"6.5.17 \u4e2d\u6587\u4e71\u7801\u95ee\u9898"}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b,",(0,i.jsx)(n.code,{children:".json"})," \u6587\u4ef6\u5e76\u672a\u91c7\u7528 ",(0,i.jsx)(n.code,{children:"utf-8"})," \u7f16\u7801\uff0c\u6240\u4ee5\u5982\u679c\u914d\u7f6e\u4e2d\u6587\u5206\u7ec4\u4fe1\u606f\u5c31\u4f1a\u51fa\u73b0\u4e71\u7801\u60c5\u51b5\uff0c\u8fd9\u65f6\u5019\uff0c\u53ea\u9700\u8981\u4fee\u6539 ",(0,i.jsx)(n.code,{children:".json"})," \u6587\u4ef6\u7f16\u7801\u4e3a ",(0,i.jsx)(n.code,{children:"utf-8"})," \u5373\u53ef\u3002"]}),"\n",(0,i.jsxs)(n.h3,{id:"6518-\u751f\u4ea7\u73af\u5883\u4e2d\u5173\u95ed-swagger",children:["6.5.18 \u751f\u4ea7\u73af\u5883\u4e2d\u5173\u95ed ",(0,i.jsx)(n.code,{children:"Swagger"})]}),"\n",(0,i.jsxs)(n.p,{children:["\u5982\u679c\u4e0d\u9700\u8981\u7ebf\u4e0a\u73af\u5883\u5f00\u542f ",(0,i.jsx)(n.code,{children:"Swagger"})," \u529f\u80fd\uff0c\u53ea\u9700\u8981\u5728 ",(0,i.jsx)(n.code,{children:"appsetting.json"})," \u914d\u7f6e\u5373\u53ef\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {3}",children:'{\r\n "AppSettings": {\r\n "InjectSpecificationDocument": false\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"6519-\u8bbe\u7f6e-example-value-\u9ed8\u8ba4\u503c",children:["6.5.19 \u8bbe\u7f6e ",(0,i.jsx)(n.code,{children:"Example Value"})," \u9ed8\u8ba4\u503c"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Swagger"})," \u4f1a\u81ea\u52a8\u6839\u636e\u5bf9\u8c61\u7c7b\u578b\u8f93\u5165\u53c2\u6570\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"Example Value"})," \u9ed8\u8ba4\u503c\uff0c\u4f46\u662f\u8be5\u9ed8\u8ba4\u503c\u901a\u5e38\u662f\u5bf9\u8c61\u5c5e\u6027\u7684\u7c7b\u578b\u5b57\u7b26\u4e32\u6216\u7f3a\u7701\u503c\uff0c\u5982\u679c\u6211\u4eec\u9700\u8981\u81ea\u5b9a\u4e49\u8fd9\u4e9b\u9ed8\u8ba4\u503c\uff0c\u53ea\u9700\u8981\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"/// \u9ed8\u8ba4\u503c"})," \u6ce8\u91ca\u5373\u53ef\u3002"]}),"\n",(0,i.jsx)(n.p,{children:"\u5982\uff1a"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4}",children:"/// \r\n/// \u5e74\u9f84\r\n/// \r\n/// 13\r\n[Required, Range(10, 110)]\r\npublic int Age { get; set; }\n"})}),"\n",(0,i.jsx)(n.p,{children:"\u5982\u4e0b\u56fe\u6240\u793a\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/sd20.png")}),"\n",(0,i.jsx)(n.p,{children:"\u66f4\u591a\u7c7b\u578b\u9ed8\u8ba4\u503c\u8bbe\u7f6e\u793a\u4f8b\uff1a"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff1a",(0,i.jsx)(n.code,{children:"/// true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"string"})," \u7c7b\u578b\uff1a",(0,i.jsx)(n.code,{children:"/// foobar"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"number"})," \u7c7b\u578b\uff1a",(0,i.jsx)(n.code,{children:"/// 123"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"null"})," \u7c7b\u578b\uff1a ",(0,i.jsx)(n.code,{children:"/// null"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"array"})," \u7c7b\u578b\uff1a",(0,i.jsx)(n.code,{children:"/// [ 1, 2, 3 ]"})]}),"\n"]}),"\n",(0,i.jsxs)(n.admonition,{type:"important",children:[(0,i.jsxs)(n.mdxAdmonitionTitle,{children:["\u5173\u4e8e ",(0,i.jsx)(n.code,{children:"object"})," \u7c7b\u578b\u8f93\u5165\u53c2\u6570"]}),(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,i.jsx)(n.code,{children:"Example Value"})," \u4e0d\u4f1a\u663e\u793a ",(0,i.jsx)(n.code,{children:"object"})," \u7c7b\u578b\u7684\u5bf9\u8c61\u5c5e\u6027\uff0c\u56e0\u4e3a ",(0,i.jsx)(n.code,{children:"Swagger"})," \u8ba4\u4e3a\u8fd9\u662f\u4e0d\u5408\u7406\u7684\u5b9a\u4e49\u3002\u5982\u679c\u9700\u8981\u5f3a\u5236\u663e\u793a\uff0c\u53ea\u9700\u8981\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:'/// "object"'})," \u6ce8\u91ca\u5373\u53ef\u3002"]})]}),"\n",(0,i.jsxs)(n.h3,{id:"6520-\u81ea\u5b9a\u4e49-swagger-\u914d\u7f6e",children:["6.5.20 \u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u914d\u7f6e"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u9664\u4e86\u5185\u7f6e\u4e86\u4e0d\u5c11\u914d\u7f6e\u4ee5\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u76f4\u63a5\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"Swagger"})," Api \u7684\u53c2\u6570\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5}",children:"public void ConfigureServices(IServiceCollection services)\r\n{\r\n services.AddInject(options =>\r\n {\r\n options.ConfigureSwaggerGen(gen =>\r\n {\r\n // ....\r\n });\r\n });\r\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {6,11}",children:" public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\r\n {\r\n // \u5982\u679c\u4f7f\u7528 Furion 4.4.8+ \u7248\u672c\u53ef\u4ee5 app.UseInject(options => {}) \u4e86\uff0c\u65e0\u9700\u6307\u5b9a configure:\r\n app.UseInject(configure: options =>\r\n {\r\n options.ConfigureSwagger(swg =>\r\n {\r\n // ....\r\n });\r\n\r\n options.ConfigureSwaggerUI(ui =>\r\n {\r\n // ....\r\n });\r\n });\r\n}\r\n\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"6521-\u914d\u7f6e-swagger\u7684-schemaids",children:["6.5.21 \u914d\u7f6e ",(0,i.jsx)(n.code,{children:"Swagger"}),"\u7684 ",(0,i.jsx)(n.code,{children:"SchemaIds"})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u9ed8\u8ba4\u53ea\u663e\u793a\u540d\u79f0\uff0c\u5982\u679c\u9700\u8981\u81ea\u5b9a\u4e49\u663e\u793a\u89c4\u5219\uff0c\u53ea\u9700\u8981\u6dfb\u52a0\u914d\u7f6e\u5373\u53ef\u3002"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,6}",children:"services.AddControllersWithViews()\r\n .AddInject(options =>\r\n {\r\n options.ConfigureSwaggerGen(gen =>\r\n {\r\n gen.CustomSchemaIds(x => x.FullName);\r\n });\r\n });\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"6522-\u81ea\u5b9a\u4e49-swaggerjson-\u8def\u7531\u6a21\u677f",children:["6.5.22 \u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"swagger.json"})," \u8def\u7531\u6a21\u677f"]}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u4f1a\u751f\u6210\u7edf\u4e00\u7684\u5206\u7ec4\u6a21\u677f\uff0c\u5982\uff1a",(0,i.jsx)(n.code,{children:"swagger/{documentName}/swagger.json"}),"\uff0c",(0,i.jsx)(n.code,{children:"{documentName}"})," \u4f1a\u5728\u8fd0\u884c\u65f6\u66ff\u6362\u4e3a\u5206\u7ec4\u540d\uff0c\u5982\u9700\u81ea\u5b9a\u4e49\uff0c\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"RouteTemplate"})," \u5373\u53ef\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'showLineNumbers title="appsetting.json"',children:'{\r\n "SpecificationDocumentSettings": {\r\n "RouteTemplate": "myapp/{documentName}/xxxx.json"\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"6523-\u5173\u4e8e-applicationx-www-form-urlencoded-\u8bf7\u6c42",children:["6.5.23 \u5173\u4e8e ",(0,i.jsx)(n.code,{children:"application/x-www-form-urlencoded"})," \u8bf7\u6c42"]}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,i.jsx)(n.code,{children:"Swagger"})," \u5e76\u672a\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"application/x-www-form-urlencoded"})," \u652f\u6301\uff0c\u5982\u9700\u542f\u7528\u8be5\u914d\u7f6e\uff0c\u53ea\u9700\u5728\u65b9\u6cd5\u9876\u90e8\u8d34 ",(0,i.jsx)(n.code,{children:"[Consumes]"})," \u7279\u6027\u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,2}",children:'[Consumes("application/x-www-form-urlencoded")]\r\npublic async Task Test([FromForm] TestRequest testRequest)\r\n{\r\n // ....\r\n}\r\n\r\npublic class TestRequest\r\n{\r\n public string TestValue { get; set; }\r\n}\n'})}),"\n",(0,i.jsx)(n.admonition,{title:"\u7279\u522b\u6ce8\u610f",type:"important",children:(0,i.jsxs)(n.p,{children:["\u53c2\u6570\u5fc5\u987b\u8d34 ",(0,i.jsx)(n.code,{children:"[FromForm]"})," \u7279\u6027\u3002\u53e6\u5916\u8bf7\u6c42\u65f6\u5c06\u53c2\u6570\u6309 ",(0,i.jsx)(n.code,{children:"URL"})," \u5730\u5740\u62fc\u63a5\u5e76\u653e\u5728 ",(0,i.jsx)(n.code,{children:"Body"})," \u4e2d\u8bf7\u6c42\u3002"]})}),"\n",(0,i.jsxs)(n.h3,{id:"6524-swagger-\u51fa\u73b0-cors-\u95ee\u9898\u89e3\u51b3",children:["6.5.24 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u51fa\u73b0 ",(0,i.jsx)(n.code,{children:"CORS"})," \u95ee\u9898\u89e3\u51b3"]}),"\n",(0,i.jsxs)(n.p,{children:["\u5982\u679c ",(0,i.jsx)(n.code,{children:"Swagger"})," \u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\uff0c\u5982\u56fe\uff1a"]}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swerror.png")}),"\n",(0,i.jsx)(n.p,{children:"\u5219\u9700\u8981\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff1a"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2,3}",children:'{\r\n "SpecificationDocumentSettings": {\r\n "HideServers": true\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"6525-swagger-\u51fa\u73b0\u9ed8\u8ba4-textxmltextplain-\u53c2\u6570\u95ee\u9898\u89e3\u51b3",children:["6.5.25 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u51fa\u73b0\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"text/xml"}),"/",(0,i.jsx)(n.code,{children:"text/plain"})," \u53c2\u6570\u95ee\u9898\u89e3\u51b3"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u4ea7\u751f\u6b64\u539f\u56e0\u6709\u4e24\u4e2a\u5fc5\u8981\u6761\u4ef6\uff1a"})}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\u4f7f\u7528\u4e86 ",(0,i.jsx)(n.code,{children:"Microsoft.AspNetCore.Mvc.NewtonsoftJson"})," \u5305\u5e76\u6dfb\u52a0\u4e86 ",(0,i.jsx)(n.code,{children:"AddNewtonsoftJson()"})," \u6ce8\u518c\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".AddNewtonsoftJson()"})," \u5199\u5728\u4e86 ",(0,i.jsx)(n.code,{children:".AddInjectWithUnifyResult()"})," \u540e\u9762\u3002"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u6240\u4ee5\u89e3\u51b3\u65b9\u6cd5\u662f\uff0c\u5148\u6ce8\u518c ",(0,i.jsx)(n.code,{children:".AddNewtonsoftJson()"})," \u518d\u6ce8\u518c\u89c4\u8303\u5316\u7ed3\u679c\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2}",children:"services.AddControllers()\r\n .AddNewtonsoftJson()\r\n .AddInjectWithUnifyResult();\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"6526-swagger-\u591a\u8bed\u8a00\u652f\u6301",children:["6.5.26 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u591a\u8bed\u8a00\u652f\u6301"]}),"\n",(0,i.jsxs)(n.p,{children:["\u5728 ",(0,i.jsx)(n.code,{children:"Furion 2.9.0 + "})," \u7248\u672c\u5df2\u7ecf\u652f\u6301\u4e86 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u6587\u6863\u5730\u5740 ",(0,i.jsx)(n.code,{children:"?culture=en-US"})," \u53c2\u6570\u591a\u8bed\u8a00\u8f6c\u53d1\u529f\u80fd\u4e86\uff0c\u4e5f\u5c31\u662f ",(0,i.jsx)(n.code,{children:"Swagger"})," \u5730\u5740\u5e26 ",(0,i.jsx)(n.code,{children:"?culture="})," \u53c2\u6570\u5c06\u81ea\u52a8\u6dfb\u52a0\u5230\u6bcf\u4e00\u4e2a\u8bf7\u6c42\u7684 ",(0,i.jsx)(n.code,{children:"api"})," \u5730\u5740\u4e2d\u3002"]}),"\n",(0,i.jsxs)(n.h3,{id:"6527-\u81ea\u5b9a\u4e49\u903b\u8f91\u63a7\u5236-swagger-\u6bcf\u4e00\u4e2a-api-\u53ef\u89c1\u6027",children:["6.5.27 \u81ea\u5b9a\u4e49\u903b\u8f91\u63a7\u5236 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u6bcf\u4e00\u4e2a ",(0,i.jsx)(n.code,{children:"api"})," \u53ef\u89c1\u6027"]}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u63a5\u53e3\u53ef\u89c1\u6027\uff0c\u6bd4\u5982\u6839\u636e\u6743\u9650\uff0c\u4e0d\u540c\u7528\u6237\u7c7b\u578b\uff0c\u5404\u79cd\u903b\u8f91\u63a7\u5236\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,6}",children:"// \u4e5f\u53ef\u4ee5\u7528 .AddInjectWithUnifyResult\r\nservices.AddInject(options =>\r\n{\r\n options.ConfigureSwaggerGen(gen =>\r\n {\r\n gen.DocInclusionPredicate((currentGroup, apiDescription) =>\r\n {\r\n // Furion \u5185\u90e8\u68c0\u67e5\uff0c\u5fc5\u987b\u653e\u7b2c\u4e00\u884c\r\n var isShow = SpecificationDocumentBuilder.CheckApiDescriptionInCurrentGroup(currentGroup, apiDescription);\r\n\r\n // \u83b7\u53d6\u5f53\u524d\u65b9\u6cd5\r\n _ = apiDescription.TryGetMethodInfo(out var method);\r\n\r\n // \u6709\u4e86\u65b9\u6cd5\uff0c\u8fd9\u91cc\u505a\u4f60\u60f3\u505a\u7684\u4e8b\u60c5\uff0cisShow \u8bbe\u7f6e true \u53ef\u89c1\uff0c\u8bbe\u7f6e false \u4e0d\u53ef\u89c1\r\n\r\n return isShow;\r\n });\r\n });\r\n});\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"6528-\u914d\u7f6e-mvc-\u63a7\u5236\u5668\u652f\u6301\u89c4\u8303\u5316\u5904\u7406",children:["6.5.28 \u914d\u7f6e ",(0,i.jsx)(n.code,{children:"MVC"})," \u63a7\u5236\u5668\u652f\u6301\u89c4\u8303\u5316\u5904\u7406"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "UnifyResultSettings": {\r\n "SupportMvcController": true\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"6529-swagger-\u5237\u65b0\u8bb0\u4f4f\u6388\u6743\u72b6\u6001",children:["6.5.29 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u5237\u65b0\u8bb0\u4f4f\u6388\u6743\u72b6\u6001"]}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,i.jsx)(n.code,{children:"Swagger"})," \u5237\u65b0\u6d4f\u89c8\u5668\u540e\uff0c\u6388\u6743\u72b6\u6001\u5c06\u88ab\u91cd\u7f6e\uff0c\u4e5f\u5c31\u662f\u9700\u8981\u91cd\u65b0\u767b\u5f55\uff0c\u901a\u8fc7\u4e0b\u9762\u4ee3\u7801\u5728 ",(0,i.jsx)(n.strong,{children:"\u7528\u6237\u767b\u5f55\u6210\u529f\u540e"})," \u8c03\u7528\u5373\u53ef\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// ....\u9a8c\u8bc1\u7528\u6237\u540d/\u5bc6\u7801....\r\n\r\n_httpContextAccessor.HttpContext.SigninToSwagger("\u4f20\u5165 token");\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"6530-\u5e26\u767b\u5f55\u7684-swagger-\u6587\u6863",children:["6.5.30 \u5e26\u767b\u5f55\u7684 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u6587\u6863"]}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion v3.3.3+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,i.jsx)(n.code,{children:"Swagger"})," \u662f\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u8bbf\u95ee\u7684\uff0c\u8fd9\u6837\u4e5f\u66b4\u9732\u51fa\u4e00\u4e9b\u5b89\u5168\u95ee\u9898\uff0c\u6240\u4ee5\u5728\u8be5\u7248\u672c\u4e4b\u540e\u6dfb\u52a0\u4e86\u767b\u5f55\u529f\u80fd\uff0c\u53ea\u9700\u8981\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"SpecificationDocumentSettings"})," \u7684 ",(0,i.jsx)(n.code,{children:"LoginInfo"})," \u5373\u53ef\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2-6}",children:'{\r\n "SpecificationDocumentSettings": {\r\n "LoginInfo": {\r\n "Enabled": true,\r\n "CheckUrl": "/Home/CheckUrl",\r\n "SubmitUrl": "/Home/SubmitUrl",\r\n "UserName": "admin",\r\n "Password": "admin"\r\n }\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"\u914d\u7f6e\u8bf4\u660e",children:"\u914d\u7f6e\u8bf4\u660e"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"LoginInfo"}),"\uff1a\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"Swagger"})," \u662f\u5426\u9700\u8981\u767b\u5f55\u624d\u80fd\u8bbf\u95ee\uff0c",(0,i.jsx)(n.code,{children:"SpecificationLoginInfo"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"null"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u4ec5\u5728 Furion v3.3.3+` \u6709\u6548"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Enabled"}),"\uff1a\u662f\u5426\u542f\u7528\u767b\u5f55\u6388\u6743\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"CheckUrl"}),"\uff1a\u68c0\u67e5\u767b\u5f55\u72b6\u6001\u7684 ",(0,i.jsx)(n.code,{children:"Url"})," \u5730\u5740\uff0c",(0,i.jsxs)(n.strong,{children:["\u8be5\u5730\u5740\u5fc5\u987b\u662f ",(0,i.jsx)(n.code,{children:"POST"})," \u8bf7\u6c42"]}),"\uff0c\u5df2\u6388\u6743\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"200"}),"\uff0c\u5426\u5219\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"401"}),"\uff0c\u652f\u6301\u76f8\u5bf9\u5730\u5740\uff0c\u4ee5 ",(0,i.jsx)(n.code,{children:"/"})," \u5f00\u5934"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"SubmitUrl"}),"\uff1a\u63d0\u4ea4\u767b\u5f55\u7684 ",(0,i.jsx)(n.code,{children:"Url"})," \u5730\u5740\uff0c",(0,i.jsxs)(n.strong,{children:["\u8be5\u5730\u5740\u5fc5\u987b\u662f ",(0,i.jsx)(n.code,{children:"POST"})," \u8bf7\u6c42\u4e14\u53ea\u6709\u4e00\u4e2a ",(0,i.jsx)(n.code,{children:"SpecificationAuth"})," \u7c7b\u578b\u53c2\u6570"]}),"\uff0c\u6210\u529f\u767b\u5f55\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"200"}),"\uff0c\u5426\u5219\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"401"}),"\uff0c\u652f\u6301\u76f8\u5bf9\u5730\u5740\uff0c\u4ee5 ",(0,i.jsx)(n.code,{children:"/"})," \u5f00\u5934"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u914d\u7f6e\u793a\u4f8b",children:"\u914d\u7f6e\u793a\u4f8b"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {10-14,16-31}",children:'using Furion.SpecificationDocument;\r\nusing Microsoft.AspNetCore.Authorization;\r\nusing Microsoft.AspNetCore.Mvc;\r\nusing System.ComponentModel.DataAnnotations;\r\n\r\nnamespace Furion.Web.Entry.Controllers;\r\n\r\npublic class HomeController : Controller\r\n{\r\n [HttpPost, AllowAnonymous, NonUnify]\r\n public int CheckUrl()\r\n {\r\n return 401;\r\n }\r\n\r\n [HttpPost, AllowAnonymous, NonUnify]\r\n public int SubmitUrl([FromForm] SpecificationAuth auth)\r\n {\r\n // \u8bfb\u53d6\u914d\u7f6e\u4fe1\u606f\r\n var userName = App.Configuration["SpecificationDocumentSettings:LoginInfo:UserName"];\r\n var password = App.Configuration["SpecificationDocumentSettings:LoginInfo:Password"];\r\n\r\n if (auth.UserName == userName && auth.Password == password)\r\n {\r\n return 200;\r\n }\r\n else\r\n {\r\n return 401;\r\n }\r\n }\r\n}\n'})}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swgdl.png")}),"\n",(0,i.jsxs)(n.h3,{id:"6531-inheritdoc-\u5b9e\u73b0\u6ce8\u91ca\u7ee7\u627f",children:["6.5.31 ",(0,i.jsx)(n.code,{children:"inheritdoc"})," \u5b9e\u73b0\u6ce8\u91ca\u7ee7\u627f"]}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion v3.3.3+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u5728\u8fc7\u53bb\u6211\u4eec\u5728\u63a5\u53e3\u5b9a\u4e49\u7684\u65f6\u5019\u7f16\u5199\u4e86\u5b8c\u6574\u7684\u6210\u5458\u6ce8\u91ca\uff0c\u7136\u540e\u5728\u6d3e\u751f\u6210\u5458\u4e2d\u53c8\u8981\u91cd\u590d\u5199\u4e00\u6b21\uff0c\u5b9e\u9645\u4e0a\u505a\u4e86\u5f88\u5927\u65e0\u7528\u529f\uff0c\u73b0\u5728 ",(0,i.jsx)(n.code,{children:"Furion"})," \u652f\u6301\u4e86\u6ce8\u91ca\u7ee7\u627f\u4e86\uff0c\u540c\u65f6 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u4e2d\u4e5f\u80fd\u6b63\u786e\u663e\u793a\u3002"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,8,14}",children:'using Furion.DynamicApiController;\r\n\r\nnamespace Furion.Application\r\n{\r\n /// \r\n public class TestInheritdoc : ITestInheritdoc, IDynamicApiController\r\n {\r\n /// \r\n public string GetName()\r\n {\r\n return "Furion";\r\n }\r\n\r\n /// \r\n public string GetVersion()\r\n {\r\n return "3.3.3";\r\n }\r\n }\r\n\r\n /// \r\n /// \u6d4b\u8bd5\u6ce8\u91ca\u7ee7\u627f\r\n /// \r\n public interface ITestInheritdoc\r\n {\r\n /// \r\n /// \u83b7\u53d6\u540d\u79f0\r\n /// \r\n /// \r\n string GetName();\r\n\r\n /// \r\n /// \u83b7\u53d6\u7248\u672c\r\n /// \r\n /// \r\n string GetVersion();\r\n }\r\n}\r\n\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u663e\u793a\u6548\u679c\uff1a"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/cdr22.png")}),"\n",(0,i.jsx)(n.admonition,{title:"\u6ce8\u610f\u4e8b\u9879",type:"important",children:(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:""})," \u4e0d\u6307\u5b9a ",(0,i.jsx)(n.code,{children:"cref"})," ",(0,i.jsx)(n.strong,{children:"\u4ec5\u9650\u6210\u5458\u53ef\u7528"}),"\u4e14\u6240\u5728\u7684\u7c7b\u578b\u5fc5\u987b\u6307\u5b9a ",(0,i.jsx)(n.code,{children:''}),"\uff0c\u8fd9\u6837\u624d\u80fd\u81ea\u52a8\u8bc6\u522b\u3002"]})}),"\n",(0,i.jsxs)(n.h3,{id:"6532-\u542f\u7528-all-groups-\u5206\u7ec4\u529f\u80fd",children:["6.5.32 \u542f\u7528 ",(0,i.jsx)(n.code,{children:"All Groups"})," \u5206\u7ec4\u529f\u80fd"]}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion v3.3.4+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u4e3a\u4e86\u66f4\u597d\u7684\u5bf9\u63a5\u53e3\u8fdb\u884c\u5f52\u7c7b\uff0c\u914d\u7f6e\u4e86 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u591a\u4e2a\u5206\u7ec4\u7684\u529f\u80fd\uff0c\u4f46\u8fd9\u6837\u4e5f\u5bf9\u751f\u6210\u5ba2\u6237\u7aef\u8bf7\u6c42\u4ee3\u7801\u9020\u6210\u4e86\u56f0\u6270\uff0c\u6240\u4ee5\u6dfb\u52a0\u4e86\u65b0\u7684\u914d\u7f6e\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2-3}",children:'{\r\n "SpecificationDocumentSettings": {\r\n "EnableAllGroups": true\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"6533-\u63a5\u53e3\u8fc7\u65f6\u63a7\u5236",children:"6.5.33 \u63a5\u53e3\u8fc7\u65f6\u63a7\u5236"}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion v3.3.5+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u67d0\u4e2a\u63a5\u53e3\u5df2\u7ecf\u8fc7\u65f6\uff0c\u63d0\u793a\u5c3d\u65e9\u8c03\u7528\u6700\u65b0\u63a5\u53e3\uff0c\u53ea\u9700\u8981\u5728\u65b9\u6cd5\u4e0a\u9762\u8d34 ",(0,i.jsx)(n.code,{children:"[Obsolete]"})," \u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,7}",children:'[Obsolete("GetName() \u5df2\u7ecf\u8fc7\u65f6\uff0c\u8bf7\u8c03\u7528 GetFrameworkName() \u66ff\u4ee3")]\r\npublic string GetName()\r\n{\r\n return nameof(Furion);\r\n}\r\n\r\n[Obsolete]\r\npublic string Other()\r\n{\r\n // ...\r\n}\n'})}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swg2.png")}),"\n",(0,i.jsx)(n.h3,{id:"6534-\u5355\u4e00\u63a5\u53e3\u66f4\u591a\u63cf\u8ff0",children:"6.5.34 \u5355\u4e00\u63a5\u53e3\u66f4\u591a\u63cf\u8ff0"}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion v3.3.5+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u5728\u8be5\u7248\u672c\u65b0\u589e\u4e86 ",(0,i.jsx)(n.code,{children:"[ApiDescriptionSettings]"})," \u7684 ",(0,i.jsx)(n.code,{children:"Description"})," \u5c5e\u6027\uff0c\u652f\u6301\u5b9a\u4e49\u66f4\u591a\u63cf\u8ff0\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:'[ApiDescriptionSettings(Description = "\u6211\u662f\u4e00\u6bb5\u63cf\u8ff0\uff0c\u663e\u793a\u66f4\u591a\u5185\u5bb9 ")]\r\npublic string add()\r\n{\r\n //....\r\n}\n'})}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/swg1.png")}),"\n",(0,i.jsxs)(n.h3,{id:"6535-swagger-\u5f02\u5e38\u4e0d\u80fd\u663e\u793a\u9519\u8bef\u5904\u7406",children:["6.5.35 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u5f02\u5e38/\u4e0d\u80fd\u663e\u793a/\u9519\u8bef\u5904\u7406"]}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u53ef\u80fd\u56e0\u4e3a\u9519\u8bef\u7684\u914d\u7f6e\u5bfc\u81f4 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u4e0d\u80fd\u663e\u793a\uff0c\u8fd9\u65f6\u5019\u53ea\u9700\u8981\u590d\u5236\u63d0\u793a\u7684\u9519\u8bef ",(0,i.jsx)(n.code,{children:".json"})," \u94fe\u63a5\u5730\u5740\u5230\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:"showLineNumbers",children:"https://localhost:\u4f60\u7684\u7aef\u53e3/swagger/Default/swagger.json\n"})}),"\n",(0,i.jsxs)(n.p,{children:["\u540e\u9762\u7684 ",(0,i.jsx)(n.code,{children:"/swagger/Default/swagger.json"})," \u5c31\u662f ",(0,i.jsx)(n.code,{children:"Swagger"})," \u9519\u8bef\u63d0\u793a\u7684 ",(0,i.jsx)(n.code,{children:".json"})," \u94fe\u63a5\u5730\u5740\u3002"]}),"\n",(0,i.jsx)(n.p,{children:"\u8fd9\u6837\u5c31\u53ef\u4ee5\u770b\u5230\u8be6\u7ec6\u7684\u9519\u8bef\u4e86\u3002"}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/sperr.png")}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/sperr2.png")}),"\n",(0,i.jsxs)(n.h3,{id:"6536-\u81ea\u5b9a\u4e49-swagger-\u7684-schemaid",children:["6.5.36 \u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u7684 ",(0,i.jsx)(n.code,{children:"SchemaId"})]}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion v3.6.4+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u65f6\u5019\uff0c\u4e0d\u540c\u7a0b\u5e8f\u96c6\u4f1a\u5b9a\u4e49\u76f8\u540c\u7684\u7c7b\u578b\u540d\u79f0 ",(0,i.jsx)(n.code,{children:"Name"}),"\uff0c\u8fd9\u6837\u5c31\u4f1a\u5bfc\u81f4\u751f\u6210 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u7684 ",(0,i.jsx)(n.code,{children:"SchemaId"})," \u51fa\u73b0\u51b2\u7a81\uff0c\u8fd9\u65f6\u53ea\u9700\u8981\u5728\u7c7b\u578b\u4e0a\u8d34 ",(0,i.jsx)(n.code,{children:"[SchemaId]"})," \u7279\u6027\u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'using Furion.SpecificationDocument;\r\n\r\n[SchemaId("Other_")]\r\npublic class PersonDto\r\n{\r\n // ...\r\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"SchemaIdAttribute"})," \u914d\u7f6e\u9009\u9879\uff1a","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"SchemaId"}),"\uff1a\u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"SchemaId"}),"\uff0c\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u53ea\u80fd\u662f ",(0,i.jsx)(n.code,{children:"\u5b57\u6bcd,\u6570\u5b57\uff0c\u4e0b\u5212\u7ebf"})," \u7ec4\u5408"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Replace"}),"\uff1a\u662f\u5426\u5b8c\u5168\u66ff\u6362\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"false"}),"\uff0c\u9ed8\u8ba4\u662f\u4f5c\u4e3a\u524d\u7f00\u62fc\u63a5\uff0c\u5982\u4e0a\u9762\u7684 ",(0,i.jsx)(n.code,{children:"PersonDto"})," \u4f1a\u751f\u6210 ",(0,i.jsx)(n.code,{children:"Other_PersonDto"}),"\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3a ",(0,i.jsx)(n.code,{children:"true"}),"\uff0c\u5219\u76f4\u63a5\u4f7f\u7528 ",(0,i.jsx)(n.code,{children:"Other_"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.h3,{id:"6537-\u81ea\u5b9a\u4e49-swagger-\u7684-operationid",children:["6.5.37 \u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u7684 ",(0,i.jsx)(n.code,{children:"OperationId"})]}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion 4.1.7+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u901a\u8fc7\u6211\u4eec\u6839\u636e ",(0,i.jsx)(n.code,{children:"swagger.json"})," \u751f\u6210\u524d\u7aef\u4ee3\u7801\u65f6\uff0c",(0,i.jsx)(n.code,{children:"Swagger"})," \u4f1a\u81ea\u52a8\u6839\u636e\u8def\u7531\u5730\u5740\u751f\u6210\u8c03\u7528\u7684 ",(0,i.jsx)(n.code,{children:"api"})," \u540d\u79f0\uff0c\u4f46\u8fd9\u6837\u7684\u540d\u79f0\u5f80\u5f80\u4e0d\u6613\u8bfb\uff0c\u8fd9\u65f6\u5019\u53ef\u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"[OperationId]"})," \u6765\u914d\u7f6e\u751f\u6210\u7684\u524d\u7aef\u540d\u79f0\u3002"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5}",children:'using Furion.SpecificationDocument;\r\n\r\npublic class PersonDto\r\n{\r\n [OperationId("MyClientMethodName")]\r\n public string TestMethod()\r\n {\r\n // ...\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"6538-swagger-\u63a5\u53e3\u6587\u6863\u652f\u6301\u5b8c\u6574\u7684-markdown",children:["6.5.38 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u63a5\u53e3\u6587\u6863\u652f\u6301\u5b8c\u6574\u7684 ",(0,i.jsx)(n.code,{children:"Markdown"})]}),"\n",(0,i.jsxs)(n.p,{children:["\u5728 ",(0,i.jsx)(n.code,{children:"Furion"})," \u6700\u65b0\u7248\u4e2d\uff0c\u652f\u6301\u4e86\u5b8c\u6574\u7684 ",(0,i.jsx)(n.code,{children:"Markdown"})," \u6ce8\u518c\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,80}",children:'/// \r\n/// \u6d4b\u8bd5 Markdown\r\n/// \r\n/// \r\n/// # \u5148\u77e5 / Furion ([\u63a2\u7d22\u7248](https://gitee.com/dotnetchina/Furion/tree/experimental/))\r\n///\r\n/// \u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u6846\u67b6\uff0c\u60a8\u53ef\u4ee5\u5c06\u5b83\u96c6\u6210\u5230\u4efb\u4f55.NET/C# \u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\r\n///\r\n/// An application framework that you can integrate into any.NET/C# application.\r\n///\r\n/// ## \u5b89\u88c5 / Installation\r\n///\r\n/// - [Package Manager] (https://www.nuget.org/packages/Furion)\r\n///\r\n/// ```powershell\r\n/// Install-Package Furion\r\n/// ```\r\n///\r\n/// - [.NET CLI] (https://www.nuget.org/packages/Furion)\r\n///\r\n/// ```powershell\r\n/// dotnet add package Furion\r\n/// ```\r\n///\r\n/// ## \u4f8b\u5b50 / Examples\r\n///\r\n/// \u6211\u4eec\u5728[\u4e3b\u9875](http://furion.baiqian.ltd)\u4e0a\u6709\u4e0d\u5c11\u4f8b\u5b50\uff0c\u8fd9\u662f\u8ba9\u60a8\u5165\u95e8\u7684\u7b2c\u4e00\u4e2a\uff1a\r\n///\r\n/// We have several examples [on the website] (http://furion.baiqian.ltd). Here is the first one to get you started:\r\n///\r\n/// ```cs\r\n/// Serve.Run();\r\n///\r\n/// [DynamicApiController]\r\n/// public class HelloService\r\n/// {\r\n/// public string Say()\r\n/// {\r\n/// return "Hello, Furion";\r\n/// }\r\n/// }\r\n/// ```\r\n///\r\n/// \u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee `https://localhost:5001`\u3002\r\n///\r\n/// Open browser access `https://localhost:5001`.\r\n///\r\n/// ## \u6587\u6863 / Documentation\r\n///\r\n/// \u60a8\u53ef\u4ee5\u5728[\u4e3b\u9875] (http://furion.baiqian.ltd)\u6216[\u5907\u4efd\u4e3b\u9875](http://furion.baiqian.ltd)\u627e\u5230 Furion \u6587\u6863\u3002\r\n///\r\n/// You can find the Furion documentation[on the website](http://furion.baiqian.ltd) or [on the backup website](http://furion.baiqian.ltd).\r\n///\r\n/// ## \u8d21\u732e / Contributing\r\n///\r\n/// \u8be5\u5b58\u50a8\u5e93\u7684\u4e3b\u8981\u76ee\u7684\u662f\u7ee7\u7eed\u53d1\u5c55 Furion \u6838\u5fc3\uff0c\u4f7f\u5176\u66f4\u5feb\u3001\u66f4\u6613\u4e8e\u4f7f\u7528\u3002 Furion \u7684\u5f00\u53d1\u5728[Gitee](https://gitee.com/dotnetchina/Furion) \u4e0a\u516c\u5f00\u8fdb\u884c\uff0c\u6211\u4eec\u611f\u8c22\u793e\u533a\u8d21\u732e\u9519\u8bef\u4fee\u590d\u548c\u6539\u8fdb\u3002\r\n///\r\n/// \u9605\u8bfb[\u8d21\u732e\u6307\u5357] (http://furion.baiqian.ltd/docs/contribute)\u5185\u5bb9\uff0c\u4e86\u89e3\u5982\u4f55\u53c2\u4e0e\u6539\u8fdb Furion\u3002\r\n///\r\n/// The main purpose of this repository is to continue evolving Furion core, making it faster and easier to use.Development of Furion happens in the open on[Gitee] (https://gitee.com/dotnetchina/Furion), and we are grateful to the community for contributing bugfixes and improvements.\r\n///\r\n/// Read[contribution documents] (http://furion.baiqian.ltd/docs/contribute) to learn how you can take part in improving Furion.\r\n///\r\n/// ## \u8bb8\u53ef\u8bc1 / License\r\n///\r\n/// Furion \u91c7\u7528[MIT](https://gitee.com/dotnetchina/Furion/blob/v4/LICENSE) \u5f00\u6e90\u8bb8\u53ef\u8bc1\u3002\r\n///\r\n/// Furion uses the[MIT] (https://gitee.com/dotnetchina/Furion/blob/v4/LICENSE) open source license.\r\n///\r\n/// ```\r\n/// Copyright\xa9 2020-present \u767e\u5c0f\u50e7, Baiqian Co., Ltd.\r\n/// Furion is licensed under Mulan PSL v2.\r\n/// You can use this software according to the terms andconditions of the Mulan PSL v2.\r\n/// You may obtain a copy of Mulan PSL v2 at:\r\n/// https://gitee.com/dotnetchina/Furion/blob/v4/LICENSE\r\n/// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUTWARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.\r\n/// See the Mulan PSL v2 for more details.\r\n/// ```\r\n///\r\n/// \r\n/// \r\npublic string Hello()\r\n{\r\n return "Furion";\r\n}\n'})}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/mdx.png")}),"\n",(0,i.jsxs)(n.h3,{id:"6539-\u7b2c\u4e09\u65b9-ui-\u96c6\u6210\u5982-knife4jui",children:["6.5.39 \u7b2c\u4e09\u65b9 ",(0,i.jsx)(n.code,{children:"UI"})," \u96c6\u6210\uff0c\u5982 ",(0,i.jsx)(n.code,{children:"Knife4jUI"})]}),"\n",(0,i.jsxs)(n.p,{children:["\u5728 ",(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u4e2d\uff0c\u96c6\u6210\u7b2c\u4e09\u65b9 ",(0,i.jsx)(n.code,{children:"SwaggerUI"})," \u975e\u5e38\u5bb9\u6613\uff0c\u6bd4\u5982\u96c6\u6210 ",(0,i.jsx)(n.code,{children:"IGeekFan.AspNetCore.Knife4jUI"}),"\uff1a"]}),"\n",(0,i.jsx)(n.admonition,{title:"\u5b89\u88c5\u5305",type:"note",children:(0,i.jsxs)(n.p,{children:["\u53ea\u9700\u8981\u5728 ",(0,i.jsx)(n.code,{children:"YourPoject.Web.Core"})," \u5c42\u5b89\u88c5 ",(0,i.jsx)(n.code,{children:"IGeekFan.AspNetCore.Knife4jUI"})," \u5373\u53ef\u3002"]})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:[(0,i.jsx)(n.code,{children:"Knife4jUI"})," \u72ec\u7acb\u7248\u672c\u914d\u7f6e"]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3,12}",children:'var routePrefix = "api"; // \u5b9a\u4e49 swagger \u8def\u7531\u5730\u5740\uff0c\u5982\u679c\u662f\u8ddf\u76ee\u5f55\uff0c\u8bbe\u7f6e string.Empty \u5373\u53ef\r\n\r\napp.UseKnife4UI(options =>\r\n{\r\n options.RoutePrefix = routePrefix; // \u914d\u7f6e Knife4UI \u8def\u7531\u5730\u5740\r\n foreach (var groupInfo in SpecificationDocumentBuilder.GetOpenApiGroups())\r\n {\r\n options.SwaggerEndpoint("/" + groupInfo.RouteTemplate, groupInfo.Title);\r\n }\r\n});\r\n\r\napp.UseInject(routePrefix); // \u914d\u7f6e Furion \u8def\u7531\u5730\u5740\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:[(0,i.jsx)(n.code,{children:"Knife4jUI"})," \u548c ",(0,i.jsx)(n.code,{children:"Swagger"})," \u5171\u5b58\u7248\u672c\u914d\u7f6e"]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3,10}",children:'app.UseKnife4UI(options =>\r\n{\r\n options.RoutePrefix = "newapi"; // \u914d\u7f6e Knife4UI \u8def\u7531\u5730\u5740\uff0c\u73b0\u5728\u662f /newapi\r\n foreach (var groupInfo in SpecificationDocumentBuilder.GetOpenApiGroups())\r\n {\r\n options.SwaggerEndpoint("/" + groupInfo.RouteTemplate, groupInfo.Title);\r\n }\r\n});\r\n\r\napp.UseInject(); // Furion \u9ed8\u8ba4 api \u5730\u5740\u4e3a /api\n'})}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/sg20.png")}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["\u5982\u9700\u5b9e\u73b0\u767b\u5f55\u4e4b\u540e\u81ea\u52a8\u5c06 ",(0,i.jsx)(n.code,{children:"token"})," \u6dfb\u52a0\u5230\u5934\u90e8\u53ef\u5728\u767b\u5f55\u63a5\u53e3 ",(0,i.jsx)(n.code,{children:"AfterScript"})," \u6267\u884c\u4ee5\u4e0b\u4ee3\u7801\uff1a"]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'ke.global.setAllHeader(\r\n "Authorization",\r\n "Bearer " + ke.response.headers["access-token"]\r\n);\n'})}),"\n",(0,i.jsx)("img",{src:(0,l.Z)("img/kni.jpg")}),"\n",(0,i.jsxs)(n.h3,{id:"6540-\u6dfb\u52a0-swagger-\u8bf7\u6c42\u54cd\u5e94\u62e6\u622a",children:["6.5.40 \u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u8bf7\u6c42\u54cd\u5e94\u62e6\u622a"]}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u5e0c\u671b\u5728 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u8bf7\u6c42\u4e4b\u524d\u8fdb\u884c\u62e6\u622a\uff0c\u6bd4\u5982\u4fee\u6539 ",(0,i.jsx)(n.code,{children:"Url"})," \u53c2\u6570\uff0c\u6dfb\u52a0\u989d\u5916\u8bf7\u6c42\u5934\u7b49\uff0c\u53c8\u6216\u8005\u60f3\u5728\u54cd\u5e94\u4e4b\u540e\u6253\u5370\u8fd4\u56de\u503c\u5230\u63a7\u5236\u53f0\u6216\u8fdb\u884c\u5176\u4ed6\u64cd\u4f5c\u3002\u8fd9\u65f6\u5019\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u5904\u7406\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3,6,8}",children:'app.UseInject(options =>\r\n{\r\n options.ConfigureSwaggerUI(ui =>\r\n {\r\n // \u8bf7\u6c42\u62e6\u622a\r\n ui.UseRequestInterceptor("function(request) { return defaultRequestInterceptor(request); }");\r\n // \u54cd\u5e94\u62e6\u622a\r\n ui.UseResponseInterceptor("function(response) { return defaultResponseInterceptor(response); }");\r\n });\r\n});\n'})}),"\n",(0,i.jsxs)(n.p,{children:["\u6ce8\u610f\uff0c",(0,i.jsx)(n.code,{children:"UseRequestInterceptor"})," \u548c ",(0,i.jsx)(n.code,{children:"UseResponseInterceptor"})," \u4ee3\u7801\u4e0d\u80fd\u6362\u884c\u4e14\u987b\u5728 ",(0,i.jsx)(n.code,{children:"defaultRequestInterceptor(request)"})," \u548c ",(0,i.jsx)(n.code,{children:"defaultResponseInterceptor(response)"})," \u4e4b\u524d\u7f16\u5199\u81ea\u5b9a\u4e49\u4ee3\u7801\uff0c\u5426\u5219\u4f1a\u62a5\u9519\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u4e0b\u9762\u7ed9\u51fa\u8bf7\u6c42\u6dfb\u52a0\u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"header"})," \u793a\u4f8b\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {6}",children:"app.UseInject(options =>\r\n{\r\n options.ConfigureSwaggerUI(ui =>\r\n {\r\n // \u6dfb\u52a0\u8bf7\u6c42\u5934 framework: Furion\uff0c\u6ce8\u610f\u4ee3\u7801\u4e0d\u80fd\u6362\u884c\uff0c\u5426\u5219 Swagger \u65e0\u6cd5\u52a0\u8f7d !!!!\r\n ui.UseRequestInterceptor(\"function(request) { request.headers['framework']='Furion'; return defaultRequestInterceptor(request); }\");\r\n });\r\n});\n"})}),"\n",(0,i.jsx)(n.h3,{id:"6541-\u679a\u4e3e\u7c7b\u578b\u503c",children:"6.5.41 \u679a\u4e3e\u7c7b\u578b\u503c"}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion 4.8.8.35 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u679a\u4e3e\u7c7b\u578b\u503c\u4f1a\u751f\u6210\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5982\u9700\u751f\u6210\u503c\u7c7b\u578b\u5219\u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"[EnumToNumber]"})," \u7279\u6027\uff0c\u4f46\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5\uff0c\u90a3\u5c31\u662f",(0,i.jsx)(n.strong,{children:"\u5982\u679c\u679a\u4e3e\u9879\u5b58\u5728\u4e2d\u6587\uff0c\u4f1a\u5f3a\u5236\u751f\u6210\u4e3a\u503c\u7c7b\u578b"}),"\u3002"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u7f3a\u7701\u60c5\u51b5"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"public enum NoticeTypeEnum\r\n{\r\n NOTICE = 1,\r\n ANNOUNCEMENT = 2,\r\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u751f\u6210 ",(0,i.jsx)(n.code,{children:"TypeScript"})," \u4ee3\u7801\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",metastring:"showLineNumbers {2-3}",children:'export enum NoticeTypeEnum {\r\n NOTICE = "NOTICE",\r\n ANNOUNCEMENT = "ANNOUNCEMENT",\r\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u914d\u7f6e\u60c5\u51b5"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:"[EnumToNumber]\r\npublic enum NoticeTypeEnum\r\n{\r\n NOTICE = 1,\r\n ANNOUNCEMENT = 2,\r\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",metastring:"showLineNumbers {2-3}",children:"export enum NoticeTypeEnum {\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:["\u8fd9\u79cd\u7684 ",(0,i.jsx)(n.code,{children:"NUMBER_"})," \u89c4\u5219 ",(0,i.jsx)(n.code,{children:"Furion"})," \u65e0\u6cd5\u63a7\u5236\uff0c\u8fd9\u662f ",(0,i.jsx)(n.code,{children:"Swagger"})," \u751f\u6210\u7684\u3002"]})," \u8fd8\u53ef\u4ee5\u8bbe\u7f6e ",(0,i.jsx)(n.code,{children:"[EnumToNumber(false)]"})," \u751f\u6210\u5b57\u7b26\u4e32\u7c7b\u578b\u3002"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u5b58\u5728\u4e2d\u6587\u60c5\u51b5"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5}",children:"public enum NoticeTypeEnum\r\n{\r\n NOTICE = 1,\r\n ANNOUNCEMENT = 2,\r\n \u4e2d\u6587\r\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",metastring:"showLineNumbers {2-4}",children:"export enum NoticeTypeEnum {\r\n NUMBER_1 = 1,\r\n NUMBER_2 = 2,\r\n NUMBER_3 = 3,\r\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u9664\u4e86\u4e0a\u9762\u72ec\u7acb\u914d\u7f6e\u4ee5\u5916\u8fd8\u652f\u6301\u5168\u5c40\u914d\u7f6e\uff1a"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2-3}",children:'{\r\n "SpecificationDocumentSettings": {\r\n "EnumToNumber": true\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.h2,{id:"66-specificationdocumentsettings-\u914d\u7f6e",children:["6.6 ",(0,i.jsx)(n.code,{children:"SpecificationDocumentSettings"})," \u914d\u7f6e"]}),"\n",(0,i.jsxs)(n.p,{children:["\u9664\u4e86\u4e0a\u8ff0\u4f8b\u5b50\u5916\uff0c",(0,i.jsx)(n.code,{children:"Furion"})," \u63d0\u4f9b\u4e86\u4e00\u4e9b\u914d\u7f6e\u9009\u9879\uff0c\u5982\uff1a"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"DocumentTitle"}),"\uff1a\u6587\u6863\u6807\u9898\uff0c",(0,i.jsx)(n.code,{children:"string"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"Specification Api Document"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"DefaultGroupName"}),"\uff1a\u9ed8\u8ba4\u5206\u7ec4\u540d\uff0c",(0,i.jsx)(n.code,{children:"string"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"Default"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"EnableAuthorized"}),"\uff1a\u662f\u5426\u542f\u7528\u6743\u9650\u63a7\u5236\uff0c",(0,i.jsx)(n.code,{children:"bool"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FormatAsV2"}),"\uff1a\u91c7\u7528 ",(0,i.jsx)(n.code,{children:"Swagger 2.0"})," \u7248\u672c\uff0c",(0,i.jsx)(n.code,{children:"bool"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"false"})," ",(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.a,{href:"https://github.com/domaindrivendev/Swashbuckle.WebApi/issues/1393",children:"\u5df2\u5f03\u7528"})})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"RoutePrefix"}),"\uff1a\u89c4\u8303\u5316\u6587\u6863\u5730\u5740\uff0c",(0,i.jsx)(n.code,{children:"string"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"api"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u5982\u679c\u5e0c\u671b\u5728\u9996\u9875\uff0c\u6539\u4e3a\u7a7a\u5b57\u7b26\u4e32\u5373\u53ef"}),"\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"DocExpansionState"}),"\uff1a\u6587\u6863\u663e\u793a\u65b9\u5f0f\uff0c",(0,i.jsx)(n.code,{children:"DocExpansion"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"List"}),"\uff0c\u53d6\u503c\uff1a","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List"}),"\uff1a\u5217\u8868\u5f0f\uff08\u5c55\u5f00\u5b50\u7c7b\uff09\uff0c",(0,i.jsx)(n.strong,{children:"\u9ed8\u8ba4\u503c"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Full"}),"\uff1a\u5b8c\u5168\u5c55\u5f00"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"None"}),"\uff1a\u5217\u8868\u5f0f\uff08\u4e0d\u5c55\u5f00\u5b50\u7c7b\uff09"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"XmlComments"}),"\uff1a\u7a0b\u5e8f\u96c6\u6ce8\u91ca\u63cf\u8ff0\u6587\u4ef6\u540d\uff08\u53ef\u5e26 ",(0,i.jsx)(n.code,{children:".xml"}),"\uff0c",(0,i.jsx)(n.code,{children:"string"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"Furion.Application, Furion.Web.Entry, Furion.Web.Core"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"GroupOpenApiInfos"}),"\uff1a\u5206\u7ec4\u4fe1\u606f\u914d\u7f6e\uff0c",(0,i.jsx)(n.code,{children:"SpecificationOpenApiInfo[]"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"{ 'Group': 'Default'}"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"SecurityDefinitions"}),"\uff1a\u5b89\u5168\u7b56\u7565\u5b9a\u4e49\u914d\u7f6e\uff0c",(0,i.jsx)(n.code,{children:"SpecificationOpenApiSecurityScheme[]"}),"\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"[]"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Servers"}),"\uff1a\u914d\u7f6e Server \u4e0b\u62c9\u5217\u8868\uff0c",(0,i.jsx)(n.code,{children:"OpenApiServer[]"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"[]"}),"\uff0c\u5982\uff1a",(0,i.jsx)(n.code,{children:'{Servers:[ { Url:"\u5730\u5740", Description:"\u63cf\u8ff0"} ]}'})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"HideServers"}),"\uff1a\u662f\u5426\u9690\u85cf Server \u4e0b\u62c9\u5217\u8868\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"RouteTemplate"}),"\uff1a\u914d\u7f6e\u6587\u6863 ",(0,i.jsx)(n.code,{children:"swagger.json"})," \u8def\u7531\u6a21\u677f\uff0c\u9ed8\u8ba4\u6a21\u677f\uff1a",(0,i.jsx)(n.code,{children:"swagger/{documentName}/swagger.json"}),", ",(0,i.jsx)(n.code,{children:"{documentName}"})," \u4ee3\u8868\u5206\u7ec4\u540d\uff0c",(0,i.jsx)(n.strong,{children:"\u5fc5\u987b\u4fdd\u7559\u539f\u6837"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"PackagesGroups"}),"\uff1a\u914d\u7f6e\u6a21\u5757\u5316\u5185\u7f6e\u5206\u7ec4\u540d\u79f0\uff0c",(0,i.jsx)(n.code,{children:"string[]"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"[]"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"EnableEnumSchemaFilter"}),"\uff1a\u542f\u7528\u679a\u4e3e Schema \u7b5b\u9009\u5668\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"EnableTagsOrderDocumentFilter"}),"\uff1a\u542f\u7528\u6807\u7b7e\u6392\u5e8f\u7b5b\u9009\u5668\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ServerDir"}),"\uff1a\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"IIS"})," \u6dfb\u52a0 ",(0,i.jsx)(n.code,{children:"Application"})," \u90e8\u7f72\u540d\uff0c",(0,i.jsx)(n.code,{children:"string"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4\u7a7a\uff0c",(0,i.jsx)(n.strong,{children:"\u4ec5\u5728 Furion v3.2.0+` \u6709\u6548"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"LoginInfo"}),"\uff1a\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"Swagger"})," \u662f\u5426\u9700\u8981\u767b\u5f55\u624d\u80fd\u8bbf\u95ee\uff0c",(0,i.jsx)(n.code,{children:"SpecificationLoginInfo"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"null"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u4ec5\u5728 Furion v3.3.3+` \u6709\u6548"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Enabled"}),"\uff1a\u662f\u5426\u542f\u7528\u767b\u5f55\u6388\u6743\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"CheckUrl"}),"\uff1a\u68c0\u67e5\u767b\u5f55\u72b6\u6001\u7684 ",(0,i.jsx)(n.code,{children:"Url"})," \u5730\u5740\uff0c",(0,i.jsxs)(n.strong,{children:["\u8be5\u5730\u5740\u5fc5\u987b\u662f ",(0,i.jsx)(n.code,{children:"POST"})," \u8bf7\u6c42"]}),"\uff0c\u5df2\u6388\u6743\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"200"}),"\uff0c\u5426\u5219\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"401"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"SubmitUrl"}),"\uff1a\u63d0\u4ea4\u767b\u5f55\u7684 ",(0,i.jsx)(n.code,{children:"Url"})," \u5730\u5740\uff0c",(0,i.jsxs)(n.strong,{children:["\u8be5\u5730\u5740\u5fc5\u987b\u662f ",(0,i.jsx)(n.code,{children:"POST"})," \u8bf7\u6c42\u4e14\u53ea\u6709\u4e00\u4e2a ",(0,i.jsx)(n.code,{children:"SpecificationAuth"})," \u7c7b\u578b\u53c2\u6570"]}),"\uff0c\u6210\u529f\u767b\u5f55\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"200"}),"\uff0c\u5426\u5219\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"401"}),"\uff0c\u652f\u6301\u76f8\u5bf9\u5730\u5740\uff0c\u4ee5 ",(0,i.jsx)(n.code,{children:"/"})," \u5f00\u5934"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"EnableAllGroups"}),"\uff1a\u542f\u7528 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u603b\u5206\u7ec4\u529f\u80fd\uff0c\u81ea\u52a8\u5c06\u6240\u6709\u5206\u7ec4\u7684\u63a5\u53e3\u5408\u5e76\u5230 ",(0,i.jsx)(n.code,{children:"All Groups"})," \u4e2d\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"false"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u4ec5\u5728 Furion v3.3.4+` \u6709\u6548"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"EnumToNumber"}),"\uff1a\u679a\u4e3e\u7c7b\u578b\u751f\u6210\u503c\u7c7b\u578b\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"false"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u4ec5\u5728 Furion 4.8.8.35+` \u6709\u6548"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u53e6\u5916 ",(0,i.jsx)(n.code,{children:"SpecificationOpenApiInfo"})," \u5185\u7f6e\u914d\u7f6e\u5982\u4e0b\uff1a"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Group"}),"\uff1a\u5206\u7ec4\u552f\u4e00\u6807\u8bc6\uff0c",(0,i.jsx)(n.code,{children:"string"})," \u7c7b\u578b\uff0c\u5fc5\u586b"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Order"}),"\uff1a\u5206\u7ec4\u6392\u5e8f\uff0c",(0,i.jsx)(n.code,{children:"int"})," \u7c7b\u578b\uff0c\u6570\u5b57\u8d8a\u5927\u6392\u524d\u9762\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"0"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Visible"}),"\uff1a\u914d\u7f6e\u5206\u7ec4\u662f\u5426\u53ef\u89c1\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Title"}),"\uff1a\u914d\u7f6e\u5206\u7ec4\u6807\u9898\uff0c",(0,i.jsx)(n.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Description"}),"\uff1a\u914d\u7f6e\u5206\u7ec4\u63cf\u8ff0\uff0c",(0,i.jsx)(n.code,{children:"string"})," \u7c7b\u578b"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Version"}),"\uff1a\u914d\u7f6e\u5206\u7ec4\u7248\u672c\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"1.0"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TermsOfService"}),"\uff1a\u914d\u7f6e\u76f8\u5173\u94fe\u63a5\u5730\u5740\uff0c",(0,i.jsx)(n.code,{children:"Uri"})," \u7c7b\u578b"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Contact"}),"\uff1a\u914d\u7f6e\u8054\u7cfb\u65b9\u5f0f\uff0c",(0,i.jsx)(n.code,{children:"OpenApiContact"})," \u7c7b\u578b"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"License"}),"\uff1a\u914d\u7f6e\u534f\u8bae\uff0c",(0,i.jsx)(n.code,{children:"OpenApiLicense"})," \u7c7b\u578b"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"\u914d\u7f6e\u793a\u4f8b\uff1a"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "SpecificationDocumentSettings": {\r\n "GroupOpenApiInfos": [\r\n {\r\n "Group": "Group1",\r\n "Title": "\u5206\u7ec4\u6807\u9898",\r\n "Description": "\u8fd9\u91cc\u662f\u5206\u7ec4\u63cf\u8ff0",\r\n "Version": "\u7248\u672c\u53f7",\r\n "TermsOfService": "http://furion.baiqian.ltd",\r\n "Contact": {\r\n "Name": "\u767e\u5c0f\u50e7",\r\n "Url": "https://gitee.com/monksoul",\r\n "Email": "monksoul@outlook.com"\r\n },\r\n "License": {\r\n "Name": "MIT",\r\n "Url": "https://gitee.com/dotnetchina/Furion/blob/alpha/LICENSE"\r\n }\r\n }\r\n ]\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"67-\u7edf\u4e00\u8fd4\u56de\u503c\u6a21\u578b\u89c4\u8303\u5316\u7ed3\u679capi-\u8fd4\u56de\u503c",children:"6.7 \u7edf\u4e00\u8fd4\u56de\u503c\u6a21\u578b/\u89c4\u8303\u5316\u7ed3\u679c/API \u8fd4\u56de\u503c"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u63d0\u4f9b ",(0,i.jsx)(n.code,{children:"\u89c4\u8303\u5316\u7ed3\u679c"})," \u529f\u80fd\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b9e\u73b0 ",(0,i.jsx)(n.code,{children:"IUnifyResultProvider"})," \u63d0\u4f9b\u5668\u5b9e\u73b0\u7edf\u4e00\u89c4\u8303\u5316\u8fd4\u56de\u503c\u5b9a\u5236\uff0c\u5982\uff1a"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.strong,{children:"\u5b9a\u4e49\u7ed3\u679c\u5305\u88c5\u7c7b\u578b"})}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1-2}",children:"// \u5fc5\u987b\u662f\u6cdb\u578b\u7c7b\u578b\r\npublic class YourRESTfulResult\r\n{\r\n /// \r\n /// \u72b6\u6001\u7801\r\n /// \r\n public int? StatusCode { get; set; }\r\n\r\n /// \r\n /// \u6570\u636e\r\n /// \r\n public T Data { get; set; }\r\n\r\n /// \r\n /// \u6267\u884c\u6210\u529f\r\n /// \r\n public bool Succeeded { get; set; }\r\n\r\n /// \r\n /// \u9519\u8bef\u4fe1\u606f\r\n /// \r\n public object Errors { get; set; }\r\n\r\n /// \r\n /// \u9644\u52a0\u6570\u636e\r\n /// \r\n public object Extras { get; set; }\r\n\r\n /// \r\n /// \u65f6\u95f4\u6233\r\n /// \r\n public long Timestamp { get; set; }\r\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsxs)(n.strong,{children:["\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"IUnifyResultProvider"})," \u5b9e\u73b0\u7c7b\uff0c\u5e76\u8d34\u7279\u6027 ",(0,i.jsx)(n.code,{children:"[UnifyModel(typeof(YourRESTfulResult<>))]"})]})}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {15-16,24,36,48,61}",children:'using Furion.DataValidation;\r\nusing Furion.DependencyInjection;\r\nusing Furion.UnifyResult.Internal;\r\nusing Microsoft.AspNetCore.Http;\r\nusing Microsoft.AspNetCore.Mvc;\r\nusing Microsoft.AspNetCore.Mvc.Filters;\r\nusing System;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace YourProject.UnifyResult\r\n{\r\n /// \r\n /// RESTful \u98ce\u683c\u8fd4\u56de\u503c\r\n /// \r\n [UnifyModel(typeof(YourRESTfulResult<>))]\r\n public class YourRESTfulResultProvider : IUnifyResultProvider\r\n {\r\n /// \r\n /// \u5f02\u5e38\u8fd4\u56de\u503c\r\n /// \r\n /// \r\n /// \r\n /// \r\n public IActionResult OnException(ExceptionContext context, ExceptionMetadata metadata)\r\n {\r\n return new JsonResult(YourRESTfulResult(metadata.StatusCode, data: metadata.Data, errors: metadata.Errors)\r\n , UnifyContext.GetSerializerSettings(context)); // \u5f53\u524d\u884c\u4ec5\u9650 Furion 4.6.6+ \u4f7f\u7528\r\n }\r\n\r\n /// \r\n /// \u6210\u529f\u8fd4\u56de\u503c\r\n /// \r\n /// \r\n /// \r\n /// \r\n public IActionResult OnSucceeded(ActionExecutedContext context, object data)\r\n {\r\n return new JsonResult(YourRESTfulResult(StatusCodes.Status200OK, true, data)\r\n , UnifyContext.GetSerializerSettings(context)); // \u5f53\u524d\u884c\u4ec5\u9650 Furion 4.6.6+ \u4f7f\u7528\r\n }\r\n\r\n /// \r\n /// \u9a8c\u8bc1\u5931\u8d25\u8fd4\u56de\u503c\r\n /// \r\n /// \r\n /// \r\n /// \r\n public IActionResult OnValidateFailed(ActionExecutingContext context, ValidationMetadata metadata)\r\n {\r\n return new JsonResult(YourRESTfulResult(metadata.StatusCode ?? StatusCodes.Status400BadRequest, data: metadata.Data, errors: metadata.ValidationResult)\r\n , UnifyContext.GetSerializerSettings(context)); // \u5f53\u524d\u884c\u4ec5\u9650 Furion 4.6.6+ \u4f7f\u7528\r\n }\r\n\r\n /// \r\n /// \u7279\u5b9a\u72b6\u6001\u7801\u8fd4\u56de\u503c\r\n /// \r\n /// \r\n /// \r\n /// \r\n /// \r\n public async Task OnResponseStatusCodes(HttpContext context, int statusCode, UnifyResultSettingsOptions unifyResultSettings)\r\n {\r\n // \u8bbe\u7f6e\u54cd\u5e94\u72b6\u6001\u7801\r\n UnifyContext.SetResponseStatusCodes(context, statusCode, unifyResultSettings);\r\n\r\n switch (statusCode)\r\n {\r\n // \u5904\u7406 401 \u72b6\u6001\u7801\r\n case StatusCodes.Status401Unauthorized:\r\n await context.Response.WriteAsJsonAsync(YourRESTfulResult(statusCode, errors: "401 Unauthorized")\r\n , App.GetOptions()?.JsonSerializerOptions);\r\n break;\r\n // \u5904\u7406 403 \u72b6\u6001\u7801\r\n case StatusCodes.Status403Forbidden:\r\n await context.Response.WriteAsJsonAsync(YourRESTfulResult(statusCode, errors: "403 Forbidden")\r\n , App.GetOptions()?.JsonSerializerOptions);\r\n break;\r\n default: break;\r\n }\r\n }\r\n\r\n /// \r\n /// \u8fd4\u56de RESTful \u98ce\u683c\u7ed3\u679c\u96c6\r\n /// \r\n /// \r\n /// \r\n /// \r\n /// \r\n /// \r\n private static YourRESTfulResult YourRESTfulResult(int statusCode, bool succeeded = default, object data = default, object errors = default)\r\n {\r\n return new YourRESTfulResult\r\n {\r\n StatusCode = statusCode,\r\n Succeeded = succeeded,\r\n Data = data,\r\n Errors = errors,\r\n Extras = UnifyContext.Take(),\r\n Timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()\r\n };\r\n }\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["\u4e4b\u540e\u5728 ",(0,i.jsx)(n.code,{children:"Startup.cs"})," \u4e2d\u6ce8\u518c\u5373\u53ef\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"services.AddControllers()\r\n .AddInjectWithUnifyResult();\n"})}),"\n",(0,i.jsxs)(n.admonition,{title:"\u7279\u522b\u6ce8\u610f",type:"important",children:[(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u89c4\u8303\u5316\u7ed3\u679c\u4e0d\u4f1a\u5bf9 ",(0,i.jsx)(n.code,{children:"401"})," \u548c ",(0,i.jsx)(n.code,{children:"403"}),"\u3001",(0,i.jsx)(n.code,{children:"404"})," \u72b6\u6001\u7801\u8fdb\u884c\u89c4\u8303\u5316\u5904\u7406\uff0c\u5982\u9700\u542f\u52a8\u8be5\u72b6\u6001\u7801\u5904\u7406\uff0c\u53ea\u9700\u5728 ",(0,i.jsx)(n.code,{children:"Startup.cs"})," \u4e2d\u7684 ",(0,i.jsx)(n.code,{children:"Configure"})," \u4e2d\u542f\u7528\u63a5\u53e3\uff1a"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\r\n{\r\n if (env.IsDevelopment())\r\n {\r\n app.UseDeveloperExceptionPage();\r\n }\r\n // \u6dfb\u52a0\u89c4\u8303\u5316\u7ed3\u679c\u72b6\u6001\u7801\uff0c\u9700\u8981\u5728\u8fd9\u91cc\u6ce8\u518c\r\n app.UseUnifyResultStatusCodes();\r\n // \u5176\u4ed6\u6ce8\u518c...\r\n}\n"})})]}),"\n",(0,i.jsx)(n.h3,{id:"671-\u6392\u9664\u89c4\u8303\u5316\u5904\u7406",children:"6.7.1 \u6392\u9664\u89c4\u8303\u5316\u5904\u7406"}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u4e9b\u65f6\u5019\uff0c\u6211\u4eec\u67d0\u4e9b\u63a5\u53e3\u4e0d\u9700\u8981\u8fdb\u884c\u89c4\u8303\u5316\u5904\u7406\uff0c\u8fd9\u65f6\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5e16 ",(0,i.jsx)(n.code,{children:"[NonUnify]"})," \u7279\u6027\u5373\u53ef\u3002"]}),"\n",(0,i.jsx)(n.h3,{id:"672-\u89c4\u8303\u5316\u7ed3\u679c\u6dfb\u52a0\u989d\u5916\u6570\u636e",children:"6.7.2 \u89c4\u8303\u5316\u7ed3\u679c\u6dfb\u52a0\u989d\u5916\u6570\u636e"}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u7684\u89c4\u8303\u5316\u7ed3\u679c\u4e2d\u5305\u542b ",(0,i.jsx)(n.code,{children:"extras"})," \u5c5e\u6027\uff0c\u53ef\u4ee5\u914d\u7f6e\u989d\u5916\u6570\u636e\u8fd4\u56de\u5230\u5ba2\u6237\u7aef\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'UnifyContext.Fill(new { Message = "\u64cd\u4f5c\u6210\u529f" });\n'})}),"\n",(0,i.jsx)(n.h3,{id:"673-\u81ea\u5b9a\u4e49\u7279\u522b\u63a5\u53e3\u89c4\u8303\u5316\u7ed3\u679c",children:"6.7.3 \u81ea\u5b9a\u4e49\u7279\u522b\u63a5\u53e3\u89c4\u8303\u5316\u7ed3\u679c"}),"\n",(0,i.jsxs)(n.p,{children:["\u6709\u4e9b\u65f6\u5019\uff0c\u6211\u4eec\u7279\u5b9a\u63a5\u53e3\u9700\u8fd4\u56de\u7279\u5b9a\u7684\u63a5\u53e3\u7c7b\u578b\uff0c\u65e0\u9700\u89c4\u8303\u5316\u5904\u7406\uff0c\u8fd9\u65f6\u5019\u6211\u4eec\u53ea\u9700\u8981\u8d34 ",(0,i.jsx)(n.code,{children:"[UnifyResult(typeof(\u7ed3\u679c\u7c7b))]"})," \u6216 ",(0,i.jsx)(n.code,{children:"[ProducesResponseType(typeof(\u7ed3\u679c\u7c7b),200)]"}),"\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"[UnifyResult(typeof(Person))]\r\npublic Person GetPerson(int id)\r\n{\r\n // ...\r\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"68-\u652f\u6301\u591a\u5957\u89c4\u8303\u5316\u914d\u7f6e",children:"6.8 \u652f\u6301\u591a\u5957\u89c4\u8303\u5316\u914d\u7f6e"}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion 4.4.4 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsx)(n.p,{children:"\u5728\u4e00\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u9488\u5bf9\u7279\u5b9a\u7684\u63a7\u5236\u5668\uff08\u52a8\u6001 WebAPI\uff09\u6216\u7279\u5b9a\u7684\u65b9\u6cd5\u4f7f\u7528\u4e0d\u540c\u7684\u89c4\u8303\u5316\u5904\u7406\u673a\u5236\uff0c\u8fd9\u65f6\u5c31\u9700\u8981\u591a\u5957\u89c4\u8303\u5316\u5904\u7406\u63d0\u4f9b\u5668\uff0c\u5982\uff1a"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.strong,{children:"\u5b9a\u4e49\u89c4\u8303\u5316\u5904\u7406\u63d0\u4f9b\u7a0b\u5e8f"})}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1-2,25}",children:"[UnifyModel(typeof(MyResult<>))]\r\npublic class SpeciallyResultProvider : IUnifyResultProvider\r\n{\r\n public IActionResult OnException(ExceptionContext context, ExceptionMetadata metadata)\r\n {\r\n // \u53c2\u8003\u4e0a\u9762\u7684\u89c4\u8303\u5316\u5904\u7406\u5199\u6cd5\r\n }\r\n\r\n public IActionResult OnSucceeded(ActionExecutedContext context, object data)\r\n {\r\n // \u53c2\u8003\u4e0a\u9762\u7684\u89c4\u8303\u5316\u5904\u7406\u5199\u6cd5\r\n }\r\n\r\n public IActionResult OnValidateFailed(ActionExecutingContext context, ValidationMetadata metadata)\r\n {\r\n // \u53c2\u8003\u4e0a\u9762\u7684\u89c4\u8303\u5316\u5904\u7406\u5199\u6cd5\r\n }\r\n\r\n public async Task OnResponseStatusCodes(HttpContext context, int statusCode, UnifyResultSettingsOptions unifyResultSettings)\r\n {\r\n // \u53c2\u8003\u4e0a\u9762\u7684\u89c4\u8303\u5316\u5904\u7406\u5199\u6cd5\r\n }\r\n}\r\n\r\npublic class MyResult\r\n{\r\n /// \r\n /// \u6570\u636e\r\n /// \r\n public T Data { get; set; }\r\n}\n"})}),"\n",(0,i.jsxs)(n.ol,{start:"2",children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.strong,{children:"\u6ce8\u518c\u89c4\u8303\u5316\u5904\u7406\u63d0\u4f9b\u5668"})}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'services.AddUnifyProvider("specially"); // \u6307\u5b9a\u89c4\u8303\u5316\u552f\u4e00\u540d\u79f0\uff0c\u5982\u679c\u4e0d\u6307\u5b9a\u5c31\u4f1a\u66ff\u4ee3\u9ed8\u8ba4\u7684\n'})}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.strong,{children:"\u5728\u63a7\u5236\u5668/\u52a8\u6001 WebAPI \u4e2d\u4f7f\u7528"})}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,8,14}",children:'public class TestUnifyProvider : IDynamicApiController\r\n{\r\n public string DefaultUnify()\r\n {\r\n return "test";\r\n }\r\n\r\n [UnifyProvider]\r\n public string DefaultUnify2()\r\n {\r\n return "test";\r\n }\r\n\r\n [UnifyProvider("specially")]\r\n public string SpeciallyUnify()\r\n {\r\n return "\u7279\u522b";\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"69-\u9488\u5bf9\u7279\u5b9a\u63a7\u5236\u5668\u6216\u7279\u5b9a\u65b9\u6cd5\u914d\u7f6e\u5e8f\u5217\u5316\u9009\u9879",children:"6.9 \u9488\u5bf9\u7279\u5b9a\u63a7\u5236\u5668\u6216\u7279\u5b9a\u65b9\u6cd5\u914d\u7f6e\u5e8f\u5217\u5316\u9009\u9879"}),"\n",(0,i.jsxs)(n.p,{children:["\u5f88\u5c11\u5f00\u53d1\u8005\u6ce8\u610f\u5230 ",(0,i.jsx)(n.code,{children:"new JsonResult(data)"})," \u5b9e\u9645\u4e0a\u6709\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7684\uff0c\u4e5f\u5c31\u662f ",(0,i.jsx)(n.code,{children:"new JsonResult(data, serializerSettings)"}),"\uff0c\u90a3\u4e48\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u903b\u8f91\u4f20\u9012\u7b2c\u4e8c\u4e2a\u53c2\u6570\uff0c\u5982\u679c\u4e0d\u4f20\u9012\u5219\u91c7\u7528\u5168\u5c40\u914d\u7f6e\u7684\u5e8f\u5217\u5316\u9009\u9879\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u63d0\u4f9b\u4e24\u79cd\u5904\u7406\u65b9\u5f0f\u3002"]}),"\n",(0,i.jsxs)(n.h3,{id:"691-\u901a\u8fc7-jsonresult-\u8bbe\u7f6e\u7b2c\u4e8c\u4e2a\u53c2\u6570",children:["6.9.1 \u901a\u8fc7 ",(0,i.jsx)(n.code,{children:"JsonResult"})," \u8bbe\u7f6e\u7b2c\u4e8c\u4e2a\u53c2\u6570"]}),"\n",(0,i.jsx)(n.p,{children:"\u8fd9\u79cd\u65b9\u5f0f\u6bd4\u8f83\u539f\u59cb\u5316\uff0c\u4ee3\u7801\u6bd4\u8f83\u7e41\u6742\uff0c\u4e5f\u4e0d\u5229\u4e8e\u7ef4\u62a4\u3002"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,4,13-16}",children:'[NonUnify]\r\npublic IActionResult SpecialApi()\r\n{\r\n return new JsonResult(new YourRESTfulResult\r\n {\r\n StatusCode = 200,\r\n Succeeded = true,\r\n Data = new\r\n {\r\n Name = "Furion"\r\n },\r\n Timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()\r\n }, new JsonSerializerOptions\r\n {\r\n PropertyNamingPolicy = null\r\n });\r\n}\n'})}),"\n",(0,i.jsxs)(n.h3,{id:"692-\u6ce8\u518c\u591a\u5957\u5e8f\u5217\u5316\u914d\u7f6e\u9009\u9879-\u63a8\u8350",children:["6.9.2 \u6ce8\u518c\u591a\u5957\u5e8f\u5217\u5316\u914d\u7f6e\u9009\u9879 ",(0,i.jsx)(n.strong,{children:"(\u63a8\u8350)"})]}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion 4.6.6 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsxs)(n.p,{children:["\u5728 ",(0,i.jsx)(n.code,{children:"Startup.cs"})," \u4e2d\u6ce8\u518c\u4e00\u5957\u65b0\u7684\u89c4\u5219\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:'services.AddUnifyJsonOptions("special", new JsonSerializerOptions // \u5982\u679c\u4f7f\u7528 Newtonsoft.Json => new JsonSerializerSettings\r\n{\r\n PropertyNamingPolicy = null\r\n});\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u4ee3\u7801\u4f7f\u7528\uff1a"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:'[UnifySerializerSetting("special")]\r\npublic object SpecialApi()\r\n{\r\n return new\r\n {\r\n Name = "Furion"\r\n }\r\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["\u4e5f\u53ef\u4ee5\u624b\u52a8\u8fd4\u56de ",(0,i.jsx)(n.code,{children:"IActionResult"})," \u65b9\u5f0f\uff1a"]}),"\n",(0,i.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,i.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,i.jsx)(n.code,{children:"Furion 4.8.7.1 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,6}",children:'public IActionResult SpecialApi()\r\n{\r\n return new JsonResult(new\r\n {\r\n Name = "Furion"\r\n }, UnifyContext.GetSerializerSettings("special"));\r\n}\n'})}),"\n",(0,i.jsx)(n.admonition,{title:"\u7279\u522b\u63d0\u9192",type:"warning",children:(0,i.jsxs)(n.p,{children:["\u76ee\u524d ",(0,i.jsx)(n.code,{children:"Swagger"})," \u6682\u672a\u63d0\u4f9b\u4e2a\u522b\u7684\u63a5\u53e3\u81ea\u5b9a\u4e49 ",(0,i.jsx)(n.code,{children:"schema"})," \u5e8f\u5217\u5316\u9009\u9879\u3002"]})}),"\n",(0,i.jsx)(n.h2,{id:"610-\u53cd\u9988\u4e0e\u5efa\u8bae",children:"6.10 \u53cd\u9988\u4e0e\u5efa\u8bae"}),"\n",(0,i.jsx)(n.admonition,{title:"\u4e0e\u6211\u4eec\u4ea4\u6d41",type:"note",children:(0,i.jsxs)(n.p,{children:["\u7ed9 Furion \u63d0 ",(0,i.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/new?issue",children:"Issue"}),"\u3002"]})})]})}function j(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},5162:(e,n,r)=>{r.d(n,{Z:()=>l});r(7294);var i=r(4334);const s={tabItem:"tabItem_Ymn6"};var c=r(5893);function l(e){let{children:n,hidden:r,className:l}=e;return(0,c.jsx)("div",{role:"tabpanel",className:(0,i.Z)(s.tabItem,l),hidden:r,children:n})}},4866:(e,n,r)=>{r.d(n,{Z:()=>w});var i=r(7294),s=r(4334),c=r(2466),l=r(6550),o=r(469),t=r(1980),d=r(7392),a=r(12);function h(e){return i.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,i.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:r}=e;return(0,i.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:r,attributes:i,default:s}}=e;return{value:n,label:r,attributes:i,default:s}}))}(r);return function(e){const n=(0,d.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,r])}function x(e){let{value:n,tabValues:r}=e;return r.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:r}=e;const s=(0,l.k6)(),c=function(e){let{queryString:n=!1,groupId:r}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:n,groupId:r});return[(0,t._X)(c),(0,i.useCallback)((e=>{if(!c)return;const n=new URLSearchParams(s.location.search);n.set(c,e),s.replace({...s.location,search:n.toString()})}),[c,s])]}function j(e){const{defaultValue:n,queryString:r=!1,groupId:s}=e,c=u(e),[l,t]=(0,i.useState)((()=>function(e){let{defaultValue:n,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!x({value:n,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const i=r.find((e=>e.default))??r[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:n,tabValues:c}))),[d,h]=p({queryString:r,groupId:s}),[j,g]=function(e){let{groupId:n}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,c]=(0,a.Nk)(r);return[s,(0,i.useCallback)((e=>{r&&c.set(e)}),[r,c])]}({groupId:s}),m=(()=>{const e=d??j;return x({value:e,tabValues:c})?e:null})();(0,o.Z)((()=>{m&&t(m)}),[m]);return{selectedValue:l,selectValue:(0,i.useCallback)((e=>{if(!x({value:e,tabValues:c}))throw new Error(`Can't select invalid tab value=${e}`);t(e),h(e),g(e)}),[h,g,c]),tabValues:c}}var g=r(2389);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=r(5893);function b(e){let{className:n,block:r,selectedValue:i,selectValue:l,tabValues:o}=e;const t=[],{blockElementScrollPositionUntilNextRender:d}=(0,c.o5)(),a=e=>{const n=e.currentTarget,r=t.indexOf(n),s=o[r].value;s!==i&&(d(n),l(s))},h=e=>{let n=null;switch(e.key){case"Enter":a(e);break;case"ArrowRight":{const r=t.indexOf(e.currentTarget)+1;n=t[r]??t[0];break}case"ArrowLeft":{const r=t.indexOf(e.currentTarget)-1;n=t[r]??t[t.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":r},n),children:o.map((e=>{let{value:n,label:r,attributes:c}=e;return(0,f.jsx)("li",{role:"tab",tabIndex:i===n?0:-1,"aria-selected":i===n,ref:e=>t.push(e),onKeyDown:h,onClick:a,...c,className:(0,s.Z)("tabs__item",m.tabItem,c?.className,{"tabs__item--active":i===n}),children:r??n},n)}))})}function S(e){let{lazy:n,children:r,selectedValue:s}=e;const c=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){const e=c.find((e=>e.props.value===s));return e?(0,i.cloneElement)(e,{className:"margin-top--md"}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:c.map(((e,n)=>(0,i.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function v(e){const n=j(e);return(0,f.jsxs)("div",{className:(0,s.Z)("tabs-container",m.tabList),children:[(0,f.jsx)(b,{...e,...n}),(0,f.jsx)(S,{...e,...n})]})}function w(e){const n=(0,g.Z)();return(0,f.jsx)(v,{...e,children:h(e.children)},String(n))}},510:(e,n,r)=>{r.d(n,{Z:()=>H});r(7294);const i=(e,n,r)=>e?"string"==typeof e?e:e[n]||r:r;var s=r(5893);const c={display:"block"},l=e=>{let{size:n,color:r,style:l,...o}=e;const t=l?{...c,...l}:c;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:t,...o,children:(0,s.jsx)("path",{d:"M856.4 292.8c-63.3-63.6-126.6-127.1-190.2-190.3-15.3-15.2-32.7-16.1-48.1-0.8-64.3 63.6-128.1 127.6-191.8 191.9-14 14.2-16.3 31.6-1.7 46 14.8 14.7 31.5 10.6 46.1-2.7 5.1-4.6 9.8-9.7 14.7-14.7 39.2-39.7 78.5-79.5 122.8-124.4 0 170 3 332.2-1.1 494-2.4 96.4-91.2 174.6-187.4 176.6-110.6 2.3-198.6-84.4-199-197.4-0.6-136.3-0.2-272.6-0.1-408.9 0-21.8-7.9-37.4-31.2-39.9-18.9-2-33.2 13.2-33.1 37.5 0 145.8-3.4 291.7 2.4 437.2 6 152.1 160.4 263.5 309.5 230.5C591.8 900 672.8 797.2 673.6 664.6c0.8-144 0.2-288.1 0.2-432.1v-33.3c11.2 10.2 17.6 15.4 23.3 21.3 38.5 38.4 76.7 77 115.3 115.2 14.8 14.6 32.2 19.2 47.8 2.9 13.8-14.8 10.3-31.7-3.8-45.8z",fill:i(r,0,"#333333")})})};l.defaultProps={size:18};const o=l,t={display:"block"},d=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...t,...c}:t;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:[(0,s.jsx)("path",{d:"M143.872 768a51.2 51.2 0 0 1-15.36-2.56 51.2 51.2 0 0 1-35.328-51.2V283.136a148.992 148.992 0 0 1 141.824-153.6h450.56a148.992 148.992 0 0 1 141.824 153.6V512a148.992 148.992 0 0 1-141.824 153.6H244.224l-60.928 80.896a51.2 51.2 0 0 1-39.424 21.504zM235.008 180.224a97.792 97.792 0 0 0-90.624 102.4v430.592L218.624 614.4h466.944a97.792 97.792 0 0 0 90.624-102.4V283.136a97.792 97.792 0 0 0-90.624-102.4z",fill:i(r,0,"#333333")}),(0,s.jsx)("path",{d:"M880.128 875.52a51.2 51.2 0 0 1-39.424-20.48l-60.928-80.896h-243.2a25.6 25.6 0 0 1 0-51.2h268.8l76.288 102.4v-295.936a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v293.888a51.2 51.2 0 0 1-51.2 51.2z",fill:i(r,1,"#333333")})]})};d.defaultProps={size:18};const a=d,h={display:"block"},u=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...h,...c}:h;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:[(0,s.jsx)("path",{d:"M223.425605 449.2744l161.632237 0 0 253.65714c0 16.954137 13.745049 30.699186 30.699186 30.699186 16.95516 0 30.699186-13.745049 30.699186-30.699186l0-284.356326c0-16.95516-13.744026-30.699186-30.699186-30.699186L291.035446 387.876028l217.23665-248.51605L733.039255 387.580293 607.104031 387.580293c-16.954137 0-30.699186 13.745049-30.699186 30.699186l0 284.652062c0 16.954137 13.745049 30.699186 30.699186 30.699186s30.699186-13.745049 30.699186-30.699186L637.803217 448.978664l164.448376 0c12.140505 0 23.140023-7.154957 28.063149-18.251689 4.922103-11.097756 2.841721-24.053835-5.307889-33.05279L530.62315 72.570829c-5.881964-6.495948-14.273075-10.134825-23.024389-10.091846-8.763594 0.076748-17.076934 3.895727-22.844288 10.494005L200.312188 398.371056c-7.92653 9.067516-9.818623 21.931498-4.839215 32.896224S211.383338 449.2744 223.425605 449.2744z",fill:i(r,0,"#333333")}),(0,s.jsx)("path",{d:"M222.354204 829.113381l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186s-13.745049-30.699186-30.699186-30.699186L222.354204 767.715009c-16.954137 0-30.699186 13.745049-30.699186 30.699186S205.400067 829.113381 222.354204 829.113381z",fill:i(r,1,"#333333")}),(0,s.jsx)("path",{d:"M804.086381 896.729361 222.354204 896.729361c-16.954137 0-30.699186 13.745049-30.699186 30.699186s13.745049 30.699186 30.699186 30.699186l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186S821.041542 896.729361 804.086381 896.729361z",fill:i(r,2,"#333333")})]})};u.defaultProps={size:18};const x=u,p={display:"block"},j=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...p,...c}:p;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:(0,s.jsx)("path",{d:"M380.15463648 874.54223633c0 18.12744166-14.83154297 32.95898463-32.95898463 32.95898463s-32.95898463-14.83154297-32.95898462-32.95898463V228.9152832L172.71078883 370.86962865a33.04467773 33.04467773 0 0 1-46.60400416 0 33.04467773 33.04467773 0 0 1 0-46.6040034l197.55615234-198.14941406A32.76782227 32.76782227 0 0 1 347.0967749 116.52514674c0.03295924 0 0.06591772-0.03295924 0.09887695-0.03295924 1.54907201 0 2.90039088 0.69213867 4.41650366 0.88989258 2.66967773 0.39550781 5.40527318 0.59326172 7.94311548 1.61499049 12.03002904 4.94384766 20.59936549 16.71020508 20.59936549 30.45410156v725.0910642z m320.15698192 23.34155248a32.85351537 32.85351537 0 0 1-23.43383789 9.59106445c-0.03295924 0-0.06591772 0.03295924-0.09887696 0.03295924-1.54907201 0-2.90039088-0.69213867-4.41650365-0.92285182-2.70263697-0.36254857-5.40527318-0.56030248-7.94311549-1.61498972-12.03002904-4.91088842-20.59936549-16.67724584-20.59936473-30.42114309V149.45776367c0-18.12744166 14.83154297-32.95898463 32.95898387-32.95898463s32.95898463 14.83154297 32.95898463 32.95898463v645.60058619l141.52587916-141.92138697c12.81445313-12.82104467 33.81591797-12.82104467 46.63037109 0 12.78808619 12.81445313 12.78808619 33.77636719 0 46.60400416L700.3116184 897.88378881z",fill:i(r,0,"#333333")})})};j.defaultProps={size:18};const g=j,m={display:"block"},f=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...m,...c}:m;return(0,s.jsx)("svg",{viewBox:"0 0 1172 1024",width:n+"px",height:n+"px",style:o,...l,children:(0,s.jsx)("path",{d:"M870.0416 250.4704a38.4 38.4 0 0 0-8.96 53.5552c13.056 18.2784 24.4224 37.8368 33.7408 58.112a38.4512 38.4512 0 0 0 50.944 18.8928 38.4512 38.4512 0 0 0 18.8416-50.944 436.0192 436.0192 0 0 0-40.96-70.6048 38.3488 38.3488 0 0 0-53.6064-9.0112zM181.4528 566.016a35.9936 35.9936 0 0 0 25.5488-10.5984L351.7952 410.624a36.096 36.096 0 1 0-51.0976-51.0976L217.6 442.5728C250.0096 278.1184 395.264 153.6 569.1392 153.6c50.7904 0 99.8912 10.3936 145.92 30.9248a38.4 38.4 0 1 0 31.232-70.0928 431.36 431.36 0 0 0-177.152-37.632c-214.6816 0-393.1136 156.416-428.4416 361.216L62.1568 359.4752a36.1984 36.1984 0 0 0-51.0976 51.0976l144.8448 144.7936a36.0448 36.0448 0 0 0 25.5488 10.6496zM978.5344 463.104a36.1984 36.1984 0 0 0-51.0976 0l-144.8448 144.7936a36.096 36.096 0 1 0 51.0976 51.0976l88.6272-88.576C894.3104 740.2496 746.8032 870.4 569.1392 870.4a357.7856 357.7856 0 0 1-325.2736-207.7184 38.4 38.4 0 1 0-69.7344 32.3072 434.3808 434.3808 0 0 0 394.9568 252.2112c215.1936 0 393.984-157.184 428.6464-362.7008l74.496 74.496a35.9936 35.9936 0 0 0 51.0976 0 36.096 36.096 0 0 0 0-51.0976l-144.7936-144.7936z",fill:i(r,0,"#333333")})})};f.defaultProps={size:18};const b=f,S={display:"block"},v=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...S,...c}:S;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:[(0,s.jsx)("path",{d:"M302 332a30 30 0 1 1 0-60h420a30 30 0 0 1 0 60H302zM302 542a30 30 0 0 1 0-60h420a30 30 0 0 1 0 60H302zM302 752a30 30 0 0 1 0-60h120a30 30 0 0 1 0 60H302z",fill:i(r,0,"#333333")}),(0,s.jsx)("path",{d:"M789.47 784.1a30 30 0 0 1 39.36 45.3l-144.24 125.25a30 30 0 0 1-19.68 7.35H214.85C163.4 962 122 919.46 122 867.38V156.62C122 104.54 163.4 62 214.85 62h594.3C860.6 62 902 104.54 902 156.62v529.05a30 30 0 1 1-60 0V156.62C842 137.3 827.09 122 809.15 122H214.85C196.91 122 182 137.3 182 156.62v710.76C182 886.7 196.91 902 214.85 902h438.84l135.78-117.9z",fill:i(r,1,"#333333")}),(0,s.jsx)("path",{d:"M692 931.19a30 30 0 1 1-60 0v-174.6C632 704.57 673.4 662 724.85 662h147.78a30 30 0 0 1 0 60h-147.78c-17.94 0-32.85 15.3-32.85 34.62v174.6z",fill:i(r,2,"#333333")})]})};v.defaultProps={size:18};const w=v,y={display:"block"},N=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...y,...c}:y;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:[(0,s.jsx)("path",{d:"M512 883.2A371.2 371.2 0 1 0 140.8 512 371.2 371.2 0 0 0 512 883.2z m0 64a435.2 435.2 0 1 1 435.2-435.2 435.2 435.2 0 0 1-435.2 435.2z",fill:i(r,0,"#333333")}),(0,s.jsx)("path",{d:"M557.056 512l122.368 122.368a31.744 31.744 0 1 1-45.056 45.056L512 557.056l-122.368 122.368a31.744 31.744 0 1 1-45.056-45.056L466.944 512 344.576 389.632a31.744 31.744 0 1 1 45.056-45.056L512 466.944l122.368-122.368a31.744 31.744 0 1 1 45.056 45.056z",fill:i(r,1,"#333333")})]})};N.defaultProps={size:18};const I=N,A={display:"block"},C=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...A,...c}:A;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:[(0,s.jsx)("path",{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 34.8-28.2 63-63 63H232c-34.8 0-63-28.2-63-63 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5 0.2 13 0.7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7 6 17.2 13.6 33.6 22.7 49 24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2c41.5-24.3 76.2-59 100.5-100.5 9.1-15.5 16.7-31.9 22.7-49C812.1 793.1 836 831.8 836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7 0.4-6.4 0.7-12.8 0.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3-20.1 11.8-42 20-64.9 24.3V484c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v396.5c-22.9-4.3-44.8-12.5-64.9-24.3-30.3-17.7-55.6-43-73.3-73.3C317.7 752 308 716.8 308 680V412h408v268z",fill:i(r,0,"#333333")}),(0,s.jsx)("path",{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1-17.2-31.5-42.5-56.8-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9-31.5 17.2-56.8 42.5-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z",fill:i(r,1,"#333333")})]})};C.defaultProps={size:18};const F=C,T={display:"block"},E=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...T,...c}:T;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:[(0,s.jsx)("path",{d:"M512 71.68c-242.688 0-440.32 197.632-440.32 440.32s197.632 440.32 440.32 440.32 440.32-197.632 440.32-440.32-197.632-440.32-440.32-440.32z m0 819.2c-208.896 0-378.88-169.984-378.88-378.88s169.984-378.88 378.88-378.88 378.88 169.984 378.88 378.88-169.984 378.88-378.88 378.88z",fill:i(r,0,"#333333")}),(0,s.jsx)("path",{d:"M542.72 261.12H481.28v220.16H261.12v61.44h220.16v220.16h61.44v-220.16h220.16V481.28h-220.16z",fill:i(r,1,"#333333")})]})};E.defaultProps={size:18};const D=E,R={display:"block"},U=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...R,...c}:R;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:(0,s.jsx)("path",{d:"M384 896h-64v-70.4c0-15.2-10.4-28-24.8-31.2C159.2 768 64 644.8 64 496v-32h64v32c0 118.4 73.6 215.2 179.2 236 44.8 8.8 76.8 48 76.8 94.4v69.6zM704 896h-64v-70.4c0-45.6 32-85.6 76.8-94.4C822.4 711.2 896 614.4 896 496v-32h64v32c0 148.8-95.2 272-231.2 298.4-14.4 3.2-24.8 16-24.8 31.2v70.4zM512.8 640l-41.6-37.6c-147.2-133.6-244-208-244-316.8 0-88 68.8-156.8 156.8-156.8 49.6 0 97.6 23.2 128.8 60C544 152 592 128.8 641.6 128.8c88 0 156.8 68.8 156.8 156.8 0 108-96.8 183.2-244 316.8L512.8 640z",fill:i(r,0,"#333333")})})};U.defaultProps={size:18};const L=U,P={display:"block"},M=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...P,...c}:P;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:(0,s.jsx)("path",{d:"M942.4615936 284.62787926c-14.30911886-14.12709945-37.31996786-14.05468217-51.48229632 0.21920654L517.97142983 661.27810333 139.75544149 286.45003606c-14.30911886-14.16232846-37.31996786-14.05468217-51.51948344 0.21920654-14.16232846 14.30911886-14.05468217 37.35519687 0.21920654 51.51948345l401.99014627 398.34974663c0.61847666 0.61847666 1.41897273 0.76526706 2.03940637 1.34655658 0.14483342 0.14483342 0.18201941 0.32685283 0.32685283 0.47364324 7.09877874 7.02636259 16.38375538 10.55911595 25.63154489 10.55911595 9.35739278 0 18.75001458-3.60516949 25.85075143-10.77636551l398.34974663-401.99014628C956.84312974 321.8382427 956.73548345 298.7921647 942.4615936 284.62787926z",fill:i(r,0,"#333333")})})};M.defaultProps={size:18};const O=M,G={display:"block"},k=e=>{let{size:n,color:r,style:c,...l}=e;const o=c?{...G,...c}:G;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:o,...l,children:(0,s.jsx)("path",{d:"M81.5384064 739.37212074c14.30911886 14.12709945 37.31996786 14.05468217 51.48229632-0.21920654L506.02857017 362.72189667 884.24455851 737.54996394c14.30911886 14.16232846 37.31996786 14.05468217 51.51948344-0.21920654 14.16232846-14.30911886 14.05468217-37.35519687-0.21920654-51.51948345l-401.99014627-398.34974663c-0.61847666-0.61847666-1.41897273-0.76526706-2.03940637-1.34655658-0.14483342-0.14483342-0.18201941-0.32685283-0.32685282-0.47364324-7.09877874-7.02636259-16.38375538-10.55911595-25.6315449-10.55911595-9.35739278 0-18.75001458 3.60516949-25.85075143 10.77636551l-398.34974663 401.99014628C67.15687026 702.1617573 67.26451655 725.2078353 81.5384064 739.37212074z",fill:i(r,0,"#333333")})})};k.defaultProps={size:18};const z=k,V=e=>{let{name:n,...r}=e;switch(n){case"youhua":return(0,s.jsx)(o,{...r});case"dayi":return(0,s.jsx)(a,{...r});case"shengji":return(0,s.jsx)(x,{...r});case"tiaozheng":return(0,s.jsx)(g,{...r});case"gengxin":return(0,s.jsx)(b,{...r});case"wendang":return(0,s.jsx)(w,{...r});case"shanchu":return(0,s.jsx)(I,{...r});case"bug":return(0,s.jsx)(F,{...r});case"xinzeng":return(0,s.jsx)(D,{...r});case"fuwu":return(0,s.jsx)(L,{...r});case"down":return(0,s.jsx)(O,{...r});case"up":return(0,s.jsx)(z,{...r})}return null},Z={label:"label_p8vM",icon:"icon_knQK"};function H(e){const{children:n}=e,r={"\u65b0\u589e":{icon:"xinzeng",bgColor:"#39b54a"},"\u4fee\u590d":{icon:"bug",bgColor:"#9c26b0"},"\u6587\u6863":{icon:"wendang",bgColor:"rgb(79, 147, 255)"},"\u66f4\u65b0":{icon:"gengxin",bgColor:"#0081ff"},"\u8c03\u6574":{icon:"tiaozheng",bgColor:"#333"},"\u5347\u7ea7":{icon:"shengji",bgColor:"#e03997"},"\u79fb\u9664":{icon:"shanchu",bgColor:"#666"},"\u7b54\u7591":{icon:"dayi",bgColor:"#bbb"},"\u4f18\u5316":{icon:"youhua",bgColor:"#38e550"}};return(0,s.jsxs)("label",{className:Z.label,title:n,style:{backgroundColor:r[n].bgColor},children:[(0,s.jsx)(V,{name:r[n].icon,color:"white",size:14,className:Z.icon})," ",n]})}},1151:(e,n,r)=>{r.d(n,{Z:()=>o,a:()=>l});var i=r(7294);const s={},c=i.createContext(s);function l(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]);