Skip to content

Player Model Validation Consistency and Response Formatting #344

@coderabbitai

Description

@coderabbitai

Overview

This enhancement proposes improvements to the Player model validation and response formatting for better API consistency and clarity.

Scope

1. Validation Consistency

Consider whether DateOfBirth should have validation rules (e.g., required, valid date range) to match the validation applied to FirstName, LastName, and AbbrPosition in PlayerRequestModelValidator.cs.

2. Position Field Handling

Clarify if the nullable Position field requires validation or special handling in the request/response pipeline.

3. DateOfBirth Response Format

Document or decide whether returning an empty string for null DateOfBirth in the response (current behavior in PlayerMappingProfile.cs) is the intended API contract, or if null or "N/A" would be clearer for API consumers.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codeenhancementNew feature or requestplanningEnables automatic issue planning with CodeRabbitpriority mediumPlanned enhancement. Queue for upcoming work.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions