learningtapestry / metadataregistry

DEPRECATED - THIS CODE BASE IS NO LONGER MAINTAINED. Metadata Registry
Apache License 2.0
7 stars 4 forks source link

Fix err msg and validation for missing @type on cred-reg resources #46

Closed andersoncardoso closed 7 years ago

andersoncardoso commented 7 years ago

When adding a resource to cred-reg (or any other community that needs a type to found the schema) without a proper @type, the JSONSchema loader breaks trying to find a schema.

We should do a 2-step verification on these cases.

{"errors":["No such file or directory @ rb_sysopen - /var/deploy/learning_registry/web_head/releases/20160817140136/app/schemas/[\"Invalid resource @type\"].json.erb"]}