From f4bf16c15620c98f9e493050959040aa1574a367 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Fri, 17 Nov 2023 09:39:52 +0200 Subject: [PATCH] Fix schema for swagger compatibility --- apiserver/schema/services/_tasks_common.conf | 2 +- apiserver/schema/services/events.conf | 16 ++++++++-------- apiserver/schema/services/login.conf | 2 +- apiserver/schema/services/models.conf | 3 --- apiserver/schema/services/organization.conf | 2 +- apiserver/schema/services/pipelines.conf | 2 +- apiserver/schema/services/projects.conf | 18 ++++++++++-------- apiserver/schema/services/reports.conf | 5 +---- apiserver/schema/services/tasks.conf | 11 ++++------- 9 files changed, 27 insertions(+), 34 deletions(-) diff --git a/apiserver/schema/services/_tasks_common.conf b/apiserver/schema/services/_tasks_common.conf index 87e1165..2afffe7 100644 --- a/apiserver/schema/services/_tasks_common.conf +++ b/apiserver/schema/services/_tasks_common.conf @@ -414,7 +414,7 @@ task { container { description: "Docker container parameters" type: object - additionalProperties { type: [string, null] } + additionalProperties { type: string } } models { description: "Task models" diff --git a/apiserver/schema/services/events.conf b/apiserver/schema/services/events.conf index e369787..88d8682 100644 --- a/apiserver/schema/services/events.conf +++ b/apiserver/schema/services/events.conf @@ -11,8 +11,8 @@ _definitions { type: number } type { - description: "training_stats_vector" - const: "training_stats_scalar" + description: "'training_stats_scalar'" + type: string } task { description: "Task ID (required)" @@ -46,8 +46,8 @@ _definitions { type: number } type { - description: "training_stats_vector" - const: "training_stats_vector" + description: "'training_stats_vector'" + type: string } task { description: "Task ID (required)" @@ -82,8 +82,8 @@ _definitions { type: number } type { - description: "" - const: "training_debug_image" + description: "'training_debug_image'" + type: string } task { description: "Task ID (required)" @@ -123,7 +123,7 @@ _definitions { } type { description: "'plot'" - const: "plot" + type: string } task { description: "Task ID (required)" @@ -221,7 +221,7 @@ _definitions { } type { description: "'log'" - const: "log" + type: string } task { description: "Task ID (required)" diff --git a/apiserver/schema/services/login.conf b/apiserver/schema/services/login.conf index 98ebaae..3e6eb40 100644 --- a/apiserver/schema/services/login.conf +++ b/apiserver/schema/services/login.conf @@ -59,7 +59,7 @@ supported_modes { description: "SSO authentication providers" type: object additionalProperties { - desctiprion: "Provider redirect URL" + description: "Provider redirect URL" type: string } } diff --git a/apiserver/schema/services/models.conf b/apiserver/schema/services/models.conf index 8170fc5..8ac38d3 100644 --- a/apiserver/schema/services/models.conf +++ b/apiserver/schema/services/models.conf @@ -365,9 +365,6 @@ get_all { "$ref": "#/definitions/multi_field_pattern_data" } } - dependencies { - page: [ page_size ] - } } response { type: object diff --git a/apiserver/schema/services/organization.conf b/apiserver/schema/services/organization.conf index 5e9e793..1683515 100644 --- a/apiserver/schema/services/organization.conf +++ b/apiserver/schema/services/organization.conf @@ -203,7 +203,7 @@ get_entities_count { default: false } active_users { - descritpion: "The list of users that were active in the project. If passes then the resulting projects are filtered to the ones that have tasks created by these users" + description: "The list of users that were active in the project. If passes then the resulting projects are filtered to the ones that have tasks created by these users" type: array items: {type: string} } diff --git a/apiserver/schema/services/pipelines.conf b/apiserver/schema/services/pipelines.conf index 70e86b0..45caedc 100644 --- a/apiserver/schema/services/pipelines.conf +++ b/apiserver/schema/services/pipelines.conf @@ -59,7 +59,7 @@ start_pipeline { type: object properties { name: { type: string } - value: { type: [string, null] } + value: { type: string } } } } diff --git a/apiserver/schema/services/projects.conf b/apiserver/schema/services/projects.conf index 7809b5d..bb73d44 100644 --- a/apiserver/schema/services/projects.conf +++ b/apiserver/schema/services/projects.conf @@ -570,7 +570,7 @@ get_all_ex { request { properties { active_users { - descritpion: "The list of users that were active in the project. If passes then the resulting projects are filtered to the ones that have tasks created by these users" + description: "The list of users that were active in the project. If passes then the resulting projects are filtered to the ones that have tasks created by these users" type: array items: {type: string} } @@ -1286,13 +1286,15 @@ get_task_parents { } project { type: object - id { - description: "The ID of the parent task project" - type: string - } - name { - description: "The name of the parent task project" - type: string + properties { + id { + description: "The ID of the parent task project" + type: string + } + name { + description: "The name of the parent task project" + type: string + } } } } diff --git a/apiserver/schema/services/reports.conf b/apiserver/schema/services/reports.conf index 79c31c9..4920ea5 100644 --- a/apiserver/schema/services/reports.conf +++ b/apiserver/schema/services/reports.conf @@ -578,7 +578,7 @@ get_task_data { single_value_metrics { type: object description: If passed then task single value metrics are returned - additonalProperties: false + additionalProperties: false } } response.properties.single_value_metrics { @@ -694,9 +694,6 @@ get_all_ex { "$ref": "#/definitions/multi_field_pattern_data" } } - dependencies { - page: [ page_size ] - } } response { type: object diff --git a/apiserver/schema/services/tasks.conf b/apiserver/schema/services/tasks.conf index f3ca19d..944ae01 100644 --- a/apiserver/schema/services/tasks.conf +++ b/apiserver/schema/services/tasks.conf @@ -297,9 +297,6 @@ get_all { "$ref": "#/definitions/multi_field_pattern_data" } } - dependencies { - page: [ page_size ] - } } response { type: object @@ -489,7 +486,7 @@ clone { new_task_container { description: "The docker container properties for the new task. If not provided then taken from the original task" type: object - additionalProperties { type: [string, null] } + additionalProperties { type: string } } } } @@ -667,7 +664,7 @@ create { container { description: "Docker container parameters" type: object - additionalProperties { type: [string, null] } + additionalProperties { type: string } } } } @@ -756,7 +753,7 @@ validate { container { description: "Docker container parameters" type: object - additionalProperties { type: [string, null] } + additionalProperties { type: string } } } } @@ -918,7 +915,7 @@ edit { container { description: "Docker container parameters" type: object - additionalProperties { type: [string, null] } + additionalProperties { type: string } } runtime { description: "Task runtime mapping"