<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ismail Kamil</title>
    <description>The latest articles on DEV Community by Ismail Kamil (@ismailkamil).</description>
    <link>https://dev.to/ismailkamil</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F972096%2Fe3c08211-25b9-401e-8ce6-5cee53d93c85.png</url>
      <title>DEV Community: Ismail Kamil</title>
      <link>https://dev.to/ismailkamil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ismailkamil"/>
    <language>en</language>
    <item>
      <title>Top 10 API Documentation Tools 2025 (with examples)</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Mon, 30 Dec 2024 11:08:58 +0000</pubDate>
      <link>https://dev.to/ismailkamil/top-10-api-documentation-tools-in-2025-with-doc-examples-3pe4</link>
      <guid>https://dev.to/ismailkamil/top-10-api-documentation-tools-in-2025-with-doc-examples-3pe4</guid>
      <description>&lt;p&gt;Creating and maintaining comprehensive API documentation is pivotal for enhancing usability and adoption. As we step into 2025, let's delve into the top 10 API documentation tools that stand out in terms of functionality, protocol support, pricing, strengths, and weaknesses.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Apidog&lt;/li&gt;
&lt;li&gt;SwaggerHub&lt;/li&gt;
&lt;li&gt;Postman&lt;/li&gt;
&lt;li&gt;Redocly&lt;/li&gt;
&lt;li&gt;Stoplight&lt;/li&gt;
&lt;li&gt;Fern&lt;/li&gt;
&lt;li&gt;Readme&lt;/li&gt;
&lt;li&gt;Gitbook&lt;/li&gt;
&lt;li&gt;Theneo&lt;/li&gt;
&lt;li&gt;apiDoc&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=top_doc_tools" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Apidog is a newly emerged all-in-one tool for API design, documentation, development, testing, and mocking. Its API documentation features are quite unique, making it ideal for teams that prioritize an API design-first collaborative approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Integration of Markdown and API documentation. It supports separate Markdown pages and allows the insertion of Markdown elements within API documentation.&lt;/li&gt;
&lt;li&gt;Rich Markdown support. The Markdown supports features like steps, cards, image backgrounds, and various enhanced documentation effects.&lt;/li&gt;
&lt;li&gt;Supports multi-language and multi-version API documentation, facilitating easy switching between different versions.&lt;/li&gt;
&lt;li&gt;Customizable navigation bar.&lt;/li&gt;
&lt;li&gt;Supports light and dark modes and is optimized for mobile API documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzafvojhqg462434rmjuv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzafvojhqg462434rmjuv.png" alt="Image description" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.salla.dev/7102947e0" rel="noopener noreferrer"&gt;https://docs.salla.dev/7102947e0&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;li&gt;SOAP/Webservice&lt;/li&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;li&gt;WebSocket&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;The free version offers full features. A fee is required for teams with more than five members with $9/user.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Limited integration with other platforms.&lt;/li&gt;
&lt;li&gt;Available only online, with no option for local deployment.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. &lt;a href="https://swagger.io/tools/swaggerhub/" rel="noopener noreferrer"&gt;SwaggerHub&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;SwaggerHub is a well-known platform for API design and documentation, especially favored by enterprises looking for integrated API tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Comprehensive API lifecycle management.&lt;/li&gt;
&lt;li&gt;Seamless integration with Swagger Editor and Swagger UI.&lt;/li&gt;
&lt;li&gt;Supports collaboration with version control.&lt;/li&gt;
&lt;li&gt;Allows for easy API standardization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf27rxnn7jk6e0y5mt44.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf27rxnn7jk6e0y5mt44.png" alt="Image description" width="800" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://petstore.swagger.io/" rel="noopener noreferrer"&gt;https://petstore.swagger.io/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Offers a limited free version, with pricing tiers for additional features and team collaboration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Primarily focused on RESTful APIs; less support for other protocols.&lt;/li&gt;
&lt;li&gt;Can be complex for beginners.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. &lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Postman started as a simple API testing tool and has evolved into a comprehensive platform for API development and documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Supports the full API lifecycle including testing and monitoring.&lt;/li&gt;
&lt;li&gt;Extensive collaboration features with real-time support.&lt;/li&gt;
&lt;li&gt;Automatic generation of API documentation from collections.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr2zxq2yy3bjd90cx60b4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr2zxq2yy3bjd90cx60b4.png" alt="Image description" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://documenter.getpostman.com/view/9625258/SzS8tQrQ" rel="noopener noreferrer"&gt;https://documenter.getpostman.com/view/9625258/SzS8tQrQ&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;li&gt;WebSocket&lt;/li&gt;
&lt;li&gt;SOAP&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Offers a free tier with basic functionalities, with premium plans for advanced features and larger teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Can become resource-intensive for large-scale projects.&lt;/li&gt;
&lt;li&gt;Documentation customization is somewhat limited.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. &lt;a href="https://redocly.com/" rel="noopener noreferrer"&gt;Redocly&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Redocly is known for its interactive and visually appealing API documentation, predominantly focused on OpenAPI specifications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Highly customizable and theme-able.&lt;/li&gt;
&lt;li&gt;Interactive documentation with try-out features.&lt;/li&gt;
&lt;li&gt;Easy to deploy and integrate with existing CI/CD pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3iwhnar5vzm6v7qixs0u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3iwhnar5vzm6v7qixs0u.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://redocly.github.io/redoc/" rel="noopener noreferrer"&gt;https://redocly.github.io/redoc/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Offers an open-source version, with paid options for enterprise features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Primarily tied to OpenAPI, which limits flexibility with other specifications.&lt;/li&gt;
&lt;li&gt;Advanced features may require complex setup.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. &lt;a href="https://stoplight.io/" rel="noopener noreferrer"&gt;Stoplight&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Stoplight provides a robust platform for API design, mocking, and documentation with intuitive user interfaces.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Visual API design with automatic documentation generation.&lt;/li&gt;
&lt;li&gt;Mock server functionality for rapid prototyping.&lt;/li&gt;
&lt;li&gt;Multi-protocol support for versatile API needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwukyikv0i40izvt8y42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwukyikv0i40izvt8y42.png" alt="Image description" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.stoplight.io/docs/stoplight-api-docs/5f9e6d12b1e9b-export-a-project-file-branch" rel="noopener noreferrer"&gt;https://docs.stoplight.io/docs/stoplight-api-docs/5f9e6d12b1e9b-export-a-project-file-branch&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;li&gt;WebSocket&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Free basic tier, scaling up with features for professional and enterprise needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;May require a learning curve to utilize all features effectively.&lt;/li&gt;
&lt;li&gt;Smaller user community for support outside of official channels.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. &lt;a href="https://buildwithfern.com/" rel="noopener noreferrer"&gt;Fern&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Fern offers an elegant approach to API documentation, focusing on simplicity and developer experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Simple setup with minimal configuration.&lt;/li&gt;
&lt;li&gt;Clean and human-readable documentation style.&lt;/li&gt;
&lt;li&gt;Real-time API development feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe4f1zagikcsuzx1yqetw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe4f1zagikcsuzx1yqetw.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developers.webflow.com/data/reference/token/authorized-by" rel="noopener noreferrer"&gt;https://developers.webflow.com/data/reference/token/authorized-by&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Start from $400/mo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Limited protocol support.&lt;/li&gt;
&lt;li&gt;Expensive.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. &lt;a href="https://readme.com/" rel="noopener noreferrer"&gt;ReadMe&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;ReadMe focuses on delivering interactive API documentation with an emphasis on user engagement and easiness for end-users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Interactive documentation with built-in logs.&lt;/li&gt;
&lt;li&gt;Code examples in multiple languages.&lt;/li&gt;
&lt;li&gt;Customizable themes and branding options.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpjh8q690k8xw086hsxz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpjh8q690k8xw086hsxz0.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.readme.com/main/reference/getapispecification" rel="noopener noreferrer"&gt;https://docs.readme.com/main/reference/getapispecification&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Free tier available, with advanced features in paid plans.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Can be costly for high usage.&lt;/li&gt;
&lt;li&gt;Some features are locked behind higher price tiers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  8. &lt;a href="https://www.gitbook.com/" rel="noopener noreferrer"&gt;GitBook&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;GitBook serves a dual purpose as both a documentation tool for APIs and other forms of technical documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Clean and modern design with Markdown support.&lt;/li&gt;
&lt;li&gt;Real-time collaboration and comment features.&lt;/li&gt;
&lt;li&gt;Integrations with GitHub and other VCS tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dvfwfljcior0fp05jzr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dvfwfljcior0fp05jzr.png" alt="Image description" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.gitbook.com/developers/gitbook-api/reference/collections" rel="noopener noreferrer"&gt;https://docs.gitbook.com/developers/gitbook-api/reference/collections&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;General documentation platform, not limited to a single protocol.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Offers free and paid plans with additional features for professional use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Not API-specific which may lead to limited API-centric functionalities.&lt;/li&gt;
&lt;li&gt;Some integrations require additional setup.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  9. &lt;a href="https://www.theneo.io/" rel="noopener noreferrer"&gt;Theneo&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Theneo offers a streamlined solution for API documentation aimed at both developers and business users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;User-friendly interface with drag-and-drop components.&lt;/li&gt;
&lt;li&gt;Supports team collaboration and feedback.&lt;/li&gt;
&lt;li&gt;Multi-language support for global teams.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdfgmq65mz3v1so9mhg9h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdfgmq65mz3v1so9mhg9h.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.theneo.io/theneo/quickstart/api-reference/api-import-and-specs/rest-api" rel="noopener noreferrer"&gt;https://app.theneo.io/theneo/quickstart/api-reference/api-import-and-specs/rest-api&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Freemium model, with paid options for expanded features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Limited integration options.&lt;/li&gt;
&lt;li&gt;Occasionally lacks depth for complex API structures.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  10. &lt;strong&gt;apiDOC&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;apiDOC is an open-source documentation tool typically used for its straightforward approach to generating API docs from inline comments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Generates documentation from source code comments.&lt;/li&gt;
&lt;li&gt;Simple setup with minimal configuration needed.&lt;/li&gt;
&lt;li&gt;Supports customization via templates.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjjrtjceqe75efdbbnlz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjjrtjceqe75efdbbnlz.png" alt="Image description" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://apidocjs.com/example/" rel="noopener noreferrer"&gt;https://apidocjs.com/example/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported Protocols
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Free, open-source.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weaknesses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Limited to features provided by the community.&lt;/li&gt;
&lt;li&gt;Best suited for simpler API projects.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Here's a comparison table summarizing the key features, supported protocols, pricing, and weaknesses of the top API documentation tools in 2025:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Key Features&lt;/th&gt;
&lt;th&gt;Supported Protocols&lt;/th&gt;
&lt;th&gt;Pricing&lt;/th&gt;
&lt;th&gt;Weaknesses&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Apidog&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Markdown integration, rich elements, multi-language/version support&lt;/td&gt;
&lt;td&gt;REST, SOAP, GraphQL, WebSocket&lt;/td&gt;
&lt;td&gt;Free - $9/mo+&lt;/td&gt;
&lt;td&gt;Limited integration, online only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SwaggerHub&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Comprehensive API lifecycle management, easy standardization&lt;/td&gt;
&lt;td&gt;REST&lt;/td&gt;
&lt;td&gt;Free - $23/mo+&lt;/td&gt;
&lt;td&gt;Focused on REST, complex for beginners&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Postman&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Full lifecycle support, collaboration, auto-generation of docs&lt;/td&gt;
&lt;td&gt;REST, GraphQL, WebSocket, SOAP&lt;/td&gt;
&lt;td&gt;Free - $12/mo+&lt;/td&gt;
&lt;td&gt;Resource-intensive, limited customization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Redocly&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Interactive docs, highly customizable&lt;/td&gt;
&lt;td&gt;REST&lt;/td&gt;
&lt;td&gt;Free - $12/mo+&lt;/td&gt;
&lt;td&gt;Limited to OpenAPI, complex setup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Stoplight&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Visual design, mock server, multi-protocol support&lt;/td&gt;
&lt;td&gt;REST, GraphQL, WebSocket&lt;/td&gt;
&lt;td&gt;Free - $99/mo+&lt;/td&gt;
&lt;td&gt;Learning curve, smaller support community&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fern&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Simplified setup, clean design&lt;/td&gt;
&lt;td&gt;REST&lt;/td&gt;
&lt;td&gt;Start from $400/mo&lt;/td&gt;
&lt;td&gt;Limited protocol support&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ReadMe&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Interactive docs, code examples, customizable themes&lt;/td&gt;
&lt;td&gt;REST, GraphQL&lt;/td&gt;
&lt;td&gt;Free - $99/mo+&lt;/td&gt;
&lt;td&gt;Costly for high usage, features locked behind paywall&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GitBook&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Modern design, Markdown support, real-time collaboration&lt;/td&gt;
&lt;td&gt;General documentation platform&lt;/td&gt;
&lt;td&gt;Free - $65/mo+&lt;/td&gt;
&lt;td&gt;Not API-specific, additional integration setup required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Theneo&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;User-friendly, drag-and-drop, team collaboration&lt;/td&gt;
&lt;td&gt;REST, GraphQL&lt;/td&gt;
&lt;td&gt;Free - $120/mo+&lt;/td&gt;
&lt;td&gt;Limited integration, lacks depth for complex APIs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;apiDOC&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Generates docs from comments, simple setup&lt;/td&gt;
&lt;td&gt;REST&lt;/td&gt;
&lt;td&gt;Free, open-source&lt;/td&gt;
&lt;td&gt;Community-limited features, best for simpler projects&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This table provides a quick glance comparison to help identify which tool may best suit specific needs and preferences.&lt;/p&gt;

