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 missing 1.0 spec examples #110

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1.0/good-objects/spec-ex-diff-paths/0=ocfl_object_1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ocfl_object_1.0
27 changes: 27 additions & 0 deletions 1.0/good-objects/spec-ex-diff-paths/inventory.json
Copy link
Contributor

Choose a reason for hiding this comment

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

validating this fixture results in a warning because v1 is missing a message (edit: and user). Given that this is based on an example from the spec, I wonder if it's worth updating the example to include a message. Otherwise, should this fixture be moved warn-objects?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree, moved:

./ocfl-validate.py fixtures/1.0/warn-objects/W007_spec-ex-diff-paths
[W007a] OCFL Object root inventory v1 version block SHOULD include a message key (see https://ocfl.io/1.0/spec/#W007)
[W007b] OCFL Object root inventory v1 version block SHOULD include a user key (see https://ocfl.io/1.0/spec/#W007)
OCFL v1.0 Object at fixtures/1.0/warn-objects/W007_spec-ex-diff-paths is VALID

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"digestAlgorithm": "sha512",
"head": "v1",
"id": "http://example.org/diff-paths",
"manifest": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"v1/content/3bacb119a98a15c5"
],
"af318dca6b3f5ad0c1029814417362bde735c84b23edc7367bbf3c3b964945e9c87918da78442efca1c1b6d88f3a65197f09cf02479b3580e89c3879e77ca3cd": [
"v1/content/9f2bab8ef869947d"
]
},
"type": "https://ocfl.io/1.0/spec/#inventory",
"versions": {
"v1": {
"created": "2019-03-14T20:31:00Z",
"state": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"a file.wxy"
],
"af318dca6b3f5ad0c1029814417362bde735c84b23edc7367bbf3c3b964945e9c87918da78442efca1c1b6d88f3a65197f09cf02479b3580e89c3879e77ca3cd": [
"another file.xyz"
]
}
}
}
}
1 change: 1 addition & 0 deletions 1.0/good-objects/spec-ex-diff-paths/inventory.json.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a1792927c94f8cf96e651f4553941627053cabdfeafa9aebb20af661677806d9e82bc1b97c071eee8ad12ac6deca94f3783d49e3c8748975926f6fd6f87f7fe1 inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I am a file!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I am another file!
27 changes: 27 additions & 0 deletions 1.0/good-objects/spec-ex-diff-paths/v1/inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"digestAlgorithm": "sha512",
"head": "v1",
"id": "http://example.org/diff-paths",
"manifest": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"v1/content/3bacb119a98a15c5"
],
"af318dca6b3f5ad0c1029814417362bde735c84b23edc7367bbf3c3b964945e9c87918da78442efca1c1b6d88f3a65197f09cf02479b3580e89c3879e77ca3cd": [
"v1/content/9f2bab8ef869947d"
]
},
"type": "https://ocfl.io/1.0/spec/#inventory",
"versions": {
"v1": {
"created": "2019-03-14T20:31:00Z",
"state": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"a file.wxy"
],
"af318dca6b3f5ad0c1029814417362bde735c84b23edc7367bbf3c3b964945e9c87918da78442efca1c1b6d88f3a65197f09cf02479b3580e89c3879e77ca3cd": [
"another file.xyz"
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a1792927c94f8cf96e651f4553941627053cabdfeafa9aebb20af661677806d9e82bc1b97c071eee8ad12ac6deca94f3783d49e3c8748975926f6fd6f87f7fe1 inventory.json
1 change: 1 addition & 0 deletions 1.0/good-objects/spec-ex-minimal/0=ocfl_object_1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ocfl_object_1.0
26 changes: 26 additions & 0 deletions 1.0/good-objects/spec-ex-minimal/inventory.json
zimeon marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"digestAlgorithm": "sha512",
"head": "v1",
"id": "http://example.org/minimal",
"manifest": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"v1/content/file.txt"
]
},
"type": "https://ocfl.io/1.0/spec/#inventory",
"versions": {
"v1": {
"created": "2018-10-02T12:00:00Z",
"message": "One file",
"state": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"file.txt"
]
},
"user": {
"address": "[email protected]",
"name": "Alice"
}
}
}
}
1 change: 1 addition & 0 deletions 1.0/good-objects/spec-ex-minimal/inventory.json.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8c9d026e7fb032ed5d0f45ce31920681765cb4781758a15bb7575665e854ab8724bbcf2930b60caaed3aa9e52e330014ec3113092796f8f213de074d8dd1f3d7 inventory.json
1 change: 1 addition & 0 deletions 1.0/good-objects/spec-ex-minimal/v1/content/file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I am a file!
26 changes: 26 additions & 0 deletions 1.0/good-objects/spec-ex-minimal/v1/inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"digestAlgorithm": "sha512",
"head": "v1",
"id": "http://example.org/minimal",
"manifest": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"v1/content/file.txt"
]
},
"type": "https://ocfl.io/1.0/spec/#inventory",
"versions": {
"v1": {
"created": "2018-10-02T12:00:00Z",
"message": "One file",
"state": {
"7545b8720a601235067473f2c87f43461f5c147fb622d51bfcdcda05e0773c96e9f922f4d88d371bb7f87793b655b9e1c3b8bbca35f2950c5c87eda955179f67": [
"file.txt"
]
},
"user": {
"address": "[email protected]",
"name": "Alice"
}
}
}
}
1 change: 1 addition & 0 deletions 1.0/good-objects/spec-ex-minimal/v1/inventory.json.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8c9d026e7fb032ed5d0f45ce31920681765cb4781758a15bb7575665e854ab8724bbcf2930b60caaed3aa9e52e330014ec3113092796f8f213de074d8dd1f3d7 inventory.json