From 3c6ad75fbda545c526232c7f3f8a7f1c48211d80 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 8 Oct 2024 12:33:10 -0400 Subject: [PATCH] Update tool shed schema for parameter model changes. --- .../webapp/frontend/src/schema/schema.ts | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) diff --git a/lib/tool_shed/webapp/frontend/src/schema/schema.ts b/lib/tool_shed/webapp/frontend/src/schema/schema.ts index 5667b073d0e6..14aab45a3c36 100644 --- a/lib/tool_shed/webapp/frontend/src/schema/schema.ts +++ b/lib/tool_shed/webapp/frontend/src/schema/schema.ts @@ -1386,6 +1386,16 @@ export interface components { * @enum {string} */ parameter_type: "gx_directory_uri" + /** + * Validators + * @default [] + */ + validators: ( + | components["schemas"]["LengthParameterValidatorModel"] + | components["schemas"]["RegexParameterValidatorModel"] + | components["schemas"]["ExpressionParameterValidatorModel"] + | components["schemas"]["EmptyFieldParameterValidatorModel"] + )[] } /** DrillDownOptionsDict */ DrillDownOptionsDict: { @@ -1440,6 +1450,57 @@ export interface components { */ parameter_type: "gx_drill_down" } + /** EmptyFieldParameterValidatorModel */ + EmptyFieldParameterValidatorModel: { + /** + * Implicit + * @default false + */ + implicit: boolean + /** 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 + /** + * Implicit + * @default false + */ + implicit: boolean + /** Message */ + message?: string | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default expression + * @constant + * @enum {string} + */ + type: "expression" + } /** FailedRepositoryUpdateMessage */ FailedRepositoryUpdateMessage: { /** Err Msg */ @@ -1514,6 +1575,11 @@ export interface components { * @enum {string} */ parameter_type: "gx_float" + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][] /** Value */ value?: number | null } @@ -1629,6 +1695,16 @@ export interface components { * @enum {string} */ parameter_type: "gx_hidden" + /** + * Validators + * @default [] + */ + validators: ( + | components["schemas"]["LengthParameterValidatorModel"] + | components["schemas"]["RegexParameterValidatorModel"] + | components["schemas"]["ExpressionParameterValidatorModel"] + | components["schemas"]["EmptyFieldParameterValidatorModel"] + )[] /** Value */ value: string | null } @@ -1666,6 +1742,42 @@ 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 + /** + * Implicit + * @default false + */ + implicit: 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 @@ -1704,6 +1816,11 @@ export interface components { * @enum {string} */ parameter_type: "gx_integer" + /** + * Validators + * @default [] + */ + validators: components["schemas"]["InRangeParameterValidatorModel"][] /** Value */ value?: number | null } @@ -1716,6 +1833,32 @@ export interface components { /** Value */ value: string } + /** LengthParameterValidatorModel */ + LengthParameterValidatorModel: { + /** + * Implicit + * @default false + */ + implicit: boolean + /** 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 */ @@ -1723,6 +1866,28 @@ export interface components { /** Err Msg */ err_msg: string } + /** NoOptionsParameterValidatorModel */ + NoOptionsParameterValidatorModel: { + /** + * Implicit + * @default false + */ + implicit: boolean + /** Message */ + message?: string | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default no_options + * @constant + * @enum {string} + */ + type: "no_options" + } /** Organization */ Organization: { /** @@ -1800,6 +1965,37 @@ 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 + /** + * Implicit + * @default false + */ + implicit: boolean + /** Message */ + message?: string | null + /** + * Negate + * @default false + */ + negate: boolean + /** + * Type + * @default regex + * @constant + * @enum {string} + */ + type: "regex" + } /** RepeatParameterModel */ RepeatParameterModel: { /** Argument */ @@ -2254,6 +2450,8 @@ export interface components { * @enum {string} */ parameter_type: "gx_select" + /** Validators */ + validators: components["schemas"]["NoOptionsParameterValidatorModel"][] } /** Service */ Service: { @@ -2366,6 +2564,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 }