&lt;p&gt;Each of these tools provides distinct advantages and addresses specific needs within the realm of API documentation, allowing developers to choose the best fit based on their project requirements and team dynamics.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Best Practices for Developing Non-English APIs</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Thu, 26 Dec 2024 03:34:18 +0000</pubDate>
      <link>https://dev.to/apidog/best-practices-for-developing-non-english-apis-3bee</link>
      <guid>https://dev.to/apidog/best-practices-for-developing-non-english-apis-3bee</guid>
      <description>&lt;p&gt;OpenAPI (Swagger) is the most popular API design tool, and Postman is the most widely used tool for API development and debugging. However, if your team's working language is NOT English, Swagger and Postman might not be the best choices.&lt;/p&gt;

&lt;p&gt;I have tried a tool called &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=non_english" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt;, and from the perspectives of API design, API development and debugging, API mocking, and API documentation, it represents best practices for developing non-English APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  API Design
&lt;/h2&gt;

&lt;p&gt;Swagger is the standard tool for API design. However, if the API is intended for non-English usage, Swagger can be quite challenging to read and write. Mastering Swagger itself presents a significant challenge.&lt;/p&gt;

&lt;p&gt;This often leads many non-native English teams to abandon defining API specifications, instead opting to write code to achieve functionality. Consequently, the APIs developed may become difficult to call and collaborate on.&lt;/p&gt;

