152 lines
3.9 KiB
TypeScript
152 lines
3.9 KiB
TypeScript
import Project_audio_tracksDBApi from '../db/api/project_audio_tracks.ts';
|
|
import { createEntityRouter } from '../factories/router.factory.ts';
|
|
import Project_audio_tracksService from '../services/project_audio_tracks.ts';
|
|
|
|
/**
|
|
* @swagger
|
|
* components:
|
|
* schemas:
|
|
* Project_audio_tracks:
|
|
* type: object
|
|
* properties:
|
|
* source_key:
|
|
* type: string
|
|
* name:
|
|
* type: string
|
|
* slug:
|
|
* type: string
|
|
* url:
|
|
* type: string
|
|
* sort_order:
|
|
* type: integer
|
|
* volume:
|
|
* type: number
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* tags:
|
|
* name: Project_audio_tracks
|
|
* description: The Project_audio_tracks managing API
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /api/project_audio_tracks:
|
|
* post:
|
|
* security:
|
|
* - bearerAuth: []
|
|
* tags: [Project_audio_tracks]
|
|
* summary: Add new item
|
|
* requestBody:
|
|
* required: true
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* properties:
|
|
* data:
|
|
* type: object
|
|
* $ref: "#/components/schemas/Project_audio_tracks"
|
|
* responses:
|
|
* 200:
|
|
* description: The item was successfully added
|
|
* 401:
|
|
* $ref: "#/components/responses/UnauthorizedError"
|
|
* 500:
|
|
* description: Some server error
|
|
* get:
|
|
* security:
|
|
* - bearerAuth: []
|
|
* tags: [Project_audio_tracks]
|
|
* summary: Get all project_audio_tracks
|
|
* responses:
|
|
* 200:
|
|
* description: Project_audio_tracks list successfully received
|
|
* 401:
|
|
* $ref: "#/components/responses/UnauthorizedError"
|
|
* 500:
|
|
* description: Some server error
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /api/project_audio_tracks/{id}:
|
|
* put:
|
|
* security:
|
|
* - bearerAuth: []
|
|
* tags: [Project_audio_tracks]
|
|
* summary: Update the selected item
|
|
* parameters:
|
|
* - in: path
|
|
* name: id
|
|
* required: true
|
|
* schema:
|
|
* type: string
|
|
* requestBody:
|
|
* required: true
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* properties:
|
|
* id:
|
|
* type: string
|
|
* data:
|
|
* type: object
|
|
* $ref: "#/components/schemas/Project_audio_tracks"
|
|
* responses:
|
|
* 200:
|
|
* description: The item was successfully updated
|
|
* 401:
|
|
* $ref: "#/components/responses/UnauthorizedError"
|
|
* 404:
|
|
* description: Item not found
|
|
* 500:
|
|
* description: Some server error
|
|
* delete:
|
|
* security:
|
|
* - bearerAuth: []
|
|
* tags: [Project_audio_tracks]
|
|
* summary: Delete the selected item
|
|
* parameters:
|
|
* - in: path
|
|
* name: id
|
|
* required: true
|
|
* schema:
|
|
* type: string
|
|
* responses:
|
|
* 200:
|
|
* description: The item was successfully deleted
|
|
* 401:
|
|
* $ref: "#/components/responses/UnauthorizedError"
|
|
* 404:
|
|
* description: Item not found
|
|
* 500:
|
|
* description: Some server error
|
|
* get:
|
|
* security:
|
|
* - bearerAuth: []
|
|
* tags: [Project_audio_tracks]
|
|
* summary: Get selected item
|
|
* parameters:
|
|
* - in: path
|
|
* name: id
|
|
* required: true
|
|
* schema:
|
|
* type: string
|
|
* responses:
|
|
* 200:
|
|
* description: Selected item successfully received
|
|
* 401:
|
|
* $ref: "#/components/responses/UnauthorizedError"
|
|
* 404:
|
|
* description: Item not found
|
|
* 500:
|
|
* description: Some server error
|
|
*/
|
|
|
|
export default createEntityRouter(
|
|
'project_audio_tracks',
|
|
Project_audio_tracksService,
|
|
Project_audio_tracksDBApi,
|
|
);
|