disable swagger + update cors for production

This commit is contained in:
2025-10-31 00:55:29 +07:00
parent 29685fd68d
commit 758e376381
6 changed files with 85 additions and 73 deletions

View File

@@ -1,43 +1,23 @@
#nullable enable
using System.ComponentModel.DataAnnotations;
namespace Managing.Api.Models.Requests;
/// <summary>
/// Request model for submitting indicator requests to N8n webhook
/// </summary>
public class IndicatorRequestDto
{
/// <summary>
/// Name of the indicator (e.g., "MACD", "RSI", "Bollinger Bands")
/// </summary>
[Required]
[StringLength(200, MinimumLength = 4, ErrorMessage = "Indicator name must be between 4 and 200 characters.")]
public string IndicatorName { get; set; } = string.Empty;
/// <summary>
/// Strategy or description of how the indicator is used (e.g., "MACD Cross", "RSI Divergence")
/// </summary>
[Required]
[StringLength(1000, MinimumLength = 10, ErrorMessage = "Strategy description must be between 10 and 1000 characters.")]
public string StrategyDescription { get; set; } = string.Empty;
/// <summary>
/// Primary documentation URL for the indicator
/// </summary>
[Url(ErrorMessage = "Documentation URL must be a valid URL.")]
public string? DocumentationUrl { get; set; }
/// <summary>
/// Image URL for the indicator (optional) - can be a chart, diagram, or visual representation
/// </summary>
[Url(ErrorMessage = "Image URL must be a valid URL.")]
public string? ImageUrl { get; set; }
/// <summary>
/// Telegram account handle of the person requesting the indicator (e.g., "cryptooda")
/// </summary>
[Required]
[RegularExpression(@"^(?=(?:[0-9_]*[a-z]){3})[a-z0-9_]{5,}$",
ErrorMessage = "Requester name must be a valid Telegram handle (lowercase letters, numbers, underscores only, minimum 5 characters with at least 3 letters).")]