Change result end point to output artist info

This commit is contained in:
Esa Kataja
2025-05-15 20:53:23 +03:00
parent e863a8a088
commit 0aee5ca021
2 changed files with 25 additions and 4 deletions
+8
View File
@@ -3,6 +3,14 @@ from pydantic import BaseModel, Field
class Result(BaseModel):
song_id: int = Field(description="ID of the song", examples=[1])
country_fi: str = Field(
description="Country of the song in Finnish", examples=["Suomi"]
)
country_sv: str = Field(
description="Country of the song in Swedish", examples=["Sverige"]
)
artist: str = Field(description="Artist of the song", examples=["Käärijä"])
title: str = Field(description="Title of the song", examples=["Cha cha cha"])
total_reviews: int = Field(0, description="Total number of reviews", examples=[10])
avg_score_song: float = Field(
description="Average score for song quality", examples=[85.5]