Skip to content

Commit

Permalink
Add strict_validation argument to manifest_generate. (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
afwillia authored Aug 24, 2023
1 parent 3db9b11 commit 1c131a0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 4 additions & 2 deletions R/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
schema_url="https://raw.githubusercontent.com/ncihtan/data-models/main/HTAN.model.jsonld", #nolint
title, data_type,
use_annotations="false", dataset_id=NULL,
asset_view, output_format, access_token = NULL) {
asset_view, output_format, access_token = NULL,
strict_validation = FALSE) {

req <- httr::GET(url,
query = list(
Expand All @@ -68,7 +69,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
dataset_id=dataset_id,
asset_view=asset_view,
output_format=output_format,
access_token = access_token
access_token = access_token,
strict_validation = strict_validation
))

check_success(req)
Expand Down
11 changes: 7 additions & 4 deletions functions/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
schema_url="https://raw.githubusercontent.com/ncihtan/data-models/main/HTAN.model.jsonld", #nolint
title, data_type,
use_annotations="false", dataset_id=NULL,
asset_view, output_format, access_token = NULL) {
asset_view, output_format, access_token = NULL,
strict_validation = FALSE) {

req <- httr::GET(url,
query = list(
Expand All @@ -68,7 +69,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
dataset_id=dataset_id,
asset_view=asset_view,
output_format=output_format,
access_token = access_token
access_token = access_token,
strict_validation = strict_validation
))

check_success(req)
Expand Down Expand Up @@ -157,7 +159,7 @@ model_submit <- function(url="http://localhost:3001/v1/model/submit",
schema_url="https://raw.githubusercontent.com/ncihtan/data-models/main/HTAN.model.jsonld", #notlint
data_type, dataset_id, restrict_rules=FALSE, access_token, json_str=NULL, asset_view,
use_schema_label=TRUE, manifest_record_type="table_and_file", file_name,
table_manipulation="replace") {
table_manipulation="replace", hide_blanks=FALSE) {
req <- httr::POST(url,
#add_headers(Authorization=paste0("Bearer ", pat)),
query=list(
Expand All @@ -170,7 +172,8 @@ model_submit <- function(url="http://localhost:3001/v1/model/submit",
asset_view=asset_view,
use_schema_label=use_schema_label,
manifest_record_type=manifest_record_type,
table_manipulation=table_manipulation),
table_manipulation=table_manipulation,
hide_blanks=hide_blanks),
body=list(file_name=httr::upload_file(file_name))
#body=list(file_name=file_name)
)
Expand Down
3 changes: 2 additions & 1 deletion server.R
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ shinyServer(function(input, output, session) {
asset_view = .asset_view,
use_annotations = .use_annotations,
output_format = .output_format,
access_token=access_token
access_token=access_token,
strict_validation = FALSE
),
{
message("Downloading offline manifest")
Expand Down

0 comments on commit 1c131a0

Please sign in to comment.