Open
Conversation
- バーコード検索API(/api/item/barcode/{barcode})のバリデーションを修正
- 数字のみ4桁以上 → A + 種別(2桁) + ID(6桁) + A 形式に変更
- APIドキュメントの例を実際の形式(A01000001A)に更新
- プロジェクトで実際に使用されているバーコードフォーマット(Constants.Validation.BARCODE_PATTERN)に準拠
Contributor
🎨 Visual Regression Test Results❌ Visual regression tests failed Some pages have visual differences. Please review the artifacts: 📋 Actions to take:
📊 Test Coverage
|
- SaleEntityにchangeAmountプロパティを追加してNOT NULL制約エラーを解決 - SalePersistenceService/SaleServiceでお釣り計算を実装 - レシート印刷を非同期化(CompletableFuture)してAPIレスポンスのブロッキングを回避 - ReceiptPrinterにSocket接続タイムアウト(5秒)を追加してプリンター接続エラー時の無限待機を防止
Contributor
🎨 Visual Regression Test Results❌ Visual regression tests failed Some pages have visual differences. Please review the artifacts: 📋 Actions to take:
📊 Test Coverage
|
Contributor
🎨 Visual Regression Test Results❌ Visual regression tests failed Some pages have visual differences. Please review the artifacts: 📋 Actions to take:
📊 Test Coverage
|
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.
Summary
バーコード検索API (
/api/item/barcode/{barcode}) のバリデーションルールを、プロジェクトで実際に使用されているバーコード形式に修正しました。Changes
^[0-9]{4,}$(数字のみ4桁以上)^A(00|01|02)\d{6}A$(A + 種別2桁 + ID6桁 + A)1234567890→A01000001ARationale
プロジェクトで実際に使用されているバーコードは
Constants.Validation.BARCODE_PATTERNで定義されている独自フォーマット(例:A01000001A)です。しかし、APIのバリデーションが数字のみの形式を期待していたため、実際のバーコードでリクエストするとエラーが発生していました。
Test plan
/api/item/barcode/A01000005Aで正常にレスポンスが返ることを確認