Properties with custom types inheritance fix (#18052)

* custom types support in inheritance fix

* files changed after scripts run

* remove unused method

* move cloneSchema to ModelUtils

* imports

* changes after scripts run

* test cloning array of enums schema
This commit is contained in:
Nikita Shmakov
2024-05-15 14:44:39 +03:00
committed by GitHub
parent 014cd2cb2b
commit 70130edaab
7 changed files with 107 additions and 30 deletions

View File

@@ -30,13 +30,13 @@ DataQuery <- R6::R6Class(
#' Initialize a new DataQuery class.
#'
#' @param id Query
#' @param outcomes outcomes. Default to [SUCCESS, FAILURE].
#' @param outcomes outcomes. Default to ["SUCCESS","FAILURE"].
#' @param suffix test suffix
#' @param text Some text containing white spaces
#' @param date A date
#' @param ... Other optional arguments.
#' @export
initialize = function(`id` = NULL, `outcomes` = [SUCCESS, FAILURE], `suffix` = NULL, `text` = NULL, `date` = NULL, ...) {
initialize = function(`id` = NULL, `outcomes` = ["SUCCESS","FAILURE"], `suffix` = NULL, `text` = NULL, `date` = NULL, ...) {
if (!is.null(`id`)) {
if (!(is.numeric(`id`) && length(`id`) == 1)) {
stop(paste("Error! Invalid data for `id`. Must be an integer:", `id`))

View File

@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **integer** | Query | [optional]
**outcomes** | **array[character]** | | [optional] [default to [SUCCESS, FAILURE]] [Enum: ]
**outcomes** | **array[character]** | | [optional] [default to [&quot;SUCCESS&quot;,&quot;FAILURE&quot;]] [Enum: ]
**suffix** | **character** | test suffix | [optional]
**text** | **character** | Some text containing white spaces | [optional]
**date** | **character** | A date | [optional]