Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional logging for validation of JSON schema #14

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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