&lt;p&gt;Apidog offers a great alternative for designing APIs in non-English languages.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Firstly, the API design in Apidog is entirely visual. You don't need to grasp the complicated API schema syntax in Swagger; you can design compliant APIs visually. You can easily reference schemas visually and use components to improve the efficiency and standardization of API design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjg5b8svox1q93ppec2uu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjg5b8svox1q93ppec2uu.png" alt="Image description" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secondly, Apidog thoughtfully provides a "title" attribute for non-English developers, which describes the property's name in your native language, corresponding with the English "name" attribute. (Currently supporting Japanese and Portuguese)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiycexmv7rks7dhvlbeef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiycexmv7rks7dhvlbeef.png" alt="Image description" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In addition to visualized design, Apidog automatically generates mock responses in the current language when creating response examples. (Supports all languages)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzn068e33npd1xk163ido.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzn068e33npd1xk163ido.png" alt="Image description" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  API Documentation
&lt;/h2&gt;

&lt;p&gt;When you create an API spec in a non-English language, you can publish multilingual API documentation in Apidog. (Supports all languages)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2cmvlumnnfk0ywwr1kwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2cmvlumnnfk0ywwr1kwt.png" alt="Image description" width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  API Development and Debugging
&lt;/h2&gt;

&lt;p&gt;No matter what language your API spec is defined in, Apidog allows you to send requests in any language you need by generating the request body. (Supports all languages)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2u9u32x7jl08wn5d8co.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2u9u32x7jl08wn5d8co.png" alt="Image description" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  API Mocking
&lt;/h2&gt;

&lt;p&gt;You can also generate corresponding Mock APIs based on your spec. (Supports all languages)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fardrava2u6iok3jfgid2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fardrava2u6iok3jfgid2.png" alt="Image description" width="800" height="549"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Overall, Apidog provides a comprehensive solution for non-English speaking developers, offering a seamless experience in designing, documenting, developing, and testing APIs. This tool empowers developers to focus on building functionality without being hindered by language barriers, effectively bridging the gap between different languages in software development.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=non_english" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;🦴 Try Apidog 🐶&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Build Your Frontend Apps 10x Faster!</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Thu, 05 Dec 2024 10:04:48 +0000</pubDate>
      <link>https://dev.to/apidog/how-to-mock-apis-in-40s-and-build-frontend-apps-10x-faster-4d3i</link>
      <guid>https://dev.to/apidog/how-to-mock-apis-in-40s-and-build-frontend-apps-10x-faster-4d3i</guid>
      <description>&lt;p&gt;One of the biggest challenges in frontend development is the waiting game. When the API is not yet ready, the frontend team is often left with no choice but to hard-code the response data into the UI. This is a major bottleneck that hinders frontend development efficiency.&lt;/p&gt;

&lt;p&gt;However, there is now an extremely efficient solution that allows you to mock any API data in just 1 min and provide it to the frontend team as an API. &lt;/p&gt;

&lt;p&gt;The best part is that -- the mocked data is dynamic and almost indistinguishable from the real data.&lt;/p&gt;

&lt;p&gt;Let's start.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get the Required JSON.&lt;/li&gt;
&lt;li&gt;Use Apidog to Create an Endpoint with your JSON.&lt;/li&gt;
&lt;li&gt;Save and Get the Mock URL.
Done!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkj4eod0jgjnrauvt3b50.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkj4eod0jgjnrauvt3b50.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Get the Required JSON
&lt;/h2&gt;

&lt;p&gt;When preparing to mock an API, obtaining the necessary JSON data is crucial. This JSON data represents the structure of the response your frontend application expects from the API. There are several methods for acquiring this JSON data:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaboration with Backend Team&lt;/strong&gt;: Engage in discussions with your backend colleagues to get a precise understanding of the required data structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API Documentation Exploration&lt;/strong&gt;: Review any existing API documentation that details the endpoints and typical response formats you can anticipate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Existing Sample Data&lt;/strong&gt;: If the application being developed is an enhancement or revision, older versions or similar projects may have existing sample data that can be used as a reference. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Manual JSON Construction&lt;/strong&gt;: When data is unpredictable or not yet modeled, you might manually draft a sample JSON template based on expected fields and types.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Example JSON
&lt;/h4&gt;

&lt;p&gt;Let’s consider the following example JSON structure for our mock API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;93189357&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"firstName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Richard"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"familyName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mertz"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Joel_Bergstrom64@yahoo.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"phone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"(588) 534-9295"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"streetAddress"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"789 Noel Fall"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"city"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"East Olgastead"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Missouri"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"zipcode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"04493"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"gender"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"female"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"birthday"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2010-01-31"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"bio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"assist advocate  🦝"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"userAgent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 5.2; Trident/6.0)"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a fictional user JSON containing several common fields.&lt;/p&gt;

&lt;p&gt;Now just copy it. If you've already such a JSON, this step will take you no more than 10 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Use Apidog to Create an Endpoint with Your JSON
&lt;/h2&gt;

&lt;p&gt;Apidog is an efficient tool for API development and mocking. First, download it from &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_boost" rel="noopener noreferrer"&gt;Apidog's website&lt;/a&gt; and register an account. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs83vztghwjj2e4cxmd9w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs83vztghwjj2e4cxmd9w.png" alt="Image description" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once that's done, click "create a new endpoint" within your project. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foh38tsup0vxwgk4y1cja.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foh38tsup0vxwgk4y1cja.png" alt="Image description" width="800" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The only field you must fill in is the endpoint path—use something like &lt;code&gt;/user/{id}&lt;/code&gt; for accessing mock data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffy765xaprf4dl0a75g6y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffy765xaprf4dl0a75g6y.png" alt="Image description" width="800" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, scroll to the Response section and click on the "Generate from JSON etc." button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqup2fyou0cowqc394cl8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqup2fyou0cowqc394cl8.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste your JSON data from Step 1 and click OK. Apidog will automatically generate the response schema and example based on your JSON. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F360nc21fklpfdnfoi36l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F360nc21fklpfdnfoi36l.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, click Save to save the endpoint. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftagx7vcprl52cyys94kn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftagx7vcprl52cyys94kn.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This whole process, excluding download and registration, only takes about 30 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Get the Mock URL
&lt;/h2&gt;

&lt;p&gt;After saving your endpoint in Apidog, you'll find a mock module within the endpoint details. This module provides you with a mock URL. Simply click on the mock URL to copy it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1218limi8t5o8eytwxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1218limi8t5o8eytwxw.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, paste this URL into your browser. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqu9ppb8n070upqu9con.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqu9ppb8n070upqu9con.png" alt="Image description" width="800" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! You now have a working mock API! &lt;/p&gt;

&lt;p&gt;It's not just a static response; every time you refresh the page, you'll notice that the content changes, simulating the behavior of a real API. This dynamic response feature is invaluable for testing and developing frontend applications in a realistic environment without waiting for the backend to be ready.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5u6sum6xmkxsqw1qpj48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5u6sum6xmkxsqw1qpj48.png" alt="Image description" width="800" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Apidog operates as a robust platform for API development and mocking by intelligently interpreting your input JSON data. Here's a closer look at its functionality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JSON Parsing and Data Schema Generation&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you paste your JSON into Apidog, it parses the structure to create a corresponding data schema, establishing an API specification. This schema defines the expected format and type of data for each property in the JSON.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mock Engine&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Apidog includes an integrated mock engine, effectively functioning as a lightweight mock server that runs locally on your PC. This engine uses your API specification to dynamically generate mock data.&lt;/p&gt;

&lt;p&gt;For dynamic responses, Apidog utilizes the names of your JSON properties to apply appropriate mock functions from &lt;a href="https://github.com/Marak/Faker.js/" rel="noopener noreferrer"&gt;faker.js&lt;/a&gt;. These mock functions are responsible for producing realistic, random data. Each browser refresh triggers the generation of new mock data, giving the illusion of interacting with a real API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Static Mock
&lt;/h3&gt;

&lt;p&gt;If you prefer consistent outputs on every request, you have the option to switch the mock data from dynamic to static effortlessly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;During the JSON parsing process, Apidog saves the data as a response example.&lt;/li&gt;
&lt;li&gt;To make use of this static option, go to &lt;strong&gt;Settings&lt;/strong&gt;, navigate to &lt;strong&gt;Feature Settings&lt;/strong&gt;, and access &lt;strong&gt;Mock Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Change the default mock type to "Response example first." By doing this, the mock API will consistently return the saved response example, making your test data stable and predictable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9908jo2xl7ilkbys39yy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9908jo2xl7ilkbys39yy.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Custom Mock
&lt;/h3&gt;

&lt;p&gt;If the automatically generated mock output for a specific property doesn't meet your requirements, Apidog allows you to customize this property's mock behavior easily.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Response Schema&lt;/strong&gt; section for the relevant endpoint.&lt;/li&gt;
&lt;li&gt;Locate the property whose mock needs adjustment. In the mock field of this property, choose a suitable function that aligns with your desired output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcaz2jv6p8x1vjx9dooif.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcaz2jv6p8x1vjx9dooif.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud Mock
&lt;/h2&gt;

&lt;p&gt;The mock API we've discussed so far is hosted locally. However, if you need to share it with others or give access outside your local environment, Apidog provides a cloud mock feature.&lt;/p&gt;

&lt;p&gt;To enable this feature, Go to &lt;strong&gt;Settings&lt;/strong&gt;, navigate to &lt;strong&gt;Feature Settings&lt;/strong&gt;, and access &lt;strong&gt;Mock Settings&lt;/strong&gt;. Toggle on the &lt;strong&gt;Cloud Mock&lt;/strong&gt; option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fda5hys78vbkq61oaf2gj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fda5hys78vbkq61oaf2gj.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once enabled, your API will be accessible from the cloud. Simply copy the cloud mock URL provided and open it in a browser to access it. This feature makes it easy to share your mock API with team members, stakeholders, or testers who need to access it remotely.&lt;/p&gt;

&lt;p&gt;For example, try visiting this cloud mock address to see it in action:&lt;br&gt;
&lt;code&gt;https://mock.apidog.com/m1/644296-613644-default/user/1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3xzkcinvm5fmnyrjwf0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3xzkcinvm5fmnyrjwf0.png" alt="Image description" width="800" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is truly a comprehensive Mock API solution.&lt;/p&gt;

&lt;p&gt;Apidog claims to be the REAL API Design-first Development Platform, and it can be used for Design, Debug, Test, Document, and Mock. &lt;/p&gt;

&lt;p&gt;In practice, it is very user-friendly and effectively enhances the work efficiency of front-end, back-end, and testing teams. &lt;/p&gt;

&lt;p&gt;You should give it a try as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_boost" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;🦴 Try Apidog 🐶&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_boost" rel="noopener noreferrer"&gt;Apidog Official Website&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>frontend</category>
      <category>programming</category>
    </item>
    <item>
      <title>2025 Review: 10 Top API Mock Tools</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Wed, 28 Dec 2022 06:37:44 +0000</pubDate>
      <link>https://dev.to/ismailkamil/review-10-top-api-mock-tools-57f7</link>
      <guid>https://dev.to/ismailkamil/review-10-top-api-mock-tools-57f7</guid>
      <description>&lt;h2&gt;
  
  
  What is API mock
&lt;/h2&gt;

&lt;p&gt;API mock, or mock API, is a simulated version of an API that is used for testing and development purposes. It allows developers to test their applications or services without relying on a live API, and can be configured to return specific responses to incoming requests. This can be useful for testing the functionality of an application or service in different scenarios, and can help developers identify and troubleshoot any issues that may arise.&lt;/p&gt;

&lt;p&gt;API mock tools typically provide a way to create a mock version of an API, configure it to return specific responses to incoming requests, and simulate different scenarios and behaviors. This can include simulating error responses, latency, and other types of responses that may be difficult or impossible to reproduce with a live API.&lt;/p&gt;

&lt;p&gt;API mock tools are commonly used in the development and testing of applications and services that rely on APIs, as they can save time and effort compared to testing with a live API. They can also be useful for testing the robustness and reliability of an application or service, and can help developers ensure that their applications or services are functioning correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  When we need mock API
&lt;/h2&gt;

&lt;p&gt;There are several situations in which mock APIs can be useful:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Testing: Mock APIs can be used to test the functionality of an application or service without relying on a live API. This can be useful for testing the robustness and reliability of an application or service, and can help developers identify and troubleshoot any issues that may arise.&lt;/li&gt;
&lt;li&gt;Development: Mock APIs can be used to develop and test applications or services without having to wait for a live API to be available. This can be especially useful when the live API is not yet available, or when it is not feasible to use a live API for development or testing purposes.&lt;/li&gt;
&lt;li&gt;Simulation: Mock APIs can be used to simulate different scenarios and behaviors that may be difficult or impossible to reproduce with a live API. This can include simulating error responses, latency, and other types of responses that may be difficult or impossible to reproduce with a live API.&lt;/li&gt;
&lt;li&gt;Isolation: Mock APIs can be used to isolate an application or service under development from other systems, allowing developers to focus on the functionality of the application or service without being affected by external factors.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Overall, mock APIs can be useful in a variety of situations where it is necessary or desirable to test or develop an application or service without relying on a live API.&lt;/p&gt;

&lt;h2&gt;
  
  
  10 Top API Mock Tools
&lt;/h2&gt;

&lt;p&gt;There are many different API mock tools on the market, each with its own set of features and capabilities. In this review, we will take a look at some of the top API mock tools, including their features, capabilities, and any relevant details such as supported platforms, pricing, and documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Apidog&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_tools" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt; is a platform or tool that allows you to import an API definition and generate mock data for testing and development purposes. Its "Smart Mock" feature can generate mock data automatically based on the names of fields, allowing you to create realistic-looking mock data without having to manually specify the values for each field. &lt;/p&gt;

&lt;p&gt;One of the benefits of using Apidog is that the mock data is generated automatically, and it changes each time the URL is requested. Apidog automatically generate user-friendly mock data based on your API specifications, and creates data that closely mimics real-world scenarios, covering a wide range of possible use cases.&lt;/p&gt;

&lt;p&gt;Apidog is free to use, making it a good choice for developers who need a simple tool for testing and development purposes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft371w0exnhtx8htkpkr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft371w0exnhtx8htkpkr6.png" alt="Image description" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Postman&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://postman.com" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; is a popular tool for testing and interacting with APIs. Its "Mock Servers" feature allows you to set up a mock version of your API and configure it to return specific responses to incoming requests. &lt;/p&gt;

&lt;p&gt;This can be useful for testing the functionality of your application or service without having to rely on a live API, and can help you identify and troubleshoot any issues that may arise. However, Postman may not provide as many tools for API design and mock server management as some other platforms, and may not be suitable for developers who need more advanced or customized mock server functionality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqs5ixlj4nlzh8d8lm5zg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqs5ixlj4nlzh8d8lm5zg.png" alt="Image description" width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Mocki&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://mocki.io" rel="noopener noreferrer"&gt;Mocki&lt;/a&gt; is an online tool for creating and hosting mock APIs. It allows you to set up a mock version of your API and configure it to return specific responses to incoming requests. mocki.io is relatively easy to use and has a wide range of features for mocking and simulating APIs, including support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on the contents of incoming requests.&lt;/p&gt;

&lt;p&gt;One of the benefits of using Mocki is that it is a cloud-based tool, meaning that you can access and manage your mock APIs from anywhere with an internet connection. This can be especially useful for developers who need to collaborate with team members or clients remotely, as it allows everyone to access the mock APIs from their own devices.&lt;/p&gt;

&lt;p&gt;Overall, Mocki can be a useful tool for testing and development purposes, particularly for developers who need a cloud-based solution for creating and managing mock APIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fupsajby3653xz7ifbwur.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fupsajby3653xz7ifbwur.png" alt="Mock APIs Using the Editor" width="800" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Mockoon&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://www.mockoon.com" rel="noopener noreferrer"&gt;Mockoon&lt;/a&gt; is an open-source tool for creating and managing mock servers. It allows you to set up a mock version of your API and configure it to return specific responses to incoming requests. &lt;/p&gt;

&lt;p&gt;Mockoon is relatively easy to use and has a wide range of features for mocking and simulating APIs, including support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on the contents of incoming requests. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fao9hksxvzb5ynx5f6x7u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fao9hksxvzb5ynx5f6x7u.png" alt="Image description" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Stoplight&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://stoplight.io" rel="noopener noreferrer"&gt;Stoplight&lt;/a&gt; is a platform for designing, documenting, and testing APIs. Its "Mocks" feature allows you to create mock versions of your API for testing and development purposes. In addition to the mock feature, Stoplight also includes tools for API design, documentation, and testing, making it a comprehensive platform for API development. &lt;/p&gt;

&lt;p&gt;However, Stoplight may be more complex to use and may require a subscription to access all of its features, making it less suitable for developers who are looking for a simple or free tool for testing and development purposes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuv0abnt5428k0xp0mfeb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuv0abnt5428k0xp0mfeb.png" alt="Image description" width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;MockAPI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://mockapi.io/" rel="noopener noreferrer"&gt;MockAPI&lt;/a&gt; is a tool for creating and hosting mock APIs. It allows you to set up a mock version of your API and configure it to return specific responses to incoming requests. mockAPI is relatively easy to use and has a wide range of features for mocking and simulating APIs, including support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on the contents of incoming requests.&lt;/p&gt;

&lt;p&gt;One of the benefits of using MockAPI is that it is a cloud-based tool, meaning that you can access and manage your mock APIs from anywhere with an internet connection. This can be especially useful for developers who need to collaborate with team members or clients remotely, as it allows everyone to access the mock APIs from their own devices.&lt;/p&gt;

&lt;p&gt;Overall, MockAPI can be a useful tool for testing and development purposes, particularly for developers who need a cloud-based solution for creating and managing mock APIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fds14ffroeam22198xahi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fds14ffroeam22198xahi.png" alt="Image description" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;WireMock&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://wiremock.org/" rel="noopener noreferrer"&gt;WireMock&lt;/a&gt; is a Java-based library for stubbing and mocking web services. It is relatively simple to use and has a wide range of features for stubbing and mocking web services, including the ability to set up conditional responses based on incoming requests, simulate latency, and record and replay HTTP traffic. &lt;/p&gt;

&lt;p&gt;This can be useful for testing the functionality of your application or service in different scenarios, and can help you identify and troubleshoot any issues that may arise. WireMock is open-source and available for free, making it a good choice for developers who need a simple tool for testing and development purposes. However, it may not be as easy to use for developers who are not familiar with Java, and may not provide as many features or customization options as some other tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Mountebank&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://www.mbtest.org/" rel="noopener noreferrer"&gt;Mountebank&lt;/a&gt; is a cross-platform tool for creating mock servers and stubbing HTTP APIs. It allows you to specify the behavior of your mock server using a simple configuration file, and can be used to simulate a variety of different scenarios, such as error responses and latency. &lt;/p&gt;

&lt;p&gt;This can be useful for testing the robustness and reliability of your application or service, and can help you identify and troubleshoot any issues that may arise. Mountebank is open-source and available for free, making it a good choice for developers who need a flexible tool for simulating different scenarios and behaviors. However, it may not be as easy to use for developers who are not familiar with its configuration file format, and may not provide as many features or customization options as some other tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Apigee&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://cloud.google.com/apigee" rel="noopener noreferrer"&gt;Apigee&lt;/a&gt; is a comprehensive platform for designing, building, and testing APIs. It includes a feature called "API mocking," which allows you to create a mock version of your API for testing and development purposes. In addition to the mock feature, Apigee also includes a wide range of tools for API development, including support for API design, documentation, testing, and deployment. &lt;/p&gt;

&lt;p&gt;However, Apigee may be more complex to use and requires a subscription to access all of its features, making it less suitable for developers who are looking for a simple or free tool for testing and development purposes.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Hoverfly&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hoverfly.io/" rel="noopener noreferrer"&gt;Hoverfly&lt;/a&gt; is an open-source tool for mocking and simulating APIs. It is relatively easy to use and has a wide range of features for mocking and simulating APIs, including support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on the contents of incoming requests. &lt;/p&gt;

