openapi: 3.0.0 paths: /user: post: operationId: UserController_create summary: Create user parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateUserDto' responses: '201': description: '' '400': description: '' '404': description: '' tags: - User get: operationId: UserController_findAll summary: Get all user parameters: [] responses: '200': description: '' tags: - User /user/{id}: get: operationId: UserController_findOne summary: Get user by id parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' '400': description: '' '404': description: '' tags: - User put: operationId: UserController_update summary: Change user password parameters: - name: id required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateUserDto' responses: '200': description: '' '400': description: '' '404': description: '' tags: - User delete: operationId: UserController_remove summary: Delete user parameters: - name: id required: true in: path schema: type: string responses: '204': description: '' '400': description: '' '404': description: '' tags: - User /track: post: operationId: TrackController_create summary: Create track parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateTrackDto' responses: '201': description: '' '400': description: '' '404': description: '' tags: - Track get: operationId: TrackController_findAll summary: Get all track parameters: [] responses: '200': description: '' tags: - Track /track/{id}: get: operationId: TrackController_findOne summary: Get track by id parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' '400': description: '' '404': description: '' tags: - Track put: operationId: TrackController_update summary: Update track parameters: - name: id required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateTrackDto' responses: '200': description: '' '400': description: '' '404': description: '' tags: - Track delete: operationId: TrackController_remove summary: Delete track parameters: - name: id required: true in: path schema: type: string responses: '204': description: '' '400': description: '' '404': description: '' tags: - Track /artist: post: operationId: ArtistController_create summary: Create artist parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateArtistDto' responses: '201': description: '' '400': description: '' '404': description: '' tags: - Artist get: operationId: ArtistController_findAll summary: Get all artist parameters: [] responses: '200': description: '' tags: - Artist /artist/{id}: get: operationId: ArtistController_findOne summary: Get artist by id parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' '400': description: '' '404': description: '' tags: - Artist put: operationId: ArtistController_update summary: Update artist parameters: - name: id required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateArtistDto' responses: '200': description: '' '400': description: '' '404': description: '' tags: - Artist delete: operationId: ArtistController_remove summary: Delete artist parameters: - name: id required: true in: path schema: type: string responses: '204': description: '' '400': description: '' '404': description: '' tags: - Artist /album: post: operationId: AlbumController_create summary: Create album parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateAlbumDto' responses: '201': description: '' '400': description: '' '404': description: '' tags: - Album get: operationId: AlbumController_findAll summary: Get all album parameters: [] responses: '200': description: '' tags: - Album /album/{id}: get: operationId: AlbumController_findOne summary: Get album by id parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' '400': description: '' '404': description: '' tags: - Album put: operationId: AlbumController_update summary: Update album parameters: - name: id required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateAlbumDto' responses: '200': description: '' '400': description: '' '404': description: '' tags: - Album delete: operationId: AlbumController_remove summary: Delete album parameters: - name: id required: true in: path schema: type: string responses: '204': description: '' '400': description: '' '404': description: '' tags: - Album /favs: get: operationId: FavoritesController_findAll summary: Get favorites parameters: [] responses: '200': description: '' tags: - Favorite /favs/track/{id}: post: operationId: FavoritesController_addTrack summary: Add track to favorites parameters: - name: id required: true in: path schema: type: string responses: '201': description: '' '404': description: '' '422': description: '' tags: - Favorite delete: operationId: FavoritesController_removeTrack summary: Delete track from favorites parameters: - name: id required: true in: path schema: type: string responses: '204': description: '' '400': description: '' '404': description: '' tags: - Favorite /favs/album/{id}: post: operationId: FavoritesController_addAlbum summary: Add album to favorites parameters: - name: id required: true in: path schema: type: string responses: '201': description: '' '404': description: '' '422': description: '' tags: - Favorite delete: operationId: FavoritesController_removeAlbum summary: Delete album from favorites parameters: - name: id required: true in: path schema: type: string responses: '204': description: '' '400': description: '' '404': description: '' tags: - Favorite /favs/artist/{id}: post: operationId: FavoritesController_addArtist summary: Add artist to favorites parameters: - name: id required: true in: path schema: type: string responses: '201': description: '' '404': description: '' '422': description: '' tags: - Favorite delete: operationId: FavoritesController_removeArtist summary: Delete artist from favorites parameters: - name: id required: true in: path schema: type: string responses: '204': description: '' '400': description: '' '404': description: '' tags: - Favorite info: title: "\tHome Library Service" description: 'Assignment: REST Service' version: '1.0' contact: {} tags: [] servers: [] components: schemas: CreateUserDto: type: object properties: login: type: string password: type: string required: - login - password UpdateUserDto: type: object properties: oldPassword: type: string newPassword: type: string required: - oldPassword - newPassword CreateTrackDto: type: object properties: name: type: string artistId: type: string albumId: type: string duration: type: number required: - name - duration UpdateTrackDto: type: object properties: name: type: string artistId: type: string albumId: type: string duration: type: number CreateArtistDto: type: object properties: name: type: string grammy: type: boolean required: - name - grammy UpdateArtistDto: type: object properties: name: type: string grammy: type: boolean CreateAlbumDto: type: object properties: name: type: string year: type: number artistId: type: string required: - name - year UpdateAlbumDto: type: object properties: name: type: string year: type: number artistId: type: string