mapper-validation

Validate TypeScript API mappers for exact field count and completeness.

6|Updated Feb 20, 2025
One-click install
npx skills add https://github.com/zerobias-org/module --skill mapper-validation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mapper-validation
Source: https://github.com/zerobias-org/module/tree/main/.claude/skills/mapper-validation
Command: npx skills add https://github.com/zerobias-org/module --skill mapper-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a rigorous, end-to-end workflow to enforce zero missing fields when mapping API interfaces to mapped types, preventing runtime errors and drift between spec and implementation.

Core Features & Use Cases

  • Enforces exact field-count parity between generated interfaces and mapper outputs.
  • Validates both required and optional fields, including nested objects, with explicit error handling.
  • Enables runtime validation steps to catch API-spec drift during integration and testing.

Quick Start

Validate a new API resource by running the mapper-validation process to ensure all fields are mapped and validated before deployment.

Frequently Asked Questions about mapper-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate TypeScript API mappers to prevent missing fields?▼

You validate TypeScript API mappers by enforcing exact field-count parity between generated interfaces and mapper outputs, ensuring every required and optional field is present. This runtime validation catches API-spec drift and guarantees zero missing fields across modules and nested objects.

What is field-count parity in TypeScript API mapping?▼

Field-count parity in API mapping ensures the number of fields in the mapper output exactly matches the generated TypeScript interface. It validates required and optional fields, including nested objects, to enforce end-to-end correctness and prevent drift between spec and implementation.

How do I check for API spec drift in TypeScript interfaces?▼

To check for API spec drift, apply runtime validation rules to mapper outputs against generated TypeScript interfaces from api.yml. This process validates field counts and nested object mappings, catching discrepancies between the API schema and implementation during integration.

Does mapper validation work with nested objects in TypeScript interfaces?▼

Yes, mapper validation works with nested objects in TypeScript interfaces by explicitly validating their field mappings. It ensures both required and optional nested fields are present in the mapping output, enforcing strict field counting for end-to-end correctness across modules.

How do I validate optional and required fields in API mapper outputs?▼

You validate optional and required fields by running a validation process that enforces exact field-count parity between the API schema and mapper outputs. This includes helper mappers and nested objects, ensuring zero missing fields before deployment.

When do I need runtime validation for TypeScript API mapping?▼

You need runtime validation for TypeScript API mapping when you want to catch API-spec drift during integration and testing. It enforces zero missing fields by validating exact field-count parity between generated interfaces and mapped types.