@@ -186,13 +186,15 @@ public WorkflowValidator getWorkflowValidator(String workflow) throws WorkflowEx
186186 Pattern pkgNamePattern = pkgNamePatternNode != null ? Pattern .compile (pkgNamePatternNode .asText ()) : null ;
187187
188188 JsonNode metadataSchemaId = workflowData .get ("metadata_schema" );
189+ logger .info ("metadataSchemaId={}" , metadataSchemaId );
189190 Validator metadataValidator = metadataSchemaId != null ? makeValidatorFromSchema (metadataSchemaId .asText ()) : null ;
190191
191192 JsonNode entriesSchemaId = workflowData .get ("entries_schema" );
193+ logger .info ("entriesSchemaId={}" , entriesSchemaId );
192194 Validator entriesValidator = entriesSchemaId != null ? makeValidatorFromSchema (entriesSchemaId .asText ()) : null ;
193195
194196 JsonNode isMessageRequiredNode = workflowData .get ("is_message_required" );
195- boolean isMessageRequired = isMessageRequiredNode != null ? isMessageRequiredNode .asBoolean (false ) : false ;
197+ boolean isMessageRequired = isMessageRequiredNode != null && isMessageRequiredNode .asBoolean (false );
196198
197199 var dataToStore = JsonNodeFactory .instance .objectNode ()
198200 .put ("id" , workflow .isEmpty () ? null : workflow )
@@ -225,7 +227,7 @@ private Validator makeValidatorFromSchema(String schemaId) throws ConfigurationE
225227 JsonNode schemaNode ;
226228 PhysicalKey schemaEffectivePhysicalKey ;
227229
228- logger .debug ("Loading schema from {}" , schemaPhysicalKey );
230+ logger .info ("Loading schema from {}" , schemaPhysicalKey );
229231 try {
230232 var response = schemaPhysicalKey .open ();
231233 schemaNode = mapper .readTree (response .inputStream );
@@ -252,6 +254,7 @@ private Validator makeValidatorFromSchema(String schemaId) throws ConfigurationE
252254 JsonSchemaOptions options = new JsonSchemaOptions ()
253255 .setBaseUri ("https://quiltdata.com/" ) // TODO: remove it; not actually used.
254256 .setDraft (draft );
257+ logger .info ("Creating validator for schema {} with options {}" , schema , options );
255258 Validator validator = Validator .create (schema , options );
256259
257260 info = new SchemaInfo (validator , schemaEffectivePhysicalKey );
@@ -271,9 +274,7 @@ private PhysicalKey getPhysicalKeyForSchemaId(String schemaId) throws Configurat
271274 logger .debug ("Resolving schema URL: {}" , schemaUrl );
272275 try {
273276 schemaPk = PhysicalKey .fromUri (new URI (schemaUrl ));
274- } catch (IllegalArgumentException e ) {
275- throw new ConfigurationException ("Couldn't parse URL: " + schemaUrl , e );
276- } catch (URISyntaxException e ) {
277+ } catch (IllegalArgumentException | URISyntaxException e ) {
277278 throw new ConfigurationException ("Couldn't parse URL: " + schemaUrl , e );
278279 }
279280
0 commit comments