2
0
mirror of synced 2025-01-13 01:54:07 +00:00

References autoclientcenter from autoclient

This commit is contained in:
benbierens 2024-09-11 14:24:12 +02:00
parent b3013a9b65
commit fcadceb009
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
2 changed files with 327 additions and 0 deletions

View File

@ -7,6 +7,22 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<OpenApiReference Include="..\AutoClientCenter\swagger.json" CodeGenerator="NSwagCSharp" Namespace="AutoClientCenterAPI" Link="OpenAPIs\swagger.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NSwag.ApiDescription.Client" Version="13.0.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Framework\ArgsUniform\ArgsUniform.csproj" />
<ProjectReference Include="..\..\Framework\Logging\Logging.csproj" />

View File

@ -0,0 +1,311 @@
{
"openapi": "3.0.1",
"info": {
"title": "AutoClientCenter",
"version": "1.0"
},
"paths": {
"/Config/Stats": {
"get": {
"tags": [
"Config"
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AcStats"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AcStats"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AcStats"
}
}
}
}
}
}
},
"/Config/Set": {
"post": {
"tags": [
"Config"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AcTasks"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AcTasks"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/AcTasks"
}
}
}
},
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/Tasks": {
"get": {
"tags": [
"Tasks"
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AcTasks"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AcTasks"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AcTasks"
}
}
}
}
}
}
},
"/Tasks/Results": {
"post": {
"tags": [
"Tasks"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AcTaskStep"
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AcTaskStep"
}
}
},
"application/*+json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AcTaskStep"
}
}
}
}
},
"responses": {
"200": {
"description": "Success"
}
}
}
}
},
"components": {
"schemas": {
"AcDownloadStep": {
"type": "object",
"properties": {
"cid": {
"type": "string",
"nullable": true
},
"resultDownloadTimeMilliseconds": {
"type": "integer",
"format": "int64"
}
},
"additionalProperties": false
},
"AcStats": {
"type": "object",
"properties": {
"serviceStartUtc": {
"type": "string",
"format": "date-time"
},
"totalUploads": {
"type": "integer",
"format": "int32"
},
"totalUploadsFailed": {
"type": "integer",
"format": "int32"
},
"totalDownloads": {
"type": "integer",
"format": "int32"
},
"downloadTimesMillisecondsPerKb": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"nullable": true
},
"totalDownloadsFailed": {
"type": "integer",
"format": "int32"
},
"totalContractsStarted": {
"type": "integer",
"format": "int32"
},
"totalContractStartsFailed": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"AcStoreStep": {
"type": "object",
"properties": {
"contractDurationMinutes": {
"type": "integer",
"format": "int32"
},
"contractExpiryMinutes": {
"type": "integer",
"format": "int32"
},
"numHosts": {
"type": "integer",
"format": "int32"
},
"hostTolerance": {
"type": "integer",
"format": "int32"
},
"price": {
"type": "integer",
"format": "int32"
},
"requiredCollateral": {
"type": "integer",
"format": "int32"
},
"resultPurchaseId": {
"type": "string",
"nullable": true
},
"resultOriginalCid": {
"type": "string",
"nullable": true
},
"resultEncodedCid": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"AcTask": {
"type": "object",
"properties": {
"chanceWeight": {
"type": "integer",
"format": "int32"
},
"steps": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AcTaskStep"
},
"nullable": true
}
},
"additionalProperties": false
},
"AcTaskStep": {
"type": "object",
"properties": {
"id": {
"type": "string",
"nullable": true
},
"uploadStep": {
"$ref": "#/components/schemas/AcUploadStep"
},
"storeStep": {
"$ref": "#/components/schemas/AcStoreStep"
},
"downloadStep": {
"$ref": "#/components/schemas/AcDownloadStep"
},
"resultErrorMsg": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"AcTasks": {
"type": "object",
"properties": {
"startTaskEverySeconds": {
"type": "integer",
"format": "int32"
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AcTask"
},
"nullable": true
}
},
"additionalProperties": false
},
"AcUploadStep": {
"type": "object",
"properties": {
"sizeInBytes": {
"type": "integer",
"format": "int64"
},
"resultCid": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}