[Backend] 注文履歴API用のスキーマをPydanticで定義する

Open Beginner friendly
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
python, typescript
Domain
api, backend

Research direction

Start by reading schemas.py to follow the existing schema conventions and identify the order fields already used. Define OrderHistoryItem with order data and menu name and image URL, add the OrderHistoryResponse list schema, then run scripts/generate-types.sh and verify the corresponding types appear in static/js/types/api.ts.

Written by the indexing model from the issue text.

Description

Description:
Goal:
フロントエンドとのデータ契約を確立するため、注文履歴APIのレスポンスで使用するデータ構造をschemas.pyに定義します。

Tasks:

  1. schemas.pyに、注文情報に加えて関連メニュー情報(商品名、画像URL)を含む
  2. OrderHistoryItemスキーマを新規作成します。OrderHistoryItemのリスト形式であるOrderHistoryResponseスキーマを新規作成します。
  3. scripts/generate-types.sh を実行し、static/js/types/api.tsに新しい型が正しく出力されることを確認します。

Acceptance Criteria: schemas.pyとapi.tsが更新され、Gitにコミットされていること。

Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cokiimcham/app

All issues in cokiimcham/app

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.