fix swagger

This commit is contained in:
prixod
2025-10-25 00:57:18 +04:00
parent 77cf0634b1
commit 8ecdbf9e42
3 changed files with 68 additions and 44 deletions

View File

@@ -12,7 +12,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="1d3190f0-8175-44b9-bab6-12e025e4819d" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/src/LiquidCode.Tester.Worker/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/src/LiquidCode.Tester.Worker/Program.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.LiquidCode.Tester/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.LiquidCode.Tester/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LiquidCode.Tester.Gateway/LiquidCode.Tester.Gateway.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/src/LiquidCode.Tester.Gateway/LiquidCode.Tester.Gateway.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/LiquidCode.Tester.Gateway/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/src/LiquidCode.Tester.Gateway/Program.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -26,51 +28,38 @@
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/global.json" root0="FORCE_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/global.json" root0="FORCE_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Common/Models/ErrorCode.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/Controllers/TesterController.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/Program.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/Program.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/Services/IPackageDownloadService.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/Services/IWorkerClientService.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/Services/PackageDownloadService.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/Services/WorkerClientService.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/appsettings.Development.json" root0="FORCE_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/appsettings.Development.json" root0="FORCE_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/appsettings.Development.json" root0="FORCE_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/appsettings.json" root0="FORCE_HIGHLIGHTING" />
<setting file="mock://C:/Users/prixod/source/repos/LiquidCode.Tester/src/LiquidCode.Tester.Gateway/appsettings.json" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/global.json" root0="FORCE_HIGHLIGHTING" />
</component>
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 1
}]]></component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 1
}</component>
<component name="ProjectId" id="34WYsNMqGpKyMpfA7Qx2BnEQrPq" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
".NET Launch Settings Profile.LiquidCode.Tester.Gateway: http (1).executor": "Run",
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
"RunOnceActivity.git.unshallow": "true",
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
"git-widget-placeholder": "master",
"ignore.virus.scanning.warn.message": "true",
"junie.onboarding.icon.badge.shown": "true",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"to.speed.mode.migration.done": "true",
"vue.rearranger.settings.migration": "true"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;.NET Launch Settings Profile.LiquidCode.Tester.Gateway: http (1).executor&quot;: &quot;Run&quot;,
&quot;ModuleVcsDetector.initialDetectionPerformed&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
&quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;to.speed.mode.migration.done&quot;: &quot;true&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}]]></component>
}</component>
<component name="RunManager" selected=".NET Launch Settings Profile.LiquidCode.Tester.Gateway: http (1)">
<configuration name="LiquidCode.Tester.Common" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="" />
@@ -246,11 +235,17 @@
<method v="2" />
</configuration>
<configuration default="true" type="docker-deploy" factoryName="docker-compose.yml" temporary="true">
<deployment type="docker-compose.yml" />
<deployment type="docker-compose.yml">
<settings />
</deployment>
<EXTENSION ID="com.jetbrains.rider.docker.debug" isFastModeEnabled="true" isSslEnabled="false" />
<method v="2" />
</configuration>
<configuration default="true" type="docker-deploy" factoryName="dockerfile" temporary="true">
<deployment type="dockerfile" />
<deployment type="dockerfile">
<settings />
</deployment>
<EXTENSION ID="com.jetbrains.rider.docker.debug" isFastModeEnabled="true" isSslEnabled="false" />
<method v="2" />
</configuration>
<configuration name="compose.yaml: Compose Deployment" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
@@ -275,7 +270,9 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1761331001679</updated>
<workItem from="1761331002792" duration="3067000" />
<workItem from="1761331002792" duration="3863000" />
<workItem from="1761336732886" duration="1700000" />
<workItem from="1761338980498" duration="396000" />
</task>
<task id="LOCAL-00001" summary="init">
<option name="closed" value="true" />
@@ -293,7 +290,23 @@
<option name="project" value="LOCAL" />
<updated>1761334197106</updated>
</task>
<option name="localTasksCounter" value="3" />
<task id="LOCAL-00003" summary="add compile &amp; test worker">
<option name="closed" value="true" />
<created>1761335211427</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1761335211427</updated>
</task>
<task id="LOCAL-00004" summary="add configs">
<option name="closed" value="true" />
<created>1761335710636</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1761335710636</updated>
</task>
<option name="localTasksCounter" value="5" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -316,7 +329,9 @@
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
<MESSAGE value="init" />
<MESSAGE value="update" />
<option name="LAST_COMMIT_MESSAGE" value="update" />
<MESSAGE value="add compile &amp; test worker" />
<MESSAGE value="add configs" />
<option name="LAST_COMMIT_MESSAGE" value="add configs" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@@ -336,4 +351,8 @@
</breakpoints>
</breakpoint-manager>
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />
</component>
</project>

View File

@@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.10" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
</ItemGroup>
<ItemGroup>

View File

@@ -4,6 +4,8 @@ var builder = WebApplication.CreateBuilder(args);
// Add services to the container
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddOpenApi();
// Add HttpClient
@@ -18,6 +20,8 @@ var app = builder.Build();
// Configure the HTTP request pipeline
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
app.MapOpenApi();
}