{"id":23729,"date":"2025-01-29T23:52:00","date_gmt":"2025-01-30T07:52:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=23729"},"modified":"2025-02-18T04:44:24","modified_gmt":"2025-02-18T12:44:24","slug":"dev-proxy-v0-24-with-improved-generating-openapi-specs","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/dev-proxy-v0-24-with-improved-generating-openapi-specs\/","title":{"rendered":"Dev Proxy v0.24 with improved generating OpenAPI specs"},"content":{"rendered":"<p>We\u2019re thrilled to announce the release of Dev Proxy v0.24. If you\u2019re looking to simulate APIs and test your applications under real-world conditions, you should try Dev Proxy!<\/p>\n<p>In this version:<\/p>\n<ul>\n<li>Generate OpenAPI specs in JSON and YAML<\/li>\n<li>Generate OpenAPI specs for use with Microsoft Power Platform<\/li>\n<li>Easily find URLs to watch<\/li>\n<li>View timestamps for intercepted requests<\/li>\n<li>Use Dev Proxy in scripts<\/li>\n<li>&#8230;and more!<\/li>\n<\/ul>\n<h2>Generate OpenAPI specs in JSON and YAML<\/h2>\n<p>Developers often have strong preferences when it comes to file formats. While some prefer generating OpenAPI specs in JSON, others use YAML.<\/p>\n<p>In this version, we introduce support for allowing you to choose in which format you\u2019d like to generate OpenAPI specs. You can control the format using the <strong>specFormat<\/strong> option in the OpenApiSpecGeneratorPlugin configuration.<\/p>\n<p style=\"text-align: center;\"><iframe src=\"\/\/www.youtube.com\/embed\/qKiR_AS8LlE?si=3d6IZlzWLgNjwSmn\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>This new configuration option gives you more flexibility for generating OpenAPI specs and getting them in the format you and your team prefer.<\/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<\/a> using Dev Proxy.<\/p>\n<h2>Generate OpenAPI specs for use with Microsoft Power Platform<\/h2>\n<p>OpenAPI specifications are a cornerstone for creating custom connectors in the Power Platform. Right now, Power Platform supports OpenAPI specs v2. However, until now, Dev Proxy\u2019s OpenApiSpecGeneratorPlugin only supported OpenAPI v3.<\/p>\n<p>In this version, we introduce support for allowing you to choose if you want to generate a v2 or a v3 OpenAPI spec when using the OpenApiSpecGeneratorPlugin. You can control the version using the new <strong>specVersion<\/strong> property in the plugin\u2019s configuration.<\/p>\n<p>This new option allows you to quickly generate OpenAPI specs compatible with Power Platform so that you can rapidly build solutions on Power Automate, Power Apps, and of course using Copilot Studio!<\/p>\n<h2>Easily find URLs to watch<\/h2>\n<p>Dev Proxy allows you to simulate behaviors for APIs. To do that, you need to know which URLs your app is calling and configure Dev Proxy to intercept them.<\/p>\n<p>To help you find out which URLs your app is calling, we\u2019re introducing a new configuration preset. Using this preset, you quickly get a list of all unique URLs that your app is calling, which you can then add to your Dev Proxy configuration file.<\/p>\n<p>To use the new preset, specify it when starting Dev Proxy. For example, to discover URLs for a client-side app running in Microsoft Edge run:<\/p>\n<p><code>devproxy --config-file \"~appFolder\/presets\/urls-to-watch.json\" --watch-process-names msedge<\/code><\/p>\n<p>Dev Proxy tracks all unique URLs and gives you a list that you can easily copy to your Dev Proxy config file.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-23731\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-1.png\" alt=\"Dev Proxy being used to discover URLs to watch\" width=\"2870\" height=\"1814\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-1.png 2870w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-1-300x190.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-1-1024x647.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-1-768x485.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-1-1536x971.png 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-1-2048x1294.png 2048w\" sizes=\"(max-width: 2870px) 100vw, 2870px\" \/><em>Now you can use Dev Proxy to discover URLs to watch<\/em><\/p>\n<p><strong>Tip: <\/strong>To ensure that Dev Proxy only intercepts URLs from your app, we recommend that you only watch for requests from a specific process, specifying it either by name or ID.<\/p>\n<p>We believe that this new preset will save you from figuring out which URLs to configure with Dev Proxy either manually or by using other apps. Now, you can use Dev Proxy itself to find out which URLs your app is calling!<\/p>\n<p>Learn more about <a href=\"https:\/\/learn.microsoft.com\/microsoft-cloud\/dev\/dev-proxy\/how-to\/discover-urls-watch\">discovering which URLs to watch<\/a>.<\/p>\n<h2>View timestamps for intercepted requests<\/h2>\n<p>In the past, when you used Dev Proxy with an application that issues many API requests, you might\u2019ve found it hard to relate Dev Proxy output to your application\u2019s activity. Following the feedback from our customers, in this version we release printing the timestamp of each intercepted request using a new <strong>time <\/strong>message.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"alignnone wp-image-23732\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-2.png\" alt=\"Dev Proxy shows the timestamp of the intercepted request making it easier to correlate it with the application activity\" width=\"2280\" height=\"1610\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-2.png 2280w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-2-300x212.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-2-1024x723.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-2-768x542.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-2-1536x1085.png 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2025\/01\/word-image-23729-2-2048x1446.png 2048w\" sizes=\"(max-width: 2280px) 100vw, 2280px\" \/><em>Dev Proxy shows the timestamp of the intercepted request making it easier to correlate it with the application activity<\/em><\/p>\n<p>We believe that this feature will help you associate requests from your application with Dev Proxy\u2019s output. Also, if you use Dev Proxy for longer time, you no longer need to restart it and can more easily see which messages relate to your latest activity.<\/p>\n<p>Try it and tell us what you think!<\/p>\n<h2>Use Dev Proxy in scripts<\/h2>\n<p>Previously, starting Dev Proxy via an npm script could throw an exception, derailing your workflow. You\u2019d see errors like this:<\/p>\n<p><code>&gt; <a href=\"mailto:demo-randomerror-js@1.0.0\">demo-randomerror-js@1.0.0<\/a> start <\/code>\n<code>&gt; npx concurrently \"npx http-server -p 3000 -s\" \"devproxy -c randomerror.devproxyrc.json\"<\/code><\/p>\n<p><code>[1] fail: Hosting failed to start <\/code>\n<code>[1] System.InvalidOperationException: Cannot see if a key has been pressed...<\/code><\/p>\n<p>The bug was caused by Dev Proxy monitoring key presses even when you\u2019d start it in a non-interactive way, like a background process. In this release we\u2019ve fixed this issue, and you should be able to use Dev Proxy in both interactive and non-interactive way.<\/p>\n<h2>New version of Dev Proxy Toolkit<\/h2>\n<p>Dev Proxy Toolkit is a Visual Studio Code extension that makes it easy to create and update configuration files. Alongside the new release of Dev Proxy, we\u2019ve also released a new version of the toolkit, v0.16.0.<\/p>\n<p>In this version, we\u2019ve updated all code snippets to use the latest schema and reflect the changes in v0.24.0 release.<\/p>\n<p>Checkout the <a href=\"https:\/\/marketplace.visualstudio.com\/items\/garrytrinder.dev-proxy-toolkit\/changelog\">changelog<\/a> for more information on changes and bug fixes.<\/p>\n<h2>There\u2019s more<\/h2>\n<p>This release also includes several bug fixes and improvements. Check out the <a href=\"https:\/\/github.com\/microsoft\/dev-proxy\/releases\/tag\/v0.24.0\">release notes<\/a> for the complete list of changes in this version.<\/p>\n<h2>Try it now<\/h2>\n<p><a href=\"https:\/\/learn.microsoft.com\/microsoft-cloud\/dev\/dev-proxy\/get-started\/set-up#install-dev-proxy\">Download Dev Proxy v0.24<\/a> today and build better apps connected to APIs!<\/p>\n<p>Have any questions, feedback, or suggestions? Join us on <a href=\"https:\/\/aka.ms\/devproxy\/discord\">Discord<\/a>. We can\u2019t wait to see what you create with Dev Proxy!<\/p>\n<p><em>Follow us on <\/em><a href=\"http:\/\/twitter.com\/microsoft365dev\"><em>X (Twitter) \/ @Microsoft365Dev<\/em><\/a><em>, <a href=\"https:\/\/www.linkedin.com\/showcase\/microsoft365dev\">LinkedIn<\/a>, and subscribe to our <\/em><a href=\"https:\/\/www.youtube.com\/microsoft365developer\"><em>YouTube channel<\/em><\/a><em> to stay up to date on the latest developer news and announcements.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Try the latest version of Dev Proxy to simulate APIs and test your applications under real-world conditions<\/p>\n","protected":false},"author":74222,"featured_media":23737,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[289,384,300,391,44],"class_list":["post-23729","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365-developer","tag-dev-proxy","tag-dev-proxy-toolkit","tag-openapi","tag-power-platform","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>Try the latest version of Dev Proxy to simulate APIs and test your applications under real-world conditions<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/23729","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=23729"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/23729\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/23737"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=23729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=23729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=23729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}