&lt;p&gt;This can be useful for testing the functionality of your application or service in different scenarios, and can help you identify and troubleshoot any issues that may arise. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Comparison&lt;/strong&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Features&lt;/th&gt;
&lt;th&gt;Pricing&lt;/th&gt;
&lt;th&gt;Ease of use&lt;/th&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Apidog&lt;/td&gt;
&lt;td&gt;Smart Mock feature for generating mock data automatically based on field names; free to use&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Web-based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Postman&lt;/td&gt;
&lt;td&gt;Mock Servers feature for setting up a mock version of an API and configuring it to return specific responses to incoming requests; support for API design, documentation, and testing&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Windows, Mac, Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WireMock&lt;/td&gt;
&lt;td&gt;Support for setting up conditional responses based on incoming requests, simulating latency, and recording and replaying HTTP traffic; open-source and free to use&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Java&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mountebank&lt;/td&gt;
&lt;td&gt;Support for specifying the behavior of a mock server using a configuration file; open-source and free to use&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Windows, Mac, Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Apigee&lt;/td&gt;
&lt;td&gt;API mocking feature for creating a mock version of an API; support for API design, documentation, testing, and deployment; subscription required for access to all features&lt;/td&gt;
&lt;td&gt;Subscription&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Web-based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hoverfly&lt;/td&gt;
&lt;td&gt;Support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on incoming requests; open-source and free to use&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Windows, Mac, Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stoplight&lt;/td&gt;
&lt;td&gt;Mocks feature for creating mock versions of an API; support for API design, documentation, and testing; subscription required for access to all features&lt;/td&gt;
&lt;td&gt;Subscription&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Web-based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mockoon&lt;/td&gt;
&lt;td&gt;Support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on incoming requests; open-source and free to use&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Windows, Mac, Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mocki&lt;/td&gt;
&lt;td&gt;Support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on incoming requests; cloud-based&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Web-based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mockAPI&lt;/td&gt;
&lt;td&gt;Support for importing and exporting mock configurations, generating random data for responses, and setting up conditional responses based on incoming requests; cloud-based&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Web-based&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Mock REQUEST bodies automatically to accelerate API debugging</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Mon, 28 Nov 2022 10:18:59 +0000</pubDate>
      <link>https://dev.to/ismailkamil/generate-request-bodies-automatically-to-accelerate-debugging-4dl5</link>
      <guid>https://dev.to/ismailkamil/generate-request-bodies-automatically-to-accelerate-debugging-4dl5</guid>
      <description>&lt;p&gt;When developing APIs, debugging is always a boring problem. &lt;/p&gt;

&lt;p&gt;Postman can help send requests, but when the API body is complicated, constructing a JSON body would be difficult. Junit also works, but all requests must be constructed yourself in testing classes.&lt;/p&gt;

&lt;p&gt;Complex bodies make many backends abandon unit tests and output an untested API to frontend developers and QA engineers. &lt;/p&gt;

&lt;p&gt;The above case demonstrates that the code quality declines without a good tool. &lt;/p&gt;

&lt;p&gt;And now, I found that &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_request_body" rel="noopener noreferrer"&gt;a tool named Apidog&lt;/a&gt; can generate the request body automatically when debugging. The tool can construct a correct request JSON itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to mock it
&lt;/h2&gt;

&lt;p&gt;This approach works for API-first teams. APIs are designed before developing, so while debugging, you have an API specification.&lt;/p&gt;

&lt;p&gt;1.Import the API specifications into Apidog. (&lt;a href="https://dev.to/ismailkamil/how-to-mock-an-api-in-one-minute-eip/"&gt;How to?&lt;/a&gt;)&lt;br&gt;
2.Open an API, and make sure the request has a JSON/XML body specification.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8depoegey0lem5hc185.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8depoegey0lem5hc185.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.Switch to the "Run" tab, and click the "Generate Automatically" button.&lt;/p&gt;

&lt;p&gt;OK. You've got a mock JSON according to the request specification!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9elinaoj7q2qtf3yfxc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9elinaoj7q2qtf3yfxc5.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And now click "send" to send the request like what we did in Postman, but more efficiently. Most features in Postman are also supported in Apidog.&lt;/p&gt;

&lt;p&gt;Our team have used Apidog to debug APIs instead of Postman for weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's more
&lt;/h2&gt;

&lt;p&gt;Notice the mock data. It was generated automatically according to the field name. A field named "city" are mocked with a city name, a field named photoUrl is mocked with a photo URL, and all mock data follows JSON schema specified in the API. Just like what I wrote in &lt;a href="https://dev.to/ismailkamil/how-to-mock-complex-json-in-two-minutes-2m9n"&gt;How to mock complex JSON&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And that's not the end.&lt;/p&gt;

&lt;p&gt;Hover on the arrow beside "Generate Automatically", you'll see three menu items.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgaoiftrapox2sjkb02oh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgaoiftrapox2sjkb02oh.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"Default value first" means the mock JSON would be filled by the default value specified in each field of the API first. "Example value first" means the mock JSON would be loaded by the example request JSON first. But what is "Refresh when sending request"?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjlt5ln9op9zeue7oj3t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjlt5ln9op9zeue7oj3t.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's just the literal meaning. Each time the request is sent, the body is generated again.&lt;/p&gt;

&lt;p&gt;Interesting, isn't it?&lt;/p&gt;

&lt;h2&gt;
  
  
  Customize it
&lt;/h2&gt;

&lt;p&gt;Until now, everything looks great.&lt;/p&gt;

&lt;p&gt;But what if some of my fields are not expected to change? How can I make some fields fixed and some mocked?&lt;/p&gt;

&lt;p&gt;Click the "Dynamic Value" button, and you'll find a new world.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc0xe2jlba4tt8c6yl640.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc0xe2jlba4tt8c6yl640.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All Faker.js syntaxes are supported, and you can select any of them directly. You can even select a function to mutate the mock value like md5, substr or base64 etc.&lt;br&gt;
Then it will be inserted into the request body, just like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0y85l19nu6nn5ttcasdz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0y85l19nu6nn5ttcasdz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can decide which field is fixed and which is mocked by Faker.js. When sent, all faker fields will change to the actual data below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47yomatmtqnsti0hcnxc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47yomatmtqnsti0hcnxc.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. And it changes each time sending.&lt;/p&gt;

&lt;p&gt;Apidog is a great tool that makes our team build APIs faster. I like it.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_request_body" rel="noopener noreferrer"&gt;Download Apidog here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Mock ONLINE APIs without setting up a server</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Tue, 22 Nov 2022 12:10:46 +0000</pubDate>
      <link>https://dev.to/ismailkamil/how-to-mock-online-apis-in-one-minute-2pmf</link>
      <guid>https://dev.to/ismailkamil/how-to-mock-online-apis-in-one-minute-2pmf</guid>
      <description>&lt;p&gt;There are many approaches to mock JSON data and use it offline. But if you need some &lt;strong&gt;online&lt;/strong&gt; data in your app, you'll have to run a mock server in your own cloud server.&lt;br&gt;
That's not easy, especially for front-end developers.&lt;br&gt;
But now, there is a fantastic way to start a mock server on the cloud, easily and free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Mock APIs Online
&lt;/h2&gt;

&lt;p&gt;In local development, offline mock data is enough for front-end developers. But there are some common scenarios where offline mock data is not good enough.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 1: Team shared mock data
&lt;/h3&gt;

&lt;p&gt;Some data structure is complicated, maybe with many fields or following complex schemas. If several developers need the same mock API, the best solution is to build one online mock server that everyone can visit.&lt;br&gt;
For teams, shared online mock data would accelerate their development a lot. Mock data can be defined only once.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 2: APIs under development
&lt;/h3&gt;

&lt;p&gt;In many teams, APIs are not designed well at the beginning. An initial specification of how the API responses should look like is likely to change while it is developed for real. An offline mock data will soon be different from the real API responses.&lt;br&gt;
So, online mock data following backend API specifications would be great.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to mock it
&lt;/h2&gt;

&lt;p&gt;In my previous articles, I introduced how to mock dynamic data on a local server rapidly in the tool &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_online_API_in_one_minute" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt;.&lt;br&gt;
And now I find that mocking on a cloud server is also easy and free!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Import API definitions
&lt;/h3&gt;

&lt;p&gt;API documentation is necessary. OpenAPI (Swagger) is best, and any other format is OK, too.&lt;/p&gt;

&lt;p&gt;Create a new project in &lt;a href="[Apidog](http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_online_API_in_one_minute)"&gt;Apidog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgfoi8b131h0s1q1kbre.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgfoi8b131h0s1q1kbre.png" alt="Create project"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to "Settings"-"Import", and drag your API file in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskl2ph7m1te8orrlf61r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskl2ph7m1te8orrlf61r.png" alt="Import API"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More than ten formats of API documentation are supported. Click "Next" and your API will be imported.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Turn on the cloud mock server
&lt;/h3&gt;

&lt;p&gt;Go to "Settings"-"Feature Settings"-"Mock Settings", and turn on the "Cloud Mock" switch.&lt;br&gt;
Cloud mock can be accessed open, or you can set a token for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgedgs787oahnn2v6jl8v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgedgs787oahnn2v6jl8v.png" alt="Turn on cloud mock"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Get the mock URL
&lt;/h3&gt;

&lt;p&gt;Click an API in Apidog. You'll see an API definition page, in which there is a section named "Mock". Copy the URL in the "Cloud Mock" part which starts with "mock.apidog.com".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnt3rc00fc0qp9xef1ia8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnt3rc00fc0qp9xef1ia8.png" alt="Mock URL"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste it into your browser.&lt;/p&gt;

&lt;p&gt;OK, it's done! You'll see a mocking JSON!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqq8g35ei9ts05vqfi31a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqq8g35ei9ts05vqfi31a.png" alt="Mocking JSON"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A "city" field is filled by a city name, an "id" field is filled by an integer, and "status" is a enum field.&lt;/p&gt;

&lt;p&gt;Now you can use the API data in your app, and anyone in the team can access this URL to get data.&lt;/p&gt;

&lt;p&gt;Still, you don't need to write any scripts. Data in all fields are generated automatically.&lt;/p&gt;

&lt;p&gt;And when you click "reload" in the browser, the data will refresh.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm93iaerfatwr6zmr0iqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm93iaerfatwr6zmr0iqz.png" alt="Mocking JSON"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  APIs under development
&lt;/h2&gt;

&lt;p&gt;This approach solved the team-shared mock data scenario. But if the API is still under development, how can the other developers get the latest mock data?&lt;/p&gt;

&lt;p&gt;The solution is also in Apidog. Apidog is an all-in-one API developing toolkit, so the backend developers can use it to debug the APIs like in Postman and specify APIs like in Stoplight. Apidog can synchronize Swagger automatically so API specifications can be kept the latest. When API specifications change, the online mock data changes synchronizing.&lt;/p&gt;

&lt;p&gt;It's a perfect API developing toolkit for teamwork.&lt;/p&gt;

&lt;p&gt;You can &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock_online_API_in_one_minute" rel="noopener noreferrer"&gt;register or download Apidog&lt;/a&gt; here.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Mock complex APIs in TWO minutes</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Mon, 21 Nov 2022 12:15:34 +0000</pubDate>
      <link>https://dev.to/ismailkamil/how-to-mock-complex-json-in-two-minutes-2m9n</link>
      <guid>https://dev.to/ismailkamil/how-to-mock-complex-json-in-two-minutes-2m9n</guid>
      <description>&lt;p&gt;Many developers love the solution I wrote in &lt;a href="https://dev.to/ismailkamil/how-to-mock-an-api-in-one-minute-eip/"&gt;&lt;em&gt;How to Mock an API in ONE minute&lt;/em&gt;&lt;/a&gt;. In the article, I introduced an approach to mock an API rapidly.&lt;/p&gt;

&lt;p&gt;But what I wrote is only a tiny part of the tool. After a period of exploring, I found more valuable features to mock complex data faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Complex JSON
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.to/ismailkamil/how-to-mock-an-api-in-one-minute-eip/"&gt;My last article&lt;/a&gt; introduced how to import a Swagger API into &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock-complex-JSON" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt; to mock some JSON data. Then you can have your mock data directly without any scripts.&lt;/p&gt;

&lt;p&gt;But some fields are complicated; you can't mock them without any settings.&lt;/p&gt;

&lt;p&gt;For example, &lt;strong&gt;an enum field&lt;/strong&gt; has several optional values. It usually appears in status fields.&lt;/p&gt;

&lt;p&gt;Or &lt;strong&gt;an array with a fixed length&lt;/strong&gt;. It's often used in a table where each row has several attributes, and each page has 20 or 50 rows.&lt;/p&gt;

&lt;p&gt;Or, &lt;strong&gt;an object refers to a schema&lt;/strong&gt;. OpenAPI specification allows an API to refer to a schema as an object or part of an object.&lt;/p&gt;

&lt;p&gt;Luckily, now we can quickly mock all these complex JSON in two minutes in &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock-complex-JSON" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Mock it
&lt;/h2&gt;

&lt;p&gt;There are three steps to mock the API.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Import API definitions.&lt;/li&gt;
&lt;li&gt;Set specific fields.&lt;/li&gt;
&lt;li&gt;Get the mock URL.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So easy. Let's mock it!&lt;/p&gt;

&lt;p&gt;Step 1 is the same as &lt;a href="https://dev.to/ismailkamil/how-to-mock-an-api-in-one-minute-eip/"&gt;&lt;em&gt;How to Mock an API in ONE minute&lt;/em&gt;&lt;/a&gt;. You just need an OpenAPI JSON or YAML and import it into Apidog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuesrzqxj4i6lkpbnky2i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuesrzqxj4i6lkpbnky2i.png" alt="Imported API definitions" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2. Set specific fields.
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Enum values
&lt;/h4&gt;

&lt;p&gt;In this sample API, the 'status' field has three optional values: available, pending, and sold. So I hope this field in my mocking data has only one of these values too.&lt;/p&gt;

&lt;p&gt;Click 'More' in the 'status' field. You'll see an 'Enum' switch. Turn it on, and you'll be able to add enum values. After that, data of this field will be mocked according to the settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F87k93n83vhgsxz7w27ic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F87k93n83vhgsxz7w27ic.png" alt="Field: More" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Arrays with fixed length
&lt;/h4&gt;

&lt;p&gt;PhotoUrls is an array field. I need it to have a fixed five items.&lt;/p&gt;

&lt;p&gt;Click 'More' in the 'PhotoUrls' field. You'll see an 'Element Limit' setting. Set the minItems 5 and maxItems 5.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3eh5eflzkffh88h88fff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3eh5eflzkffh88h88fff.png" alt="Field: More" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Object refers to a schema
&lt;/h4&gt;

&lt;p&gt;Apidog support schemas in OpenAPI specification. So you just need to select a Schema for an object, and Apidog will mock the object according to the schema.&lt;/p&gt;

&lt;p&gt;For example, the 'Category' field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo940nu7bzdsi5xw06z9b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo940nu7bzdsi5xw06z9b.png" alt="Select schema" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3. Get the mock URL.
&lt;/h3&gt;

&lt;p&gt;Click ‘Save', and switch to the 'API' tab. Copy the URL in the "Local Mock" part which starts with "127.0.0.1".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm264bceauolzvpgnnxoc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm264bceauolzvpgnnxoc.png" alt="Copy the URL" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste the URL into the browser. &lt;/p&gt;

