Examples in schema objects

This commit is contained in:
Antoine Gersant 2019-04-07 16:22:40 -07:00
parent 357d7b27e8
commit 35bb77e7a3

View file

@ -209,7 +209,10 @@
{ {
"name": "location", "name": "location",
"in": "path", "in": "path",
"description": "Path to the collection directory begin explored" "description": "Path to the collection directory begin explored",
"schema": {
"type": "string"
}
} }
], ],
"responses": { "responses": {
@ -1025,11 +1028,13 @@
"properties": { "properties": {
"major": { "major": {
"type": "integer", "type": "integer",
"format": "int64" "format": "int64",
"example": 3
}, },
"minor": { "minor": {
"type": "integer", "type": "integer",
"format": "int64" "format": "int64",
"example": 0
} }
} }
}, },
@ -1045,10 +1050,12 @@
"type": "object", "type": "object",
"properties": { "properties": {
"album_art_pattern": { "album_art_pattern": {
"type": "string" "type": "string",
"example": "^Folder.(png|jpg|jpeg)$"
}, },
"reindex_every_n_seconds": { "reindex_every_n_seconds": {
"type": "integer" "type": "integer",
"example": 3600
}, },
"mount_dirs": { "mount_dirs": {
"type": "array", "type": "array",
@ -1069,13 +1076,16 @@
"type": "object", "type": "object",
"properties": { "properties": {
"host": { "host": {
"type": "string" "type": "string",
"example": "yourname.ydns.eu"
}, },
"username": { "username": {
"type": "string" "type": "string",
"example": "you@host.com"
}, },
"password": { "password": {
"type": "string" "type": "string",
"example": "hunter2"
} }
} }
} }
@ -1100,10 +1110,12 @@
"type": "object", "type": "object",
"properties": { "properties": {
"source": { "source": {
"type": "string" "type": "string",
"example": "/mnt/some_drive/music"
}, },
"name": { "name": {
"type": "string" "type": "string",
"example": "My Music"
} }
} }
}, },
@ -1165,23 +1177,28 @@
"properties": { "properties": {
"path": { "path": {
"type": "string", "type": "string",
"example": "My Music/Metal/Stratovarius/Destiny",
"required": true "required": true
}, },
"artist": { "artist": {
"type": "string" "type": "string",
"example": "Stratovarius"
}, },
"year": { "year": {
"type": "integer", "type": "integer",
"example": 2019 "example": 1998
}, },
"album": { "album": {
"type": "string" "type": "string",
"example": "Destiny"
}, },
"artwork": { "artwork": {
"type": "string" "type": "string",
"example": "My Music/Metal/Stratovarius/Destiny/Folder.png"
}, },
"date_added": { "date_added": {
"type": "integer", "type": "integer",
"example": 1453179635,
"required": true "required": true
} }
} }
@ -1191,34 +1208,44 @@
"properties": { "properties": {
"path": { "path": {
"type": "string", "type": "string",
"example": "My Music/Metal/Stratovarius/Destiny/Anthem of the World.mp3",
"required": true "required": true
}, },
"track_number": { "track_number": {
"type": "integer" "type": "integer",
"example": 9
}, },
"disc_number": { "disc_number": {
"type": "integer" "type": "integer",
"example": 1
}, },
"title": { "title": {
"type": "string" "type": "string",
"example": "Anthem of the World"
}, },
"artist": { "artist": {
"type": "string" "type": "string",
"example": "Stratovarius"
}, },
"album_artist": { "album_artist": {
"type": "string" "type": "string",
"example": null
}, },
"year": { "year": {
"type": "integer" "type": "integer",
"example": 1998
}, },
"album": { "album": {
"type": "string" "type": "string",
"example": "Destiny"
}, },
"artwork": { "artwork": {
"type": "string" "type": "string",
"example": "My Music/Metal/Stratovarius/Destiny/Folder.png"
}, },
"duration": { "duration": {
"type": "integer" "type": "integer",
"example": 571
} }
} }
}, },