{"id":17765,"date":"2024-01-18T00:05:58","date_gmt":"2024-01-18T08:05:58","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=17765"},"modified":"2024-01-22T00:07:01","modified_gmt":"2024-01-22T08:07:01","slug":"dev-proxy-v0-14-with-generating-openapi-specs-and-simulating-crud-apis","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/dev-proxy-v0-14-with-generating-openapi-specs-and-simulating-crud-apis\/","title":{"rendered":"Dev Proxy v0.14 with generating OpenAPI specs and simulating CRUD APIs"},"content":{"rendered":"<p>Spend more time on building your app and less on plumbing. Make your apps more robust. We&#8217;re thrilled to announce the release of Dev Proxy v0.14.0, with exciting features that take building apps connected to APIs to the next level.<\/p>\n<p>In this version:<\/p>\n<ul>\n<li>Combine rate limiting with mocks<\/li>\n<li>Easily generate OpenAPI spec for your API<\/li>\n<li>Simulate CRUD APIs for development<\/li>\n<li>Simplified setup for macOS<\/li>\n<li>Easily get Dev Proxy presets<\/li>\n<li>Improved mocks<\/li>\n<li>Introduced JSON schemas<\/li>\n<li>New Dev Proxy docs<\/li>\n<li>&#8230;and more!<\/li>\n<\/ul>\n<h2>Combine rate limiting with mocks<\/h2>\n<p>Starting from this version, you can configure Dev Proxy to combine rate limiting with mock responses. This means, that when testing how your app handles rate limiting, you won\u2019t be calling your API and incurring unnecessary load. This combination is invaluable to verify if your rate limiting code is working as expected.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/01.png\"><img decoding=\"async\" class=\"alignnone wp-image-17771 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/01.png\" alt=\"Dev Proxy simulating rate limiting using mock API responses\" width=\"1823\" height=\"1206\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/01.png 1823w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/01-300x198.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/01-1024x677.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/01-768x508.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/01-1536x1016.png 1536w\" sizes=\"(max-width: 1823px) 100vw, 1823px\" \/><\/a><\/p>\n<p><em>Dev Proxy simulating rate limiting using mock API responses<\/em><\/p>\n<p>Learn more about <a href=\"https:\/\/learn.microsoft.com\/microsoft-cloud\/dev\/dev-proxy\/concepts\/what-is-rate-limiting\">rate limiting<\/a>.<\/p>\n<h2>Easily generate OpenAPI spec for your API<\/h2>\n<p>OpenAPI specs allow you to benefit from the latest investments in the API space. You can for example generate an API client or even easily build an AI plugin. But what if you don\u2019t have an OpenAPI spec? Do you need to create it manually yourself?<\/p>\n<p>Dev Proxy now allows you to generate an OpenAPI spec based on the requests intercepted by the proxy. All you need to do is to start your app, have it call your API, and Dev Proxy will generate an OpenAPI spec for you from the requests it intercepted!<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-17766\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-2.png\" alt=\"Dev Proxy generating an OpenAPI spec from the requests it intercepted\" width=\"2500\" height=\"1165\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-2.png 2500w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-2-300x140.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-2-1024x477.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-2-768x358.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-2-1536x715.png 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-2-2048x954.png 2048w\" sizes=\"(max-width: 2500px) 100vw, 2500px\" \/>\n<em>Dev Proxy generating an OpenAPI spec from the requests it intercepted<\/em><\/p>\n<p>Learn more about <a href=\"https:\/\/learn.microsoft.com\/microsoft-cloud\/dev\/dev-proxy\/how-to\/generate-openapi-spec\">generating OpenAPI specs using Dev Proxy<\/a>.<\/p>\n<h2>Simulate CRUD APIs for development<\/h2>\n<p>When building apps, you often interact with backend APIs. Sometimes, these APIs aren&#8217;t yet available, or other teams are updating them to meet the latest requirements. To avoid waiting, you typically create a mock API that returns the data you need. While this approach unblocks you, it requires you to spend time on building an API that you eventually replace with the real one. To avoid wasting time, you can now use Dev Proxy to simulate a CRUD API and speed up development. All you need is a data set that you want to expose as an API and let Dev Proxy do the rest!<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-17767\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-3.png\" alt=\"Dev Proxy simulating a CRUD API for development\" width=\"2161\" height=\"1377\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-3.png 2161w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-3-300x191.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-3-1024x652.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-3-768x489.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-3-1536x979.png 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-3-2048x1305.png 2048w\" sizes=\"(max-width: 2161px) 100vw, 2161px\" \/>\n<em>Dev Proxy simulating a CRUD API for development<\/em><\/p>\n<p>Learn more about <a href=\"https:\/\/learn.microsoft.com\/microsoft-cloud\/dev\/dev-proxy\/how-to\/simulate-crud-api\">simulating CRUD APIs with Dev Proxy<\/a>.<\/p>\n<h2>Simplified setup for macOS<\/h2>\n<p>Enabling the proxy on macOS just got simpler! We&#8217;ve streamlined the setup process to minimize manual steps and make it as effortless as possible. Now, starting the proxy on macOS automatically registers it as a system-wide proxy, giving you a seamless experience just like on Windows. Additionally, when you start Dev Proxy for the first time, it prompts you to trust its certificate eliminating cumbersome manual steps!<\/p>\n<h2>Easily get Dev Proxy presets<\/h2>\n<p>We regularly publish Dev Proxy presets which configure proxy for specific use cases. You can find them in the <a href=\"https:\/\/aka.ms\/devproxy\/samples\">samples gallery<\/a>.<\/p>\n<p>To make it easier for you to use these presets, you can now use the <strong>devproxy preset get<\/strong> command, to download and unzip the preset. All you need is the preset ID which you find on the preset\u2019s page in the sample gallery.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/02.png\"><img decoding=\"async\" class=\"aligncenter wp-image-17772 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/02.png\" alt=\"Easily downloading Dev Proxy presets from the sample gallery\" width=\"1910\" height=\"1207\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/02.png 1910w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/02-300x190.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/02-1024x647.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/02-768x485.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/02-1536x971.png 1536w\" sizes=\"(max-width: 1910px) 100vw, 1910px\" \/><\/a><em>Easily downloading Dev Proxy presets from the sample gallery<\/em><\/p>\n<p>We hope that you find presets helpful and if you\u2019ve got your own presets that you\u2019d like to share with others, <a href=\"https:\/\/github.com\/pnp\/proxy-samples\/blob\/main\/CONTRIBUTING.md\">submit them to the gallery<\/a>!<\/p>\n<h2>Improved mocks<\/h2>\n<p>We\u2019ve slightly changed the shape of mocks that we use in Dev Proxy. As we extend Dev Proxy with new features, we realized that we haven\u2019t been consistent in how we represent a mock request. What\u2019s more, we found out that our structure didn\u2019t properly support specifying multiple response headers with the same name.<\/p>\n<p>The new structure defines a request and response object and a collection of header objects.<\/p>\n<p><img decoding=\"async\" width=\"1220\" height=\"892\" class=\"wp-image-17768\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-5.png\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-5.png 1220w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-5-300x219.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-5-1024x749.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/word-image-17765-5-768x562.png 768w\" sizes=\"(max-width: 1220px) 100vw, 1220px\" \/><em>New Dev Proxy mock structure<\/em><\/p>\n<p>We\u2019ve already updated all samples in the sample gallery to reflect this new structure. If you have your own mocks, you can convert them to the new format using a <a href=\"https:\/\/github.com\/waldekmastykarz\/convert-devproxy-mocks\">script<\/a>.<\/p>\n<h2>Introduced JSON schemas<\/h2>\n<p>Dev Proxy and its plugins use JSON files to define their configuration. To help you ensure that you\u2019ve correctly set up these configuration files, we introduce JSON schema files for <a href=\"https:\/\/github.com\/microsoft\/dev-proxy\/blob\/4e1ac75ef9695d23f8bd85c645c526989da4c348\/schemas\/v1.0\/rc.schema.json\">Dev Proxy configuration<\/a>, and <a href=\"https:\/\/github.com\/microsoft\/dev-proxy\/tree\/4e1ac75ef9695d23f8bd85c645c526989da4c348\/schemas\/v1.0\">its plugins<\/a>. We\u2019ll be versioning these schemas using SemVer so that you can easily tell when they introduce breaking changes.<\/p>\n<h2>New Dev Proxy docs<\/h2>\n<p>Recently, we\u2019ve published <a href=\"https:\/\/learn.microsoft.com\/microsoft-cloud\/dev\/dev-proxy\/overview\">our new docs on Microsoft Learn<\/a>. We\u2019ve included the reference content we had on our GitHub Wiki and extended it with additional conceptual docs, all to help you build more robust apps and get more out of Dev Proxy. Check them out and let us know how we can make them better.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/04.png\"><img decoding=\"async\" class=\"wp-image-17774 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/04.png\" alt=\"New Dev Proxy docs on Microsoft Learn\" width=\"1472\" height=\"1232\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/04.png 1472w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/04-300x251.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/04-1024x857.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2024\/01\/04-768x643.png 768w\" sizes=\"(max-width: 1472px) 100vw, 1472px\" \/><\/a><\/p>\n<p><em>New Dev Proxy docs on Microsoft Learn<\/em><\/p>\n<h2>There\u2019s more<\/h2>\n<p>That&#8217;s not all! This release also includes various performance enhancements, stability improvements, and behind-the-scenes optimizations, ensuring that your experience with the Dev Proxy is smoother and more enjoyable than ever before. Check out the <a href=\"https:\/\/github.com\/microsoft\/dev-proxy\/releases\/tag\/v0.14.0\">release notes<\/a> for the complete list of changes in this version.<\/p>\n<h2>Try it now<\/h2>\n<p>Download <a href=\"https:\/\/aka.ms\/devproxy\/download\">Dev Proxy v0.14<\/a> today and build better apps connected to APIs!<\/p>\n<p>Thanks to <a href=\"https:\/\/github.com\/svrooij\">Stephan van Rooij<\/a> and <a href=\"https:\/\/github.com\/mosoftwareenterprises\">Mark Oliver<\/a> for contributing to this release.<\/p>\n<p>Have any questions, feedback, or suggestions? Join us on <a href=\"https:\/\/aka.ms\/devproxy\/discord\">Discord<\/a>. We can&#8217;t wait to see what you create with Dev Proxy!<\/p>\n<p>Follow us on <a href=\"http:\/\/twitter.com\/microsoft365dev\">X (Twitter) \/ @Microsoft365Dev<\/a> and subscribe to our <a href=\"https:\/\/www.youtube.com\/microsoft365developer\">YouTube channel<\/a> to stay up to date on the latest developer news and announcements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Make your apps more robust with the latest Dev Proxy release, packed with features that take building apps connected to APIs to the next level.<\/p>\n","protected":false},"author":74222,"featured_media":17770,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3],"tags":[299,289,300],"class_list":["post-17765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365-developer","category-microsoft-graph","tag-crud-apis","tag-dev-proxy","tag-openapi"],"acf":[],"blog_post_summary":"<p>Make your apps more robust with the latest Dev Proxy release, packed with features that take building apps connected to APIs to the next level.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/17765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/74222"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=17765"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/17765\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/17770"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=17765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=17765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=17765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}