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

Add E103 fixture #101

Merged
merged 1 commit into from
Jun 6, 2022
Merged

Add E103 fixture #101

merged 1 commit into from
Jun 6, 2022

Conversation

srerickson
Copy link
Contributor

Adds a fixture for E103: object v1 declares OCFL v1.1, v2 declares OCFL v1.0

Copy link
Contributor

@pwinckles pwinckles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rocfl:

Object ark:/12345/bcd987 is invalid
  Errors:
    1. [E103] (v1) Inventory 'type' must be 'https://ocfl.io/1.0/spec/#inventory' or earlier. Found: https://ocfl.io/1.1/spec/#inventory

(I validate in reverse chronological order which is why it flagged the problem in v1, and is perhaps not ideal here.)

@zimeon
Copy link
Collaborator

zimeon commented Jun 3, 2022

Fixture looks good to me.

ocfl-py gives a bad error message:

> ./ocfl-validate.py fixtures/1.1/bad-objects/E103_older_spec_v2
[E038a] OCFL Object v2 inventory `type` attribute has wrong value (expected https://ocfl.io/1.1/spec/#inventory, got https://ocfl.io/1.0/spec/#inventory) (see https://ocfl.io/1.0/spec/#E038)
INFO:ocfl.object:OCFL object at fixtures/1.1/bad-objects/E103_older_spec_v2 is INVALID

@zimeon zimeon self-requested a review June 3, 2022 17:15
Copy link
Member

@awoods awoods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks, @srerickson !

@zimeon zimeon merged commit de442ae into OCFL:main Jun 6, 2022
@zimeon
Copy link
Collaborator

zimeon commented Jun 8, 2022

Fixed error detection and message in ocfl-py:

ocfl-py> ./ocfl-validate.py fixtures/1.1/bad-objects/E103_older_spec_v2
[E103] OCFL Object v2 inventory conforms to specification version 1.0 which is an earlier version than the v1 inventory which conforms to specification version 1.1 (see https://ocfl.io/1.0/spec/#E103)
INFO:ocfl.object:OCFL object at fixtures/1.1/bad-objects/E103_older_spec_v2 is INVALID

@srerickson srerickson deleted the E103_older_spec_v2 branch June 8, 2022 17:10
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

Successfully merging this pull request may close these issues.

5 participants