BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Dev Proxy v0.14: OpenAPI Spec Generation, CRUD API Simulation and Many More

Microsoft Dev Proxy v0.14: OpenAPI Spec Generation, CRUD API Simulation and Many More

Bookmarks

Last week Microsoft announced Dev Proxy v0.14.0, introducing several notable features. Among the key additions are the ability to combine rate limiting with mock responses, simplified OpenAPI spec generation, CRUD API simulation, improved macOS setup, easy access to Dev Proxy presets, enhanced mock structures, the introduction of JSON schemas, updated documentation, and various performance and stability improvements.

For readers who are not familiar with it, Dev Proxy, formerly known as Microsoft 365 Developer Proxy, is a command-line tool that simulates real-world behaviours of APIs for testing apps. With Dev Proxy, developers can build resilient apps that gracefully handle errors and rate limits.

In the 0.14 version, Dev Proxy allows developers to configure the combination of rate limiting with mock responses. As explained, this feature enables the testing of how applications handle rate limiting without generating unnecessary API calls, providing a valuable tool for verifying the functionality of rate-limiting code.

The release also includes a process for generating OpenAPI specs for APIs. Instead of manually creating OpenAPI specs, developers can now rely on Dev Proxy to generate them based on intercepted requests. As documented, by initiating the app and allowing it to call the API, Dev Proxy automatically generates OpenAPI specs.

(Dev Proxy generating an OpenAPI spec from the requests it intercepted, Source: Microsoft 365 Dev Blog)

Furthermore, a notable addition is the capability to simulate CRUD APIs for development purposes. This feature can be useful for developers when backend APIs are either unavailable or experiencing updates. Dev Proxy allows developers to simulate CRUD APIs, eliminating the need to create mock APIs that would later be replaced with actual ones.

Regarding the macOS developers, the setup process has been simplified to provide a more user-friendly experience. As reported, this simplified setup minimizes manual steps and automatically registers the proxy as a system-wide proxy upon initiation, mirroring the experience on Windows. Additionally, Dev Proxy prompts developers to trust its certificate during the initial setup, reducing manual steps.

Also, a new command, devproxy preset get, has been introduced. This command allows developers to easily download and unzip Dev Proxy presets using the preset ID found on the preset's page in the sample gallery. This feature simplifies the utilization of presets, which are regularly published in the samples gallery and configures the proxy for specific use cases.

The structure of mocks in Dev Proxy has been improved, introducing a request and response object and a collection of header objects. This modification ensures consistency in representing mock requests and supports the specification of multiple response headers with the same name.

(Improved Dev Proxy mock structure, Source: Microsoft 365 Dev Blog)

In addition to these features, the release includes the introduction of JSON schema files for Dev Proxy configuration and its plugins. These schema files assist developers in correctly setting up configuration files by providing a standardised format. The schemas will be versioned using SemVer, allowing developers to easily identify any breaking changes.

As reported, beyond the feature additions, this release incorporates various performance enhancements, stability improvements, and behind-the-scenes optimizations. For a comprehensive list of changes in this version, developers are encouraged to refer to the official release notes.

Lastly, the team announced that new and improved documentation is ready for developers to explore; as stated, it includes reference content from GitHub Wiki and is extended with additional conceptual docs.

About the Author

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT