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

More information on "invalid syntax" at $id #242

Open
koppor opened this issue Mar 19, 2024 · 1 comment
Open

More information on "invalid syntax" at $id #242

koppor opened this issue Mar 19, 2024 · 1 comment

Comments

@koppor
Copy link

koppor commented Mar 19, 2024

I am trying to use https://github.com/citation-file-format/citation-file-format/blob/main/schema.json with following file:

authors:
  - family-names: Druskat
    given-names: Stephan
cff-version: 1.2.0
message: "If you use this software, please cite it using these metadata."
title: "My Research Software"

(Source: https://github.com/citation-file-format/citation-file-format/blob/79290ebbc3ba8595b92ab323aff7f01c8a5965af/schema-guide.md#minimal-example)

When running the validator ( yamale.exe -s schema.json cff.yaml), I get

Schema error in file C:\TEMP\x\schema.json
Invalid schema expression: 'https://citation-file-format.github.io/1.2.0/schema.json'. invalid syntax (<unknown>, line 1) at node '$id'

Doesn't JSON Schema allow URLs in $ids?

According to JSON Schema, this is allowed in Draft 6 (https://json-schema.org/understanding-json-schema/basics#declaring-a-unique-identifier)

@koppor
Copy link
Author

koppor commented Mar 19, 2024

Maybe, later JSON Schema drafts are not supported?

"$schema": "http://json-schema.org/draft-07/schema",
Invalid schema expression: 'http://json-schema.org/draft-07/schema'. leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers (<unknown>, line 1) at node '$schema'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant