diff --git a/app/main.py b/app/main.py index fbd462c..0420018 100644 --- a/app/main.py +++ b/app/main.py @@ -4,7 +4,16 @@ app = FastAPI( title="Deening API", description="Best Recipe Service powered by AI.", - version="0.1.0" + version="0.1.0", + contact={ + "name": "Seungpyo Suh", + "url": "https://sspzoa.io/", + "email": "me@sspzoa.io", + }, + license_info={ + "name": "GNU Affero General Public License v3.0", + "url": "https://www.gnu.org/licenses/agpl-3.0.en.html", + }, ) app.include_router(ping.router) diff --git a/app/routes/cooking_step.py b/app/routes/cooking_step.py index e505aca..7fb577f 100644 --- a/app/routes/cooking_step.py +++ b/app/routes/cooking_step.py @@ -13,6 +13,9 @@ class ErrorResponse(BaseModel): @router.post("/cooking_step", response_model=CookingStepResponse, responses={400: {"model": ErrorResponse}, 404: {"model": ErrorResponse}}) async def get_cooking_step_info(request: CookingStepRequest): + """ + 레시피의 특정 조리 단계에 대한 상세 정보를 생성합니다. + """ if request.recipe_id not in recipe_store: raise HTTPException(status_code=404, detail="레시피를 찾을 수 없습니다.") diff --git a/app/routes/ingredient.py b/app/routes/ingredient.py index 9f3b21d..0dbc4a1 100644 --- a/app/routes/ingredient.py +++ b/app/routes/ingredient.py @@ -11,6 +11,9 @@ class ErrorResponse(BaseModel): @router.post("/ingredient", response_model=IngredientResponse, responses={400: {"model": ErrorResponse}}) async def get_ingredient_info(request: IngredientRequest): + """ + 식재료 정보와 이미지를 생성합니다. + """ try: # 식재료 정보 생성 프롬프트 ingredient_prompt = f"""제공된 식재료에 대한 정보를 JSON 형식으로 생성해주세요. 다음 구조를 따라주세요: diff --git a/app/routes/ping.py b/app/routes/ping.py index d8b588c..9f69556 100644 --- a/app/routes/ping.py +++ b/app/routes/ping.py @@ -5,4 +5,7 @@ @router.get("/ping", response_model=PingResponse) async def ping(): + """ + Health check endpoint + """ return {"message": "pong"} \ No newline at end of file diff --git a/app/routes/recipe.py b/app/routes/recipe.py index 23762b7..28e0714 100644 --- a/app/routes/recipe.py +++ b/app/routes/recipe.py @@ -14,6 +14,9 @@ class ErrorResponse(BaseModel): @router.post("/recipe", response_model=RecipeResponse, responses={400: {"model": ErrorResponse}}) async def get_recipe(request: RecipeRequest): + """ + 주어진 음식 이름에 대한 레시피를 생성합니다. + """ try: # 레시피 생성 프롬프트 recipe_prompt = f"""제공된 음식 이름에 대한 레시피를 JSON 형식으로 생성해주세요. 다음 구조를 따라주세요: @@ -106,6 +109,9 @@ async def get_recipe(request: RecipeRequest): @router.get("/recipe/{recipe_id}", response_model=RecipeResponse, responses={404: {"model": ErrorResponse}}) async def get_recipe_by_id(recipe_id: str): + """ + 주어진 ID에 대한 레시피를 반환합니다. + """ if recipe_id not in recipe_store: raise HTTPException(status_code=404, detail="레시피를 찾을 수 없습니다.")