mocking-apis

Featured

Generate mock API servers for testing and development with realistic response data. Use when creating mock APIs for development and testing. Trigger with phrases like "create mock API", "generate API mock", or "setup mock server".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Mocking APIs ## Overview Generate mock API servers from OpenAPI specifications that return realistic, schema-compliant response data for development and testing. Support dynamic response generation with Faker.js data, configurable latency simulation, stateful CRUD behavior, and request recording for contract testing validation. ## Prerequisites - OpenAPI 3.0+ specification file with response schema definitions - Mock server runtime: Prism (Stoplight), json-server, MSW (Mock Service Worker), or WireMock - Faker.js or equivalent for realistic test data generation - Docker for containerized mock server deployment (optional but recommended) - Frontend or consumer application needing API stubs for parallel development ## Instructions 1. Read the OpenAPI specification using Read and extract all endpoint definitions, response schemas, and example values to build the mock response inventory. 2. Generate response fixtures for each endpoint using schema-aware data generation: realistic names (Faker), valid emails, properly formatted dates, and relational IDs that reference other mock entities. 3. Configure the mock server to match requests by method, path pattern, query parameters, and request body content type, returning the appropriate fixture. 4. Add stateful behavior for CRUD operations: POST creates a record in memory, GET returns it, PUT updates it, DELETE removes it -- enabling realistic integration testing flows. 5. Implement configurable response delays (50-500ms per e...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category