&lt;p&gt;That's it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm4cuzlipq9cadzm999mk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm4cuzlipq9cadzm999mk.png" alt="Mocking JSON" width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice these fields: &lt;strong&gt;photoURLs&lt;/strong&gt; with fixed item quantity(5), while URLs are mocked automatically with available image URLs; &lt;strong&gt;status&lt;/strong&gt; with enum values(sold, pending, or available), and &lt;strong&gt;category&lt;/strong&gt; refers to a schema. The other fields, like city and createdAt are mocked automatically. &lt;/p&gt;

&lt;p&gt;And if you reload the URL, the mock data refreshes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fus87k11vc910efdrghsy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fus87k11vc910efdrghsy.png" alt="Mocking JSON" width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  JSON Schema
&lt;/h2&gt;

&lt;p&gt;OpenAPI 3.0 data types are based on JSON Schema, which describes the data structure of APIs.&lt;/p&gt;

&lt;p&gt;Apidog is compatible with OpenAPI. Length range, format, and pattern(regular expression) of strings, min and max value of integers, readonly/writeonly; all attributes in JSON Schema are supported.&lt;/p&gt;

&lt;p&gt;Not only JSON but XML is also supported to mock. You can even set the tag names and prefixes of XML data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzchhpkhrurxp6ul3z0fi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzchhpkhrurxp6ul3z0fi.png" alt="Mocking XML" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based on JSON Schema, any complex mock data can be generated easily with a few mouse clicks. Still, you don't need to write any scripts.&lt;/p&gt;

&lt;p&gt;Just enjoy it.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock-complex-JSON" rel="noopener noreferrer"&gt;Download Apidog here&lt;/a&gt;, and wait for my next post to see more powerful mock features.&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
    <item>
      <title>How to Mock an API in ONE minute</title>
      <dc:creator>Ismail Kamil</dc:creator>
      <pubDate>Fri, 18 Nov 2022 06:45:23 +0000</pubDate>
      <link>https://dev.to/ismailkamil/how-to-mock-an-api-in-one-minute-eip</link>
      <guid>https://dev.to/ismailkamil/how-to-mock-an-api-in-one-minute-eip</guid>
      <description>&lt;p&gt;Front-end developers usually meet this problem. The API is designed, but it's not been implemented yet. I need to make some fake data for my interface, which means I have to set up a mock server and add some response examples. If there are no response examples in the API documentation, I must make up some response data myself.&lt;/p&gt;

&lt;p&gt;Each time I do this, I think it's not what a front-end developer should do. &lt;/p&gt;

&lt;p&gt;There should be a better way to accomplish this.&lt;/p&gt;

&lt;p&gt;I tried many tools. I used postman as a mock server, but all response data must be added manually. I tried faker.js, but I have to write mocking code for every field.&lt;/p&gt;

&lt;p&gt;In my expectation, an excellent mocking server should generate data itself. Developers should pay attention to real essential things.&lt;/p&gt;

&lt;p&gt;Great news: Now, you can &lt;strong&gt;mock an API in only one minute&lt;/strong&gt;. And you don't need to write any scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why mocking
&lt;/h2&gt;

&lt;p&gt;Mocking is a good choice if you're on one of the following occasions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The API is designed but not developed. This usually happens in agile teams.&lt;/li&gt;
&lt;li&gt;Restricted or paid APIs. For example, bank APIs. You cannot get real data before development completes. So you need mock data.&lt;/li&gt;
&lt;li&gt;Offline environment or intranet. Mock data allows you to work on a local machine.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Let‘s Mock it
&lt;/h2&gt;

&lt;p&gt;There are two steps to mock the API.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Import API definitions.&lt;/li&gt;
&lt;li&gt;Get the mock URL.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So easy. Let's mock it!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 - Import API definitions
&lt;/h3&gt;

&lt;p&gt;API documentation is necessary. OpenAPI (Swagger) is best, and any other format is OK, too.&lt;/p&gt;

&lt;p&gt;Assume you have a YAML or JSON file. We’ll import it into this tool: &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock-API-in-one-minute" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt;. If you don’t have an API yet, you can also create it in Apidog.&lt;/p&gt;

&lt;p&gt;1.Create a new project in &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock-API-in-one-minute" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgfoi8b131h0s1q1kbre.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgfoi8b131h0s1q1kbre.png" alt="Create project" width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
2.Go to "Settings"-"Import", and drag your API file in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8y7u7fwmqkzswb5hvkj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8y7u7fwmqkzswb5hvkj9.png" alt="Import API" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More than ten formats of API documentation are supported. Click "Next" and your API will be imported.&lt;/p&gt;

&lt;p&gt;Now you'll see the APIs in Apidog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyjogm1znufwm7mfi2g5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyjogm1znufwm7mfi2g5.png" alt="API imported" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 - Get the mock URL
&lt;/h3&gt;

&lt;p&gt;1.Click an API in Apidog. You'll see an API definition page, in which there is a Section named "Mock".&lt;/p&gt;

&lt;p&gt;2.Click the URL in the "Local Mock" part which starts with "127.0.0.1" to copy it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rx4var72tt2blzt5v2m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rx4var72tt2blzt5v2m.png" alt="Mock URL" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.Paste it into your browser.&lt;/p&gt;

&lt;p&gt;OK, it's done! You'll see a mocking JSON!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3q73y9xvb561qh5wnct.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3q73y9xvb561qh5wnct.png" alt="Mocking JSON" width="800" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A "city" field is filled by a city name, an "id" field is filled by an integer, and "createdAt" is filled by a date-time.&lt;/p&gt;

&lt;p&gt;Now you can use the API data in your App.&lt;/p&gt;

&lt;p&gt;And you don't need to write any scripts! Data in all fields are generated automatically.&lt;/p&gt;

&lt;p&gt;Moreover, if you click "reload" in the browser, the data will refresh!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmnhbodysym7qyry5arpl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmnhbodysym7qyry5arpl.png" alt="Mocking JSON" width="800" height="731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazing. &lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;The first time I found this feature, I was quite surprised. Why can Apidog generate this? I didn't set anything!&lt;/p&gt;

&lt;p&gt;Later I found this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh22geh3o76scyl5wm23i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh22geh3o76scyl5wm23i.png" alt="Mocking rules" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a batch of built-in mocking rules in Apidog, as above. If your field name in the response definition matches one of them, the field data will be mocked automatically.&lt;/p&gt;

&lt;p&gt;And Apidog starts a mock server in your local machine automatically. So you don't need to do anything in the server layer.&lt;/p&gt;

&lt;p&gt;What if you don't like the data it mocks automatically? That's also easy.&lt;/p&gt;

&lt;p&gt;You can directly fill the mock value of the field with Faker.js like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0buwc572v4vaxlskpgb2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0buwc572v4vaxlskpgb2.png" alt="Faker.js" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All Faker.js grammar is supported so that you can select them easily.&lt;/p&gt;

&lt;p&gt;And if some field has a fixed value, you can also fill the "mock" with the specified value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi0gu9nemvxme8bpg42mk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi0gu9nemvxme8bpg42mk.png" alt="Fixed value" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alright, all done.&lt;/p&gt;

&lt;p&gt;I hope you mock happily with &lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock-API-in-one-minute" rel="noopener noreferrer"&gt;Apidog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's really a good tool. And I found it's not only good for mocking but for everything in API development.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.apidog.com/?utm_source=dev_to&amp;amp;utm_medium=IsmailKamil&amp;amp;utm_content=Mock-API-in-one-minute" rel="noopener noreferrer"&gt;Download Apidog here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
