docs: 完善参数注释与StyleCop配置

This commit is contained in:
2025-12-04 12:45:26 +08:00
parent 8e4c2b0e45
commit 37e7d721f3
213 changed files with 695 additions and 446 deletions

View File

@@ -20,6 +20,9 @@ public sealed class AuthController(IMiniAuthService authService) : BaseApiContro
/// <summary>
/// 微信登录
/// </summary>
/// <param name="request">微信登录请求。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>包含访问令牌与刷新令牌的响应。</returns>
[HttpPost("wechat/login")]
[AllowAnonymous]
[ProducesResponseType(typeof(ApiResponse<TokenResponse>), StatusCodes.Status200OK)]
@@ -35,6 +38,9 @@ public sealed class AuthController(IMiniAuthService authService) : BaseApiContro
/// <summary>
/// 刷新 Token
/// </summary>
/// <param name="request">刷新令牌请求。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>新的访问令牌与刷新令牌。</returns>
[HttpPost("refresh")]
[AllowAnonymous]
[ProducesResponseType(typeof(ApiResponse<TokenResponse>), StatusCodes.Status200OK)]

View File

@@ -1,6 +1,4 @@
using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using TakeoutSaaS.Application.Storage.Abstractions;
using TakeoutSaaS.Application.Storage.Contracts;
@@ -22,6 +20,10 @@ public sealed class FilesController(IFileStorageService fileStorageService) : Ba
/// <summary>
/// 上传图片或文件。
/// </summary>
/// <param name="file">上传文件。</param>
/// <param name="type">上传类型。</param>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>上传结果,包含访问链接等信息。</returns>
[HttpPost("upload")]
[RequestFormLimits(MultipartBodyLengthLimit = 30 * 1024 * 1024)]
[ProducesResponseType(typeof(ApiResponse<FileUploadResponse>), StatusCodes.Status200OK)]

View File

@@ -1,6 +1,4 @@
using System;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using TakeoutSaaS.Shared.Abstractions.Results;
using TakeoutSaaS.Shared.Web.Api;

View File

@@ -1,8 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using TakeoutSaaS.Application.Identity.Abstractions;
using TakeoutSaaS.Application.Identity.Contracts;
@@ -26,6 +22,8 @@ public sealed class MeController(IMiniAuthService authService) : BaseApiControll
/// <summary>
/// 获取用户档案
/// </summary>
/// <param name="cancellationToken">取消标记。</param>
/// <returns>当前用户档案信息。</returns>
[HttpGet]
[ProducesResponseType(typeof(ApiResponse<CurrentUserProfile>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ApiResponse<CurrentUserProfile>), StatusCodes.Status401Unauthorized)]

View File

@@ -1,7 +1,4 @@
using System;
using System.Linq;
using Microsoft.AspNetCore.Cors.Infrastructure;
using Microsoft.Extensions.Configuration;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;