@@ -444,7 +444,7 @@ verify_attr_names <- function(p) {
444
444
verify_attr_spec <- function (p ) {
445
445
if (! is.null(p $ x $ layout )) {
446
446
p $ x $ layout <- verify_attr(
447
- p $ x $ layout , Schema $ layout $ layoutAttributes
447
+ p $ x $ layout , Schema $ layout $ layoutAttributes , layoutAttr = TRUE
448
448
)
449
449
}
450
450
for (tr in seq_along(p $ x $ data )) {
@@ -459,7 +459,7 @@ verify_attr_spec <- function(p) {
459
459
p
460
460
}
461
461
462
- verify_attr <- function (proposed , schema ) {
462
+ verify_attr <- function (proposed , schema , layoutAttr = FALSE ) {
463
463
for (attr in names(proposed )) {
464
464
attrSchema <- schema [[attr ]] %|| % schema [[sub(" [0-9]+$" , " " , attr )]]
465
465
# if schema is missing (i.e., this is an un-official attr), move along
@@ -489,7 +489,7 @@ verify_attr <- function(proposed, schema) {
489
489
490
490
# tag 'src-able' attributes (needed for api_create())
491
491
isSrcAble <- ! is.null(schema [[paste0(attr , " src" )]]) && length(proposed [[attr ]]) > 1
492
- if (isDataArray || isSrcAble ) {
492
+ if (( isDataArray || isSrcAble ) && ! isTRUE( layoutAttr ) ) {
493
493
proposed [[attr ]] <- structure(proposed [[attr ]], apiSrc = TRUE )
494
494
}
495
495
@@ -517,7 +517,7 @@ verify_attr <- function(proposed, schema) {
517
517
518
518
# do the same for "sub-attributes"
519
519
if (identical(role , " object" ) && is.recursive(proposed [[attr ]])) {
520
- proposed [[attr ]] <- verify_attr(proposed [[attr ]], schema [[attr ]])
520
+ proposed [[attr ]] <- verify_attr(proposed [[attr ]], schema [[attr ]], layoutAttr = layoutAttr )
521
521
}
522
522
}
523
523
0 commit comments