Skip to content

CITATION.cff is not compliant with schema 1.3.0 #420

Description

@e-kwsm

Now (b6045d7) I receive error different from #414, so I opened this issue separately.

$ cffconvert --validate --verbose --url https://github.com/citation-file-format/cffconvert
jsonschema.exceptions.ValidationError: {'type': 'doi', 'value': '10.5281/zenodo.5521767', 'description': 'Persistent identifier for this version of cffconvert', 'relation': 'isIdenticalTo'} is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['identifiers']['items']:
    {'description': 'An identifier for a work.',
     'oneOf': [{'additionalProperties': False,
                'properties': {'description': {'$ref': '#/$defs/identifier-description'},
                               'relation': {'$ref': '#/$defs/identifier-relation'},
                               'type': {'const': 'doi', 'type': 'string'},
                               'value': {'$ref': '#/$defs/doi'}},
                'required': ['type', 'value'],
                'type': 'object'},
               {'additionalProperties': False,
                'properties': {'description': {'$ref': '#/$defs/identifier-description'},
                               'relation': {'$ref': '#/$defs/identifier-relation'},
                               'type': {'const': 'url', 'type': 'string'},
                               'value': {'$ref': '#/$defs/url'}},
                'required': ['type', 'value'],
                'type': 'object'},
               {'additionalProperties': False,
                'properties': {'description': {'$ref': '#/$defs/identifier-description'},
                               'relation': {'$ref': '#/$defs/identifier-relation'},
                               'type': {'const': 'swh', 'type': 'string'},
                               'value': {'$ref': '#/$defs/swh-identifier'}},
                'required': ['type', 'value'],
                'type': 'object'},
               {'additionalProperties': False,
                'properties': {'description': {'$ref': '#/$defs/identifier-description'},
                               'relation': {'$ref': '#/$defs/identifier-relation'},
                               'type': {'const': 'other', 'type': 'string'},
                               'value': {'$ref': '#/$defs/strictish-string'}},
                'required': ['type', 'value'],
                'type': 'object'}]}

On instance['identifiers'][1]:
    {'type': 'doi',
     'value': '10.5281/zenodo.5521767',
     'description': 'Persistent identifier for this version of cffconvert',
     'relation': 'isIdenticalTo'}

relation: isPartOf

and
relation: isIdenticalTo

are not compliant with

and

respectively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions