Skip to content

Commit a81767a

Browse files
committed
feat: Add GlobalUsings for API project and organize solution structure
1 parent fc01109 commit a81767a

File tree

8 files changed

+38
-27
lines changed

8 files changed

+38
-27
lines changed

β€ŽSmartRAG.slnβ€Ž

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Microsoft Visual Studio Solution File, Format Version 12.00
23
# Visual Studio Version 17
34
VisualStudioVersion = 17.0.31903.59
@@ -6,8 +7,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartRAG", "src\SmartRAG\Sm
67
EndProject
78
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartRAG.Diagnostics", "src\SmartRAG.Diagnostics\SmartRAG.Diagnostics.csproj", "{F8B7A123-4567-89AB-CDEF-0123456789AB}"
89
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
11+
EndProject
912
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartRAG.API", "examples\WebAPI\SmartRAG.API.csproj", "{E7606EAF-F26D-441F-B5A4-34A72A70DD6C}"
1013
EndProject
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
15+
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartRAG.Tests", "tests\SmartRAG.Tests\SmartRAG.Tests.csproj", "{3080D267-C4FC-4E79-9024-BD36D337F91C}"
17+
EndProject
1118
Global
1219
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1320
Debug|Any CPU = Debug|Any CPU
@@ -53,8 +60,24 @@ Global
5360
{E7606EAF-F26D-441F-B5A4-34A72A70DD6C}.Release|x64.Build.0 = Debug|Any CPU
5461
{E7606EAF-F26D-441F-B5A4-34A72A70DD6C}.Release|x86.ActiveCfg = Release|Any CPU
5562
{E7606EAF-F26D-441F-B5A4-34A72A70DD6C}.Release|x86.Build.0 = Release|Any CPU
63+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
64+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Debug|Any CPU.Build.0 = Debug|Any CPU
65+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Debug|x64.ActiveCfg = Debug|Any CPU
66+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Debug|x64.Build.0 = Debug|Any CPU
67+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Debug|x86.ActiveCfg = Debug|Any CPU
68+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Debug|x86.Build.0 = Debug|Any CPU
69+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Release|Any CPU.ActiveCfg = Release|Any CPU
70+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Release|Any CPU.Build.0 = Release|Any CPU
71+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Release|x64.ActiveCfg = Release|Any CPU
72+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Release|x64.Build.0 = Release|Any CPU
73+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Release|x86.ActiveCfg = Release|Any CPU
74+
{3080D267-C4FC-4E79-9024-BD36D337F91C}.Release|x86.Build.0 = Release|Any CPU
5675
EndGlobalSection
5776
GlobalSection(SolutionProperties) = preSolution
5877
HideSolutionNode = FALSE
5978
EndGlobalSection
79+
GlobalSection(NestedProjects) = preSolution
80+
{E7606EAF-F26D-441F-B5A4-34A72A70DD6C} = {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
81+
{3080D267-C4FC-4E79-9024-BD36D337F91C} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
82+
EndGlobalSection
6083
EndGlobal

β€Žexamples/WebAPI/Contracts/SearchRequest.csβ€Ž

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System.ComponentModel.DataAnnotations;
2-
using System.ComponentModel;
3-
41
namespace SmartRAG.API.Contracts;
52

63
public class SearchRequest

β€Žexamples/WebAPI/Controllers/DocumentsController.csβ€Ž

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
2-
3-
using Microsoft.AspNetCore.Mvc;
4-
5-
using SmartRAG.Interfaces;
6-
71
namespace SmartRAG.API.Controllers;
82

93
/// <summary>

β€Žexamples/WebAPI/Controllers/SearchController.csβ€Ž

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using Microsoft.AspNetCore.Mvc;
2-
using SmartRAG.Interfaces;
3-
41
namespace SmartRAG.API.Controllers;
52

63
/// <summary>

β€Žexamples/WebAPI/Controllers/StorageController.csβ€Ž

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
using Microsoft.AspNetCore.Mvc;
2-
using SmartRAG.Enums;
3-
using SmartRAG.Interfaces;
4-
51
/// <summary>
62
/// Storage management controller
73
/// </summary>

β€Žexamples/WebAPI/Filters/MultipartFileUploadFilter.csβ€Ž

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.OpenApi.Models;
2-
using Swashbuckle.AspNetCore.SwaggerGen;
3-
41
namespace SmartRAG.API.Filters;
52

63
public class MultipartFileUploadFilter : IOperationFilter
74
{
85
public void Apply(OpenApiOperation operation, OperationFilterContext context)
96
{
107
// Check if this is the upload-multiple endpoint
11-
if (context.MethodInfo.Name == "UploadDocuments" &&
8+
if (context.MethodInfo.Name == "UploadDocuments" &&
129
context.MethodInfo.DeclaringType?.Name == "DocumentsController")
1310
{
1411
// Remove any existing request body
@@ -45,7 +42,7 @@ public void Apply(OpenApiOperation operation, OperationFilterContext context)
4542
// Add external documentation link for simple upload page
4643
if (operation.ExternalDocs == null)
4744
operation.ExternalDocs = new OpenApiExternalDocs();
48-
45+
4946
operation.ExternalDocs.Description = "Simple multiple file upload page";
5047
operation.ExternalDocs.Url = new Uri("/upload.html", UriKind.Relative);
5148
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
global using Microsoft.AspNetCore.Mvc;
2+
global using Microsoft.AspNetCore.Http;
3+
global using Microsoft.OpenApi.Models;
4+
global using Microsoft.AspNetCore.Http.Features;
5+
global using SmartRAG.API.Filters;
6+
global using SmartRAG.Diagnostics.Extensions;
7+
global using SmartRAG.Enums;
8+
global using SmartRAG.Extensions;
9+
global using SmartRAG.Interfaces;
10+
global using SmartRAG.Entities;
11+
global using Swashbuckle.AspNetCore.SwaggerGen;
12+
global using System.ComponentModel.DataAnnotations;
13+
global using System.ComponentModel;

β€Žexamples/WebAPI/Program.csβ€Ž

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
using Microsoft.OpenApi.Models;
2-
using SmartRAG.API.Filters;
3-
using SmartRAG.Diagnostics.Extensions;
4-
using SmartRAG.Enums;
5-
using SmartRAG.Extensions;
6-
71
var builder = WebApplication.CreateBuilder(args);
82

93
// Configure Kestrel server options for file uploads

0 commit comments

Comments
Β (0)