1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-17 15:55:56 +00:00

Added playlist schema, required fields

This commit is contained in:
Alexander Biryukov 2019-07-18 19:15:10 +03:00
parent da3b8cae0d
commit bc3c190039

View file

@ -1,11 +1,104 @@
{
"$schema": "http://json-schema.org/schema#",
"title": "Youtube-dl JSON output schema",
"description": "This schema is produced when youtube-dl -J is invoked",
"definitions": {
"single-video": {
"anyOf": [
{
"required": [
"formats"
]
},
{
"required": [
"url"
]
}
],
"allOf": [
{
"$ref": "#/definitions/json-output"
},
{
"$ref": "#/definitions/format"
}
]
},
"playlist": {
"type": "object",
"properties": {
"uploader_url": {
"type": [
"string",
"null"
]
},
"uploader": {
"type": [
"string",
"null"
]
},
"extractor_key": {
"type": [
"string",
"null"
]
},
"extractor": {
"type": [
"string",
"null"
]
},
"title": {
"type": [
"string",
"null"
]
},
"uploader_id": {
"type": [
"string",
"null"
]
},
"webpage_url_basename": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"webpage_url": {
"type": [
"string",
"null"
]
},
"entries": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/single-video"
}
}
}
},
"json-output": {
"type": "object",
"id": "urn:jsonschema:youtube-dl-json-output",
"required": [
"id",
"title"
],
"properties": {
"id": {
"type": "string",
@ -265,6 +358,7 @@
"playlist_index": {
"type": [
"string",
"integer",
"null"
]
},
@ -841,12 +935,12 @@
}
}
},
"allOf": [
"anyOf": [
{
"$ref": "#/definitions/json-output"
"$ref": "#/definitions/single-video"
},
{
"$ref": "#/definitions/format"
"$ref": "#/definitions/playlist"
}
]
}