From acfba7cac9e29c627c9f0a9bab4d5f48fd70de18 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:42:44 +0900 Subject: [PATCH] =?UTF-8?q?:construction:=20=E3=83=95=E3=83=AD=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=A8=E3=83=B3=E3=83=89=E3=81=AE=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/api/openapi.ts | 45 +++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/client/src/api/openapi.ts b/client/src/api/openapi.ts index e6b34f5..832f80e 100644 --- a/client/src/api/openapi.ts +++ b/client/src/api/openapi.ts @@ -549,23 +549,29 @@ export interface components { | components['schemas']['RunningBenchmark'] | components['schemas']['FinishedBenchmark'] /** @description ベンチマーク結果 */ - Benchmark: ( + Benchmark: { + status: 'Benchmark' + } & (Omit< | components['schemas']['WaitingBenchmark'] | components['schemas']['RunningBenchmark'] - | components['schemas']['FinishedBenchmark'] - ) & { + | components['schemas']['FinishedBenchmark'], + 'status' + > & { /** * @description ベンチマークの競技者用ログ(標準出力) * @example log */ log: string - } + }) /** @description Adminが見ることができるベンチマーク結果 */ - BenchmarkAdminResult: ( + BenchmarkAdminResult: { + status: 'BenchmarkAdminResult' + } & (Omit< | components['schemas']['WaitingBenchmark'] | components['schemas']['RunningBenchmark'] - | components['schemas']['FinishedBenchmark'] - ) & { + | components['schemas']['FinishedBenchmark'], + 'status' + > & { /** * @description ベンチマークの競技者用ログ(標準出力) * @example log @@ -576,15 +582,18 @@ export interface components { * @example admin log */ adminLog: string - } + }) /** @description status=waiting のベンチマーク結果 */ WaitingBenchmark: { id: components['schemas']['BenchmarkId'] instanceId: components['schemas']['InstanceId'] teamId: components['schemas']['TeamId'] userId: components['schemas']['UserId'] - /** @enum {string} */ - status: 'waiting' + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + status: 'WaitingBenchmark' createdAt: components['schemas']['CreatedAt'] } /** @description status=running のベンチマーク結果 */ @@ -593,8 +602,11 @@ export interface components { instanceId: components['schemas']['InstanceId'] teamId: components['schemas']['TeamId'] userId: components['schemas']['UserId'] - /** @enum {string} */ - status: 'running' + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + status: 'RunningBenchmark' score: components['schemas']['Score'] createdAt: components['schemas']['CreatedAt'] startedAt: components['schemas']['StartedAt'] @@ -605,9 +617,14 @@ export interface components { instanceId: components['schemas']['InstanceId'] teamId: components['schemas']['TeamId'] userId: components['schemas']['UserId'] - /** @enum {string} */ - status: 'finished' + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + status: 'FinishedBenchmark' score: components['schemas']['Score'] + /** @enum {string} */ + result: 'passed' | 'failed' | 'error' createdAt: components['schemas']['CreatedAt'] startedAt: components['schemas']['StartedAt'] finishedAt: components['schemas']['FinishedAt']