feat(api): エラー封筒の imsx_codeMinorFieldName を実フィールド名に (C11)#6
Merged
Conversation
sort / orderBy / filter / fields / limit / offset のクエリパラメータエラー、 および request-validation エラーで、imsx_codeMinorFieldName に問題のある パラメータ名を入れる(従来は全て既定の "sourcedId")。 - errors.imsx_error_response に field_name 引数(既定 "sourcedId")を追加 - QueryParamError に field_name を持たせ、parse_sort/parse_filter/parse_fields で sort/orderBy/filter/fields を設定 - 各 list ルーターの limit/offset エラーに field_name を付与 - RequestValidationError ハンドラがエラー loc から欠落/不正フィールド名を抽出 - tests/integration/test_error_field_names.py を追加 - api-spec / api-examples を更新、backlog C11 を「対応済み」へ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXFogp18twGiPFBAZcqJw2
# Conflicts: # docs/dev/case-v1p1-conformance-backlog.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
conformance backlog C11 を実装します。エラー封筒の
imsx_codeMinorFieldNameを、従来の固定値"sourcedId"から問題のあるパラメータ名に変えます(クライアントが typo をすぐ特定できる)。実装
errors.imsx_error_responseにfield_name引数(既定"sourcedId")を追加。QueryParamErrorにfield_nameを持たせ、parse_sort→sort/orderBy、parse_filter→filter、parse_fields→fieldsを設定。limit/offsetバリデーションエラーにfield_nameを付与(8ルーター)。RequestValidationErrorハンドラがエラーのlocから欠落/不正フィールド名を抽出(例:CFRubricsの必須doc→"doc")。"sourcedId"を維持。テスト
tests/integration/test_error_field_names.py(新規・8件): limit / offset / sort / orderBy / filter / fields / 必須 doc 欠落 → 各フィールド名、UUID エラー → sourcedId 維持。全 665 テスト pass / ruff clean。
ドキュメント
api-spec.md: 「常に sourcedId」→「既定 sourcedId、意味があれば実パラメータ名」に更新(英/日)。api-examples.md: CFRubrics のdoc欠落例を"doc"に更新。case-v1p1-conformance-backlog.md: C11 を「すでに対応済み」へ。残りは C12 / C8 を別 PR で実装予定です。
🤖 Generated with Claude Code