From 38792b6519c67ecfdabe9081ef197522775cdc40 Mon Sep 17 00:00:00 2001 From: Jougan-0 Date: Tue, 24 Sep 2024 19:06:18 +0530 Subject: [PATCH] update the schema to contain csv w/signoff Signed-off-by: Jougan-0 --- models/v1beta1/import.go | 10 +++++++--- schemas/constructs/openapi/mesheryHandlers.yml | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/models/v1beta1/import.go b/models/v1beta1/import.go index d10daa3f3b..9827829c3b 100644 --- a/models/v1beta1/import.go +++ b/models/v1beta1/import.go @@ -5,20 +5,24 @@ package v1beta1 // ImportBody defines model for ImportBody. type ImportBody struct { - FileName string `json:"file_name" yaml:"file_name"` + ComponentCsv string `json:"component_csv" yaml:"component_csv"` + FileName string `json:"file_name" yaml:"file_name"` Model Model `json:"model" yaml:"model"` - - // ModelFile represents the binary content of the file as a byte array + ModelCsv string `json:"model_csv" yaml:"model_csv"` + + // ModelFile represents the binary content of the file as a byte array ModelFile []byte `json:"model_file" yaml:"model_file"` Url string `json:"url" yaml:"url"` } +// ImportRequest defines model for ImportRequest. type ImportRequest struct { ImportBody ImportBody `json:"importBody" yaml:"importBody"` Register bool `json:"register" yaml:"register"` UploadType string `json:"uploadType" yaml:"uploadType"` } +// Model defines model for Model. type Model struct { Category string `json:"category" yaml:"category"` IsAnnotation bool `json:"isAnnotation" yaml:"isAnnotation"` diff --git a/schemas/constructs/openapi/mesheryHandlers.yml b/schemas/constructs/openapi/mesheryHandlers.yml index afb930068a..8d55827b88 100644 --- a/schemas/constructs/openapi/mesheryHandlers.yml +++ b/schemas/constructs/openapi/mesheryHandlers.yml @@ -26,6 +26,8 @@ components: - model_file - url - file_name + - model_csv + - component_csv - model properties: model_file: @@ -36,6 +38,10 @@ components: type: string file_name: type: string + model_csv: + type: string + component_csv: + type: string model: $ref: '#/components/schemas/Model'