From 16077a879c219df00d26cc3d937ec70f1d53f83c 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 | 152 ++++++++++++++++++ .../webapp/frontend/src/schema/schema.ts | 152 ++++++++++++++++++ 2 files changed, 304 insertions(+) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index dea2ac53f64d..fad0dd60ca03 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,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_float"; + /** Validators */ + validators?: components["schemas"]["InRangeParameterValidatorModel"][]; /** Value */ value?: number | null; }; @@ -12153,6 +12196,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 +12503,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_integer"; + /** Validators */ + validators?: components["schemas"]["InRangeParameterValidatorModel"][]; /** Value */ value?: number | null; }; @@ -13885,6 +13961,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 +14684,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 +15832,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 +16275,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_select"; + /** Validators */ + validators: components["schemas"]["NoOptionsParameterValidatorModel"][]; }; /** ServerDirElement */ ServerDirElement: { @@ -17166,6 +17308,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..a293fd6ccaf8 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,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_float" + /** Validators */ + validators?: components["schemas"]["InRangeParameterValidatorModel"][] /** Value */ value?: number | null } @@ -1700,6 +1743,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 +1812,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_integer" + /** Validators */ + validators?: components["schemas"]["InRangeParameterValidatorModel"][] /** Value */ value?: number | null } @@ -1750,6 +1826,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 +1854,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 +1948,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 +2428,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_select" + /** Validators */ + validators: components["schemas"]["NoOptionsParameterValidatorModel"][] } /** Service */ Service: { @@ -2400,6 +2542,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 }