yapi-mock-data

Generate JSON mock data and TypeScript types from YApi definitions.

4|1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/empjs/skill --skill yapi-mock-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yapi-mock-data
Source: https://github.com/empjs/skill/tree/main
Command: npx skills add https://github.com/empjs/skill --skill yapi-mock-data

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps AI agents read YApi definitions and automatically generate mock data and corresponding TypeScript types, accelerating test data creation and validation.

Core Features & Use Cases

  • Generate JSON mock data from YApi schemas
  • Create TypeScript types from API definitions for type-safe tests
  • Use in CI pipelines to seed test environments with realistic data
  • Use Case: quickly spin up an API client mock from a YApi project to drive UI tests

Quick Start

Provide the path to your YApi project and run the skill to generate mocks and types.

Frequently Asked Questions about yapi-mock-data

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

FAQPage Schema
How do I generate mock data and TypeScript types from YApi definitions?

To generate mock data and TypeScript types from YApi definitions, provide the path to your YApi project. The tool parses the API schemas to automatically produce JSON mock payloads and type-safe TypeScript interfaces for API clients.

Can I use generated YApi mock data in CI pipelines for frontend testing?

Yes, you can use generated YApi mock data in CI pipelines. It seeds test environments with realistic JSON payloads, enabling teams to run automated frontend and backend tests without relying on live API endpoints.

What is the best way to create a type-safe API client from a YApi project?

The best way to create a type-safe API client from a YApi project is to parse the definitions and generate TypeScript types. This provides accurate type definitions for API requests and responses, ensuring type-safe tests.

Does generating mock data from YApi schemas require any external dependencies?

Generating mock data from YApi schemas does not require external dependencies. It directly parses the YApi definitions to output JSON mock payloads and TypeScript types suitable for local development and testing.