task_id: task_create_api_delete_album entity_id: api_delete_album generated_at: '2025-12-18T15:16:50.262237' workflow_version: v001 target: type: api definition: id: api_delete_album method: DELETE path: /api/albums/:id description: Delete album responses: - status: 204 description: Album deleted - status: 403 description: Unauthorized schema: error: string auth: required: true owner_only: true depends_on_models: - model_album related: models: - id: model_album definition: &id001 id: model_album name: Album table_name: albums description: Collection of songs fields: - name: id type: uuid constraints: - primary_key - name: artist_id type: uuid constraints: - not_null - foreign_key references: artists.id - name: title type: string constraints: - not_null - name: description type: text constraints: - nullable - name: cover_art_url type: string constraints: - nullable - name: release_date type: date constraints: - nullable - name: album_type type: enum values: - album - ep - single default: album - name: created_at type: timestamp constraints: - not_null - name: updated_at type: timestamp constraints: - not_null relations: - type: belongs_to to: model_artist foreign_key: artist_id - type: has_many to: model_song foreign_key: album_id indexes: - fields: - artist_id - fields: - release_date timestamps: true apis: [] components: [] dependencies: entity_ids: - model_album definitions: - id: model_album type: model definition: *id001 files: to_create: - app/api/albums/id/route.ts reference: [] acceptance: - criterion: DELETE /api/albums/:id returns success response verification: curl -X DELETE /api/albums/:id - criterion: Request validation implemented verification: Test with invalid data - criterion: Error responses match contract verification: Test error scenarios