Response Class (Status 200)
18 |OK
20 |
22 |
23 |
25 |
37 |
├── src
├── Microsoft.AspNetCore.ApiHelp
│ ├── UI
│ │ ├── Swagger
│ │ │ ├── src
│ │ │ │ ├── app
│ │ │ │ │ ├── app.component.html
│ │ │ │ │ ├── components
│ │ │ │ │ │ ├── main
│ │ │ │ │ │ │ ├── jsonHandle
│ │ │ │ │ │ │ │ ├── json-handle.component.html
│ │ │ │ │ │ │ │ ├── json-handle.component.css
│ │ │ │ │ │ │ │ └── json-handle.component.ts
│ │ │ │ │ │ │ ├── resource
│ │ │ │ │ │ │ │ ├── point
│ │ │ │ │ │ │ │ │ ├── method.enum.ts
│ │ │ │ │ │ │ │ │ ├── content-type
│ │ │ │ │ │ │ │ │ │ ├── content-type.component.css
│ │ │ │ │ │ │ │ │ │ ├── content-type.component.html
│ │ │ │ │ │ │ │ │ │ └── content-type.component.ts
│ │ │ │ │ │ │ │ │ ├── request
│ │ │ │ │ │ │ │ │ │ ├── request.component.html
│ │ │ │ │ │ │ │ │ │ ├── method
│ │ │ │ │ │ │ │ │ │ │ ├── method.component.css
│ │ │ │ │ │ │ │ │ │ │ ├── method.component.ts
│ │ │ │ │ │ │ │ │ │ │ └── method.component.html
│ │ │ │ │ │ │ │ │ │ └── request.component.ts
│ │ │ │ │ │ │ │ │ ├── schema
│ │ │ │ │ │ │ │ │ │ ├── model-schema.component.css
│ │ │ │ │ │ │ │ │ │ ├── model-schema.component.html
│ │ │ │ │ │ │ │ │ │ └── model-schema.component.ts
│ │ │ │ │ │ │ │ │ ├── pointModel.ts
│ │ │ │ │ │ │ │ │ ├── point.component.css
│ │ │ │ │ │ │ │ │ ├── point.service.ts
│ │ │ │ │ │ │ │ │ ├── point.component.html
│ │ │ │ │ │ │ │ │ └── point.component.ts
│ │ │ │ │ │ │ │ ├── resource.component.css
│ │ │ │ │ │ │ │ ├── resource.component.html
│ │ │ │ │ │ │ │ └── resource.component.ts
│ │ │ │ │ │ │ ├── resourceModel.ts
│ │ │ │ │ │ │ ├── main.component.css
│ │ │ │ │ │ │ ├── resourceNav
│ │ │ │ │ │ │ │ ├── resource.component.html
│ │ │ │ │ │ │ │ ├── resource.component.ts
│ │ │ │ │ │ │ │ └── resource.component.css
│ │ │ │ │ │ │ ├── resourceService.ts
│ │ │ │ │ │ │ ├── main.component.html
│ │ │ │ │ │ │ └── main.component.ts
│ │ │ │ │ │ └── header
│ │ │ │ │ │ │ ├── header.component.ts
│ │ │ │ │ │ │ └── header.component.html
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── rxjs-operators.ts
│ │ │ │ │ └── app.routes.ts
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── fonts
│ │ │ │ │ ├── DroidSans.ttf
│ │ │ │ │ └── DroidSans-Bold.ttf
│ │ │ │ ├── images
│ │ │ │ │ ├── Collapsed.gif
│ │ │ │ │ ├── Expanded.gif
│ │ │ │ │ └── logo_small.png
│ │ │ │ ├── vendor.browser.ts
│ │ │ │ ├── css
│ │ │ │ │ ├── typography.css
│ │ │ │ │ └── reset.css
│ │ │ │ ├── main.browser.ts
│ │ │ │ ├── polyfills.browser.ts
│ │ │ │ ├── custom-typings.d.ts
│ │ │ │ └── index.html
│ │ │ ├── dist
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── fonts
│ │ │ │ │ ├── DroidSans.ttf
│ │ │ │ │ └── DroidSans-Bold.ttf
│ │ │ │ ├── images
│ │ │ │ │ ├── Collapsed.gif
│ │ │ │ │ ├── Expanded.gif
│ │ │ │ │ └── logo_small.png
│ │ │ │ ├── css
│ │ │ │ │ ├── typography.css
│ │ │ │ │ └── reset.css
│ │ │ │ └── index.html
│ │ │ ├── tsconfig.json
│ │ │ ├── package.json
│ │ │ └── webpack.config.js
│ │ ├── JsonH
│ │ │ ├── favicon.ico
│ │ │ ├── css
│ │ │ │ ├── treePic
│ │ │ │ │ ├── arr.png
│ │ │ │ │ ├── elm.png
│ │ │ │ │ ├── num.png
│ │ │ │ │ ├── obj.png
│ │ │ │ │ ├── str.png
│ │ │ │ │ ├── folder.png
│ │ │ │ │ ├── line.png
│ │ │ │ │ ├── node.png
│ │ │ │ │ ├── null.png
│ │ │ │ │ ├── object.png
│ │ │ │ │ ├── open.png
│ │ │ │ │ ├── boolean.png
│ │ │ │ │ ├── nodeLast.png
│ │ │ │ │ ├── nodeRoot.png
│ │ │ │ │ ├── openLast.png
│ │ │ │ │ ├── openRoot.png
│ │ │ │ │ ├── folderFirst.png
│ │ │ │ │ ├── folderLast.png
│ │ │ │ │ ├── folderRoot.png
│ │ │ │ │ ├── objectOpen.png
│ │ │ │ │ └── openFirst.png
│ │ │ │ ├── img
│ │ │ │ │ ├── setting-btn.png
│ │ │ │ │ └── setting-btn-act.png
│ │ │ │ ├── opt.css
│ │ │ │ ├── tree.css
│ │ │ │ └── jsonH.css
│ │ │ ├── js
│ │ │ │ ├── JSON.js
│ │ │ │ ├── ad.js
│ │ │ │ ├── listenResizeWin.js
│ │ │ │ ├── pageInit.js
│ │ │ │ ├── jsonH
│ │ │ │ │ └── nav.js
│ │ │ │ ├── lang.js
│ │ │ │ └── envSetting.js
│ │ │ └── index.html
│ │ └── JsonEditor
│ │ │ ├── favicon.ico
│ │ │ └── index.html
│ ├── Properties
│ │ └── InternalsVisibleTo.cs
│ ├── IIndexPageStreamFactory.cs
│ ├── ApiHelpUI.cs
│ ├── StreamExtensions.cs
│ ├── IndexPageStreamFactory.cs
│ ├── ApiHelpUIOptions.cs
│ ├── RedirectMiddleware.cs
│ ├── Microsoft.AspNetCore.ApiHelp.csproj
│ ├── IApplicationBuilderExtensions.cs
│ └── ApiHelpMiddleware.cs
├── Microsoft.AspNetCore.ApiHelp.Core
│ ├── Properties
│ │ └── InternalsVisibleTo.cs
│ ├── ApiHelpInputModel.cs
│ ├── DocumentGenerateStrategy.cs
│ ├── ApiHelpOptions.cs
│ ├── ApiHelpApplicationModelConvention.cs
│ ├── Microsoft.AspNetCore.ApiHelp.Core.csproj
│ ├── IMvcBuilderExtensions.cs
│ ├── IMvcCoreBuilderExtensions.cs
│ ├── ApiDescriptionExtensions.cs
│ ├── ClosedGenericMatcher.cs
│ ├── TypeSharedExtensions.cs
│ ├── HelpController.cs
│ ├── TypeJsonExtensions.cs
│ └── TypeXDocExtensions.cs
└── Host
│ ├── appsettings.json
│ ├── web.config
│ ├── Program.cs
│ ├── Properties
│ └── launchSettings.json
│ ├── Controllers
│ └── ValuesController.cs
│ ├── Host.csproj
│ └── Startup.cs
├── test
└── Microsoft.AspNetCore.ApiHelp.Core.Test
│ ├── TimeSpan.json
│ ├── Schema.json
│ ├── NestedSchema.json
│ ├── Scaffold.json
│ ├── Microsoft.AspNetCore.ApiHelp.Core.Test.csproj
│ ├── NestedScaffold.json
│ └── TypeJsonExtensionsTest.cs
├── NuGet.config
├── LICENSE
├── README.md
├── .gitattributes
├── ApiHelp.sln
└── .gitignore
/src/Microsoft.AspNetCore.ApiHelp/UI/Swagger/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
OK
20 |
22 |
23 |
25 |
37 |
${html}`;
49 | else if (this.showType == "text")
50 | HTML = `${html}`;
51 | return HTML;
52 | }
53 | getDataType(data) {
54 | if (typeof data === 'object') {
55 | if (data instanceof Array)
56 | return 'array';
57 | else if (data instanceof Date)
58 | return 'date';
59 | else if (data instanceof RegExp)
60 | return 'regExp';
61 | else
62 | return 'object'
63 | }
64 | else {
65 | return typeof data;
66 | }
67 | }
68 | GetRow(indent, data, isPropertyContent) {
69 | var tabs = "";
70 | for (var i = 0; i < indent && !isPropertyContent; i++) tabs += this.TAB;
71 | if (data != null && data.length > 0 && data.charAt(data.length - 1) != "\n")
72 | data = data + "\n";
73 | return tabs + data;
74 | }
75 | FormatLiteral(literal, quote, comma, indent, isArray, style) {
76 | if (typeof literal == 'string')
77 | literal = literal.split("<").join("<").split(">").join(">");
78 | var str = "" + quote + literal + quote + comma + "";
79 | if (isArray) str = this.GetRow(indent, str, null);
80 | return str;
81 | }
82 | FormatFunction(indent, obj) {
83 | var tabs = "";
84 | for (var i = 0; i < indent; i++) tabs += this.TAB;
85 | var funcStrArray = obj.toString().split("\n");
86 | var str = "";
87 | for (var i = 0; i < funcStrArray.length; i++) {
88 | str += ((i == 0) ? "" : tabs) + funcStrArray[i] + "\n";
89 | }
90 | return str;
91 | }
92 | ProcessObject(obj, indent, addComma, isArray, isPropertyContent) {
93 | var html = "";
94 | var comma = (addComma) ? ", " : "";
95 | var type = this.getDataType(obj);
96 | var clpsHtml = "";
97 | if (type == 'array') {
98 | if (obj.length == 0) {
99 | html += this.GetRow(indent, `[ ]${comma}`, isPropertyContent);
100 | } else {
101 | clpsHtml = `