Skip to content

Commit

Permalink
Merge pull request #14 from phac-nml/update/for-release
Browse files Browse the repository at this point in the history
Added additional logging for validation of JSON schema
  • Loading branch information
apetkau authored Jan 22, 2024
2 parents fd24a76 + 18527a0 commit f983e21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ class IridaNextJSONOutput {
outputStream.close()
}
} catch (ValidationException e) {
log.error "Failed to write IRIDA Next JSON output to ${path}. JSON did not match schema ${jsonSchema}"
log.error "Failed to write IRIDA Next JSON output to ${path}. JSON did not match schema ${jsonSchema.getUri()}. " +
"Message: ${e.getMessage()}"
throw e
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ class IridaNextObserver implements TraceObserver {
SchemaStore schemaStore = new SchemaStore()
Path jsonSchemaPathAsPath = Nextflow.file(jsonSchemaPath) as Path
jsonSchema = schemaStore.loadSchema(jsonSchemaPathAsPath.toFile().toURI())
log.debug "Loaded custom schema ${jsonSchema.getUri()} for validating IRIDA Next output " +
"from iridanext.output.schema=${jsonSchemaPath}"
}

// Used for overriding the "meta.id" key used to define identifiers for a scope
Expand Down

0 comments on commit f983e21

Please sign in to comment.