Admin.Core/src/platform/ZhonTai.ApiUI/ApiUIOptions.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.IO;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
namespace ZhonTai.ApiUI
{
public class ApiUIOptions
{
/// <summary>
/// Gets or sets a route prefix for accessing the swagger-ui
/// </summary>
public string RoutePrefix { get; set; } = "swagger";
/// <summary>
/// Gets or sets a Stream function for retrieving the swagger-ui page
/// </summary>
public Func<Stream> IndexStream { get; set; } = () => typeof(ApiUIOptions).GetTypeInfo().Assembly
.GetManifestResourceStream("ZhonTai.ApiUI.src.dist.index.html");
/// <summary>
/// Gets or sets a title for the swagger-ui page
/// </summary>
public string DocumentTitle { get; set; } = "Api UI";
/// <summary>
/// Gets or sets additional content to place in the head of the swagger-ui page
/// </summary>
public string HeadContent { get; set; } = "";
/// <summary>
/// Gets the JavaScript config object, represented as JSON, that will be passed to the SwaggerUI
/// </summary>
public ConfigObject ConfigObject { get; set; } = new ConfigObject();
/// <summary>
/// Gets the JavaScript config object, represented as JSON, that will be passed to the initOAuth method
/// </summary>
public OAuthConfigObject OAuthConfigObject { get; set; } = new OAuthConfigObject();
/// <summary>
/// Gets the interceptor functions that define client-side request/response interceptors
/// </summary>
public InterceptorFunctions Interceptors { get; set; } = new InterceptorFunctions();
}
public class ConfigObject
{
/// <summary>
/// One or more Swagger JSON endpoints (url and name) to power the UI
/// </summary>
public IEnumerable<UrlDescriptor> Urls { get; set; } = null;
/// <summary>
/// If set to true, enables deep linking for tags and operations
/// </summary>
public bool DeepLinking { get; set; } = false;
/// <summary>
后面还有 195 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
