Skip to content

Commit 4daff1d

Browse files
author
mckeea
committed
generate_query_template(): new way of commenting
1 parent bf6fab0 commit 4daff1d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

R/utils.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ extract_param_meta_for_string <- function(meta) {
3636
}
3737

3838
if (exists("oneOf", where = meta) && length(meta$oneOf) > 0) {
39-
value <- meta$oneOf[[1]]$const
40-
4139
possible_values <- sapply(meta$oneOf, function(x) x$const)
42-
comment <- paste0("One of: ", paste(possible_values, collapse = ","))
40+
value <- paste(possible_values, collapse = " , ")
41+
comment <- paste0("One of")
4342
}
4443

4544
data.frame(value = value, comment = comment)

vignettes/hdar.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,14 @@ query_template
262262
"itemsPerPage": 11,
263263
"startIndex": 0,
264264
"uid": "__### Value of string type with pattern: [\\w-]+",
265-
"productType": "PPI",
266-
"_comment_productType": "One of: PPI,QFLAG",
265+
"productType": "PPI , QFLAG",
266+
"_comment_productType": "One of",
267267
"platformSerialIdentifier": "S2A, S2B",
268-
"_comment_platformSerialIdentifier": "One of: S2A, S2B",
268+
"_comment_platformSerialIdentifier": "One of",
269269
"tileId": "__### Value of string type with pattern: [\\w-]+",
270270
"productVersion": "__### Value of string type with pattern: [\\w-]+",
271271
"resolution": "10",
272-
"_comment_resolution": "One of: 10",
272+
"_comment_resolution": "One of",
273273
"processingDate": "__### Value of string type with format: date-time",
274274
"start": "__### Value of string type with format: date-time",
275275
"end": "__### Value of string type with format: date-time",

0 commit comments

Comments
 (0)