|
1 | | -using System.Globalization; |
2 | 1 | using System.Net; |
3 | 2 | using Asp.Versioning; |
4 | | -using Microsoft.OpenApi.Any; |
5 | 3 | using Services; |
6 | 4 |
|
7 | 5 | namespace Api.Setup; |
8 | 6 |
|
9 | 7 | internal static class ApiEndpoints |
10 | 8 | { |
11 | | - private static readonly OpenApiString s_exampleFromDate = new(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); |
12 | | - private static readonly OpenApiString s_exampleToDate = new(DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); |
| 9 | + // private static readonly OpenApiString s_exampleFromDate = new(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); |
| 10 | + // private static readonly OpenApiString s_exampleToDate = new(DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); |
13 | 11 |
|
14 | 12 | public static void ConfigureEndpoints(this WebApplication app) |
15 | 13 | { |
@@ -42,8 +40,8 @@ public static void ConfigureEndpoints(this WebApplication app) |
42 | 40 | .WithDescription("Get longest downward trend in days between given dates") |
43 | 41 | .WithOpenApi(operation => |
44 | 42 | { |
45 | | - operation.Parameters[0].Example = s_exampleFromDate; |
46 | | - operation.Parameters[^1].Example = s_exampleToDate; |
| 43 | + // operation.Parameters[0].Example = s_exampleFromDate; |
| 44 | + // operation.Parameters[^1].Example = s_exampleToDate; |
47 | 45 | return operation; |
48 | 46 | }) |
49 | 47 | .Produces<HighestTradingVolumeResponse>((int)HttpStatusCode.OK) |
@@ -76,8 +74,8 @@ public static void ConfigureEndpoints(this WebApplication app) |
76 | 74 | .WithDescription("Get the date with the highest trading volume between given dates") |
77 | 75 | .WithOpenApi(operation => |
78 | 76 | { |
79 | | - operation.Parameters[0].Example = s_exampleFromDate; |
80 | | - operation.Parameters[^1].Example = s_exampleToDate; |
| 77 | + // operation.Parameters[0].Example = s_exampleFromDate; |
| 78 | + // operation.Parameters[^1].Example = s_exampleToDate; |
81 | 79 | return operation; |
82 | 80 | }) |
83 | 81 | .Produces<HighestTradingVolumeResponse>((int)HttpStatusCode.OK) |
@@ -110,8 +108,8 @@ public static void ConfigureEndpoints(this WebApplication app) |
110 | 108 | .WithDescription("Get pair of dates when it is best to buy and sell between given dates") |
111 | 109 | .WithOpenApi(operation => |
112 | 110 | { |
113 | | - operation.Parameters[0].Example = s_exampleFromDate; |
114 | | - operation.Parameters[^1].Example = s_exampleToDate; |
| 111 | + // operation.Parameters[0].Example = s_exampleFromDate; |
| 112 | + // operation.Parameters[^1].Example = s_exampleToDate; |
115 | 113 | return operation; |
116 | 114 | }) |
117 | 115 | .Produces<BuyAndSellResponse>((int)HttpStatusCode.OK) |
|
0 commit comments