Skip to content

請求書リクエストスキーマの厳格化(additionalProperties の導入) #38

@reiroop

Description

@reiroop

解決したい課題

現在、請求書の作成に使用するリクエストスキーマ(PostInvoiceRequest)において、additionalProperties が未指定(デフォルト true)のため、クライアント側から誤ったパラメータや未知のキーが送信された場合でもスキーマ検証で検知できず、バックエンドで黙って無視されて処理が進行してしまいます。

達成したい要件・仕様設計

API契約(仕様)の堅牢性を向上させ、送信データのバグを早期発見できるようにするため、以下のバリデーションを導入します。

  1. PostInvoiceRequestadditionalProperties: false を追加
    • 仕様に定義されていない未知のプロパティがリクエストに含まれている場合、400 Bad Request(スキーマバリデーションエラー)として即座に弾くようにします。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions