Moved schemas into objects/ definitions

This commit is contained in:
Nicholas Wallace 2024-02-25 18:32:04 +00:00
parent cc37c3d41f
commit cc53f16185
30 changed files with 3380 additions and 3241 deletions

View file

@ -3,6 +3,32 @@ const { getFileTimestampsWithIno, filePathToPOSIX } = require('../../utils/fileU
const globals = require('../../utils/globals')
const FileMetadata = require('../metadata/FileMetadata')
/**
* @openapi
* components:
* schemas:
* libraryFile:
* type: object
* properties:
* ino:
* description: The inode of the library file.
* type: string
* example: '649644248522215260'
* metadata:
* $ref: '#/components/schemas/fileMetadata'
* addedAt:
* description: The time (in ms since POSIX epoch) when the library file was added.
* type: integer
* example: 1650621052494
* updatedAt:
* description: The time (in ms since POSIX epoch) when the library file was last updated.
* type: integer
* example: 1650621052494
* fileType:
* description: The type of file that the library file is (audio, image, etc.).
* type: string
* example: audio
*/
class LibraryFile {
constructor(file) {
this.ino = null