-
Notifications
You must be signed in to change notification settings - Fork 173
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
Initial commit of schema definition for invalid updates. #1083
Changes from 2 commits
2bf8253
898e26d
28df6af
bc44eeb
41bddc8
7582474
03380f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"$id": "http://osv.dev/import_status.schema.json", | ||
"type": "object", | ||
"default": {}, | ||
"title": "OSV.dev import status", | ||
"description": "A schema for describing an OSV.dev import failure of an OSV record.", | ||
"required": [ | ||
"invalid_records" | ||
], | ||
"properties": { | ||
"invalid_records": { | ||
"type": "array", | ||
"default": [], | ||
"title": "The invalid_records Schema", | ||
"items": { | ||
"type": "object", | ||
"title": "A Schema", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This title is particularly unhelpful :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yes, yes it is. Improved. |
||
"required": [ | ||
"id", | ||
"reason" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"title": "The id Schema", | ||
"examples": [ | ||
"GSD-2021-1001229", | ||
"GSD-2022-1003535" | ||
] | ||
}, | ||
"reason": { | ||
"type": "string", | ||
"title": "The reason Schema", | ||
"examples": [ | ||
"INVALID_JSON", | ||
"DELETED" | ||
] | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this have an If so, we could probably remove the examples. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oooh good call, I didn't realise you could do that. |
||
}, | ||
"examples": [{ | ||
"id": "GSD-2021-1001229", | ||
"reason": "INVALID_JSON" | ||
}, | ||
{ | ||
"id": "GSD-2022-1003535", | ||
"reason": "DELETED" | ||
}] | ||
}, | ||
"examples": [ | ||
[{ | ||
"id": "GSD-2021-1001229", | ||
"reason": "INVALID_JSON" | ||
}, | ||
{ | ||
"id": "GSD-2022-1003535", | ||
"reason": "DELETED" | ||
}] | ||
] | ||
} | ||
}, | ||
"examples": [{ | ||
"invalid_records": [{ | ||
"id": "GSD-2021-1001229", | ||
"reason": "INVALID_JSON" | ||
}, | ||
{ | ||
"id": "GSD-2022-1003535", | ||
"reason": "DELETED" | ||
}] | ||
}] | ||
andrewpollock marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: most of these titles don't really seem useful, and I don't think they're a required field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've improved on them.