From 123277d4d4695b0e0a756b5350dd83b7f219dae7 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 4 Oct 2024 12:59:11 -0400 Subject: [PATCH] REbuild schema for validators... --- client/src/api/schema/schema.ts | 158 ++++++++++++++++++ .../webapp/frontend/src/schema/schema.ts | 158 ++++++++++++++++++ 2 files changed, 316 insertions(+) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index dea2ac53f64d..cc9fbae3db92 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -9077,6 +9077,23 @@ export interface components { * @enum {string} */ ElementsFromType: "archive" | "bagit" | "bagit_archive" | "directory"; + /** EmptyFieldParameterValidatorModel */ + EmptyFieldParameterValidatorModel: { + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default empty_field + * @constant + * @enum {string} + */ + type: "empty_field"; + }; /** EncodedDataItemSourceId */ EncodedDataItemSourceId: { /** @@ -9387,6 +9404,30 @@ export interface components { }; /** ExportTaskListResponse */ ExportTaskListResponse: components["schemas"]["ObjectExportTaskResponse"][]; + /** + * ExpressionParameterValidatorModel + * @description Check if a one line python expression given expression evaluates to True. + * + * The expression is given is the content of the validator tag. + */ + ExpressionParameterValidatorModel: { + /** Expression */ + expression: string; + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default expression + * @constant + * @enum {string} + */ + type: "expression"; + }; /** ExtraFileEntry */ ExtraFileEntry: { /** @description The class of this entry, either File or Directory. */ @@ -9789,6 +9830,11 @@ export interface components { * @enum {string} */ parameter_type: "gx_float"; + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][]; /** Value */ value?: number | null; }; @@ -12153,6 +12199,37 @@ export interface components { */ uri: string; }; + /** InRangeParameterValidatorModel */ + InRangeParameterValidatorModel: { + /** + * Exclude Max + * @default false + */ + exclude_max: boolean; + /** + * Exclude Min + * @default false + */ + exclude_min: boolean; + /** Max */ + max?: number | null; + /** Message */ + message?: string | null; + /** Min */ + min?: number | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default in_range + * @constant + * @enum {string} + */ + type: "in_range"; + }; /** InputDataCollectionStep */ InputDataCollectionStep: { /** @@ -12429,6 +12506,11 @@ export interface components { * @enum {string} */ parameter_type: "gx_integer"; + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][]; /** Value */ value?: number | null; }; @@ -13885,6 +13967,27 @@ export interface components { */ LIBRARY_MODIFY_in: string[] | string | null; }; + /** LengthParameterValidatorModel */ + LengthParameterValidatorModel: { + /** Max */ + max?: number | null; + /** Message */ + message?: string | null; + /** Min */ + min?: number | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default length + * @constant + * @enum {string} + */ + type: "length"; + }; /** LibraryAvailablePermissions */ LibraryAvailablePermissions: { /** @@ -14587,6 +14690,23 @@ export interface components { */ slug: string; }; + /** NoOptionsParameterValidatorModel */ + NoOptionsParameterValidatorModel: { + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default no_options + * @constant + * @enum {string} + */ + type: "no_options"; + }; /** * NotificationBroadcastUpdateRequest * @description A notification update request specific for broadcasting. @@ -15718,6 +15838,32 @@ export interface components { /** Workflow */ workflow: string; }; + /** + * RegexParameterValidatorModel + * @description Check if a regular expression **matches** the value, i.e. appears + * at the beginning of the value. To enforce a match of the complete value use + * ``$`` at the end of the expression. The expression is given is the content + * of the validator tag. Note that for ``selects`` each option is checked + * separately. + */ + RegexParameterValidatorModel: { + /** Expression */ + expression: string; + /** Message */ + message?: string | null; + /** + * Negate + * @default false + */ + negate: boolean; + /** + * Type + * @default regex + * @constant + * @enum {string} + */ + type: "regex"; + }; /** ReloadFeedback */ ReloadFeedback: { /** Failed */ @@ -16135,6 +16281,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_select"; + /** Validators */ + validators: components["schemas"]["NoOptionsParameterValidatorModel"][]; }; /** ServerDirElement */ ServerDirElement: { @@ -17166,6 +17314,16 @@ export interface components { * @enum {string} */ parameter_type: "gx_text"; + /** + * Validators + * @default [] + */ + validators: ( + | components["schemas"]["LengthParameterValidatorModel"] + | components["schemas"]["RegexParameterValidatorModel"] + | components["schemas"]["ExpressionParameterValidatorModel"] + | components["schemas"]["EmptyFieldParameterValidatorModel"] + )[]; /** Value */ value?: string | null; }; diff --git a/lib/tool_shed/webapp/frontend/src/schema/schema.ts b/lib/tool_shed/webapp/frontend/src/schema/schema.ts index 0ff40216dcef..42e31bd4a5a2 100644 --- a/lib/tool_shed/webapp/frontend/src/schema/schema.ts +++ b/lib/tool_shed/webapp/frontend/src/schema/schema.ts @@ -1474,6 +1474,47 @@ export interface components { */ parameter_type: "gx_drill_down" } + /** EmptyFieldParameterValidatorModel */ + EmptyFieldParameterValidatorModel: { + /** Message */ + message?: string | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default empty_field + * @constant + * @enum {string} + */ + type: "empty_field" + } + /** + * ExpressionParameterValidatorModel + * @description Check if a one line python expression given expression evaluates to True. + * + * The expression is given is the content of the validator tag. + */ + ExpressionParameterValidatorModel: { + /** Expression */ + expression: string + /** Message */ + message?: string | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default expression + * @constant + * @enum {string} + */ + type: "expression" + } /** FailedRepositoryUpdateMessage */ FailedRepositoryUpdateMessage: { /** Err Msg */ @@ -1548,6 +1589,11 @@ export interface components { * @enum {string} */ parameter_type: "gx_float" + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][] /** Value */ value?: number | null } @@ -1700,6 +1746,37 @@ export interface components { * @enum {string} */ ImageType: "Docker" | "Singularity" | "Conda" + /** InRangeParameterValidatorModel */ + InRangeParameterValidatorModel: { + /** + * Exclude Max + * @default false + */ + exclude_max: boolean + /** + * Exclude Min + * @default false + */ + exclude_min: boolean + /** Max */ + max?: number | null + /** Message */ + message?: string | null + /** Min */ + min?: number | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default in_range + * @constant + * @enum {string} + */ + type: "in_range" + } /** InstallInfo */ InstallInfo: { metadata_info?: components["schemas"]["RepositoryMetadataInstallInfo"] | null @@ -1738,6 +1815,11 @@ export interface components { * @enum {string} */ parameter_type: "gx_integer" + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][] /** Value */ value?: number | null } @@ -1750,6 +1832,27 @@ export interface components { /** Value */ value: string } + /** LengthParameterValidatorModel */ + LengthParameterValidatorModel: { + /** Max */ + max?: number | null + /** Message */ + message?: string | null + /** Min */ + min?: number | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default length + * @constant + * @enum {string} + */ + type: "length" + } /** MessageExceptionModel */ MessageExceptionModel: { /** Err Code */ @@ -1757,6 +1860,23 @@ export interface components { /** Err Msg */ err_msg: string } + /** NoOptionsParameterValidatorModel */ + NoOptionsParameterValidatorModel: { + /** Message */ + message?: string | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default no_options + * @constant + * @enum {string} + */ + type: "no_options" + } /** Organization */ Organization: { /** @@ -1834,6 +1954,32 @@ export interface components { /** Xrefs */ xrefs: components["schemas"]["XrefDict"][] } + /** + * RegexParameterValidatorModel + * @description Check if a regular expression **matches** the value, i.e. appears + * at the beginning of the value. To enforce a match of the complete value use + * ``$`` at the end of the expression. The expression is given is the content + * of the validator tag. Note that for ``selects`` each option is checked + * separately. + */ + RegexParameterValidatorModel: { + /** Expression */ + expression: string + /** Message */ + message?: string | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default regex + * @constant + * @enum {string} + */ + type: "regex" + } /** RepeatParameterModel */ RepeatParameterModel: { /** Argument */ @@ -2288,6 +2434,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_select" + /** Validators */ + validators: components["schemas"]["NoOptionsParameterValidatorModel"][] } /** Service */ Service: { @@ -2400,6 +2548,16 @@ export interface components { * @enum {string} */ parameter_type: "gx_text" + /** + * Validators + * @default [] + */ + validators: ( + | components["schemas"]["LengthParameterValidatorModel"] + | components["schemas"]["RegexParameterValidatorModel"] + | components["schemas"]["ExpressionParameterValidatorModel"] + | components["schemas"]["EmptyFieldParameterValidatorModel"] + )[] /** Value */ value?: string | null }