Skip to content

Commit

Permalink
feat(json-schema): add type on Reference, implements #144
Browse files Browse the repository at this point in the history
  • Loading branch information
saerdnaer committed Dec 11, 2024
1 parent 1dc5492 commit f5141cf
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
42 changes: 37 additions & 5 deletions validator/json/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,19 @@
},
"links": {
"type": "array",
"items": {},
"$comment": "// TODO: string vs object"
"items": {
"$ref": "#/definitions/Reference"
}
},
"feedback_url": {
"type": "string",
"format": "uri"
},
"attachments": {
"type": "array",
"items": {},
"$comment": "// TODO: string vs object"
"items": {
"$ref": "#/definitions/Reference"
}
},
"answers": {
"type": "array",
Expand Down Expand Up @@ -474,6 +476,36 @@
"type": "string",
"examples": ["00:30", "01:30"],
"pattern": "^[0-9]+:[0-9]{2}$"
},
"Reference": {
"title": "Link or Attachment",
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"slides",
"paper",
"web",
"blog",
"article",
"media",
"related",
"activitypub"
]
},
"url": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
}
},
"required": [
"url"
]
}
}
}
}
13 changes: 13 additions & 0 deletions validator/submission-json/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,19 @@
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"slides",
"paper",
"web",
"blog",
"article",
"media",
"related",
"activitypub"
]
},
"url": {
"type": "string",
"format": "uri"
Expand Down

0 comments on commit f5141cf

Please sign in to comment.