You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to compile the schema using -r at launch of a Biovalidator server:
$ node biovalidator -r "schema_test/test.json"
2024-06-24T16:29:42.041Z [info] Custom keywords successfully added. Number of custom keywords: 5
2024-06-24T16:29:42.042Z [info] Compiling local schema from: schema_test/test.json
2024-06-24T16:29:42.048Z [info] Adding compiled local schema to cache: https://raw.githubusercontent.com/EbiEga/ega-metadata-schema/main/schemas/test.json
2024-06-24T16:29:42.090Z [info] ---------------------------------------------
2024-06-24T16:29:42.090Z [info] ------------ ELIXIR biovalidator ------------
2024-06-24T16:29:42.091Z [info] ---------------------------------------------
2024-06-24T16:29:42.091Z [info] Started server on port 3020 with base URL /
2024-06-24T16:29:42.091Z [info] Server available at http://localhost:3020/
2024-06-24T16:29:42.091Z [info] PID file is available at /mnt/c/Users/mcasado/Documents/GitHub/biovalidator/src/server.pid
2024-06-24T16:29:42.092Z [info] Writing logs to: /mnt/c/Users/mcasado/Documents/GitHub/biovalidator/src/logs/
Create a simple JSON document as follows. Notice how the referenced $id is the same as the one in the schema file.
$ curl --data @test_doc.json -H "Content-Type: application/json" -X POST "http://localhost:3020/validate"
Observe the logs from Biovalidator, displaying a warning about an empty schema $id and that it won't be cached.
2024-06-24T16:29:48.622Z [warn] Compiling schema with empty schema $id. Schema will not be cached.
2024-06-24T16:29:48.646Z [info] Returning referenced schema from cache: https://raw.githubusercontent.com/EbiEga/ega-metadata-schema/main/schemas/test.json
2024-06-24T16:29:48.649Z [info] New validation request: Processed successfully in 28ms.
Observed behaviour
Biovalidator complains about an empty schema $id. Error message sources from:
logger.warn("Compiling schema with empty schema $id. Schema will not be cached.");
Expected behaviour
The schema's $id should be identified without a warning. It is retrieved successfully from cache and used for validation, but the warning seems misleading.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Bug summary
Biovalidator complains about an empty
$id
in a local schema with a proper$id
Technical details
main
v16.13.0
v8.6.0
To reproduce
$id
field as follows:-r
at launch of a Biovalidator server:$id
is the same as the one in the schema file.$id
and that it won't be cached.Observed behaviour
Biovalidator complains about an empty schema
$id
. Error message sources from:biovalidator/src/core/biovalidator-core.js
Line 145 in d8fd805
Expected behaviour
The schema's
$id
should be identified without a warning. It is retrieved successfully from cache and used for validation, but the warning seems misleading.Additional context
No response
The text was updated successfully, but these errors were encountered: