원클릭으로
api-dto-review
Review API DTO implementations for contract/domain separation, mapping patterns, and REST compliance
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Review API DTO implementations for contract/domain separation, mapping patterns, and REST compliance
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Authorization Code Flow for web applications using MSAL.NET confidential client to sign in users and access APIs on their behalf
Handle MSAL distributed token cache collisions and stale entries in ASP.NET Core applications
On-Behalf-Of (OBO) Flow for web APIs to call downstream APIs while preserving user identity in MSAL.NET
{what this skill teaches agents}
This skill should be used when the user asks to "build a feature", "fix a bug", "implement something", "start a dev cycle", types "/dev", or describes a software task that requires design, implementation, testing, and shipping. Orchestrates the full software development lifecycle from interrogation through shipping, with self-learning that improves over time.
Frontend JavaScript patterns for event handling, form UX, and validation integration
| name | api-dto-review |
| description | Review API DTO implementations for contract/domain separation, mapping patterns, and REST compliance |
Purpose: Review API DTO implementations for contract/domain separation, mapping patterns, and REST compliance.
Api/Dtos/*Request.cs, Response DTOs in Api/Dtos/*Response.cs[Required], [Url], and other validation attributesId in EngagementRequest for PUT /engagements/{id})ToResponse(DomainModel) helperToModel(RequestDTO, routeParams...) helperToModel as arguments, not extracted from DTO[ProducesResponseType] attributes updated to DTO typesToResponse(savedEntity), not raw entityif (!ModelState.IsValid) return BadRequest(ModelState);ToModel(request, idFromRoute)List<ResponseDTO> with .Select(ToResponse).ToList()e.Talks?.Select(ToResponse).ToList())ItemTableName) excluded from Request DTOs// WRONG: TalkRequest includes EngagementId but route provides it
public class TalkRequest
{
[Required] public int EngagementId { get; set; } // ← Route provides this!
}
[HttpPost("{engagementId:int}/talks")]
public async Task<ActionResult> CreateTalkAsync(int engagementId, TalkRequest request)
Fix: Remove EngagementId from TalkRequest. Use route parameter in mapping:
var talk = ToModel(request, engagementId); // engagementId from route
// WRONG: Returns domain model directly
[ProducesResponseType(StatusCodes.Status200OK, Type=typeof(Engagement))]
public async Task<ActionResult<Engagement>> GetEngagementAsync(int id)
{
return await _manager.GetAsync(id);
}
Fix: Map to Response DTO:
[ProducesResponseType(StatusCodes.Status200OK, Type=typeof(EngagementResponse))]
public async Task<ActionResult<EngagementResponse>> GetEngagementAsync(int id)
{
var engagement = await _manager.GetAsync(id);
return ToResponse(engagement);
}
After DTO changes:
dotnet test --filter FullyQualifiedName~Api.Tests --no-build.squad/decisions/inbox/trinity-pr512-dtos.md — DTO mapping pattern (private static helpers).squad/decisions/inbox/neo-pr512-review-dto-route-params.md — Route parameters must not be in Request DTOs