README
Welcome to the complete documentation for moclojer - a simple and efficient HTTP mock server. This documentation is designed to help you get started quickly and become proficient with all of moclojer's features.
🚀 Getting Started
New to moclojer? Start with our progressive tutorial series:
Overview - Learn what moclojer is and why you'd want to use it
Installation - Get moclojer running on your system
Using Postman Collections - Use your existing Postman Collections directly
Your First Mock Server - Create a working API in 10 minutes
Dynamic Responses - Make your mocks respond to request data
Multiple Endpoints - Build complete APIs with proper structure
Real-World Example - Complete e-commerce API tutorial
📚 Documentation Structure
This documentation follows a progressive structure inspired by Django's excellent documentation:
🎯 First Steps
Perfect for beginners - get up and running quickly with guided tutorials.
🧠 Core Concepts
Understand how moclojer works with detailed explanations of key concepts:
Configuration Formats
YAML Format - Complete syntax and best practices
OpenAPI Format - Import OpenAPI 3.x specifications
Postman Collection Format - Use Postman Collections v2.1
EDN Format - Native Clojure configuration
Endpoints
HTTP Methods - GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
Path Patterns - Route patterns and matching
Response Structure - Building HTTP responses
Request Matching - How moclojer routes requests
Templates
Template System - Dynamic content generation
Template Variables - Available variables
Parameters
Path Parameters - Dynamic URL parameters
Query Parameters - Filters and pagination
Body Parameters - Request body data
Header Parameters - HTTP headers
🔧 How-to Guides
Practical recipes for common use cases:
Testing
Integration Testing - Test with mock APIs
E2E Testing - Cypress and Playwright integration
Contract Testing - API contract validation
Deployment
Docker - Docker and Docker Compose
Kubernetes - K8s deployment
Cloud Run - Google Cloud Run
Common Patterns
CRUD Operations - Create, Read, Update, Delete
Pagination - Offset/Limit and cursor-based
Authentication Mock - JWT, OAuth, API keys
Error Handling - Standard error responses
API Versioning - Version strategies
CORS Configuration - Cross-origin requests
⚡ Advanced Features
Specialized functionality for complex scenarios:
WebSocket Support - Real-time bidirectional communication
External Bodies - Load responses from JSON/Excel files
Webhook Integration - Background requests
Rate Limiting - Request throttling
Multi-Domain Support - Host-based routing
🏗️ Framework Integration
Using moclojer as a library and integrating with applications:
Using as a Library - Programmatic usage
📖 Reference Documentation
Complete technical reference for all features:
Configuration Specification - Complete YAML spec
CLI Reference - Command-line options
FAQ - Frequently asked questions
Troubleshooting - Common issues and solutions
💡 Examples & Use Cases
Real-world examples and complete implementations:
Examples Overview - Guide to all examples
REST APIs
Basic CRUD API - Task management system
Blog API - Blog with nested resources
Third-Party API Mocks
Stripe Mock - Payment API simulation
🎯 Learning Paths
I'm entirely new to moclojer
Read the Overview
Follow the Installation guide
Complete all tutorials in the "First Steps" section
Explore Core Concepts as needed
I want to mock a specific type of API
Start with CRUD Operations How-to
Check Examples & Use Cases for your use case
Review HTTP Methods
Learn about Path and Query Parameters
Refer to the Configuration Specification
I'm integrating moclojer into my application
Read Using as a Library
Check Integration Testing
Review deployment guides in How-to Guides
I need help with a specific feature
Check the Troubleshooting Guide first
Review the FAQ
Search the Reference Documentation
Check CLI Reference for command-line options
Look for examples in How-to Guides
🔍 Quick Reference
Common Tasks
Create your first mock: Your First Mock Server
Use path parameters: Dynamic Responses
Handle JSON data: Body Parameters
Mock WebSockets: WebSocket Support
Load external data: External Bodies
Configuration Reference
All template variables: Template Variables Reference
Complete YAML specification: Configuration Specification
CLI options: CLI Reference
Troubleshooting
Common issues: FAQ
Detailed troubleshooting: Troubleshooting Guide
🤝 Contributing to Documentation
We welcome contributions to improve the documentation! Here's how you can help:
Quick Fixes
Fix typos or broken links
Improve unclear explanations
Add missing examples
Larger Contributions
Write new tutorials
Add industry-specific examples
Improve existing guides
Translate content
How to Contribute
Fork the repository
Make your changes in the
docs/directoryTest locally to ensure links work
Submit a pull request
Writing Guidelines
Use clear, simple language - Write for developers of all skill levels
Include practical examples - Show, don't just tell
Follow the progressive structure - Start simple, add complexity gradually
Test all code examples - Ensure examples actually work
Use proper Markdown formatting - Follow existing style
📞 Getting Help
Community Resources
GitHub Discussions - Ask questions and share ideas
GitHub Issues - Report bugs or request features
Documentation Issues
If you find problems with the documentation:
Check if it's already reported in GitHub Issues
Create a new issue with:
Clear description of the problem
Which page/section is affected
Suggested improvement (if applicable)
📄 Documentation License
This documentation is part of the moclojer project and follows the same MIT license as the main project.
Ready to get started? Begin with the Overview to learn what moclojer can do for you! 🚀
Last updated
Was this helpful?