Demo: Generate an OpenAPI spec for an API called from a JavaScript app
This sample contains a demo web application connected to a placeholder API. Using Dev Proxy, you can record the API calls made by the sample app and generate an OpenAPI spec for them.
Demo: Generate an OpenAPI spec for an API called from a JavaScript app
Summary
This sample contains a demo web application connected to a placeholder API. Using Dev Proxy, you can record the API calls made by the sample app and generate an OpenAPI spec for them.

Compatibility
Contributors
Version history
| Version | Date | Comments |
|---|---|---|
| 1.5 | February 4, 2026 | Updated to Dev Proxy v2.1.0 |
| 1.4 | January 18, 2026 | Moved config files to .devproxy folder |
| 1.3 | January 5, 2026 | Updated to Dev Proxy v2.0.0 |
| 1.2 | June 27, 2025 | Updated to Dev Proxy v0.29.2 |
| 1.1 | January 25, 2024 | Updated schema version |
| 1.0 | January 24, 2024 | Initial release |
Prerequisites
Minimal path to awesome
- Get the preset using Dev Proxy by running
devproxy config get demo-openapispec-js - Navigate to the Dev Proxy installation folder, and open the
config/demo-openapispec-jsfolder - Start the sample app and Dev Proxy by running
npm start - After Dev Proxy starts, press
rto start recording - In a web browser, navigate to
http://localhost:3000and interact with the sample app to generate some activity - When you’re ready, go back to the terminal where Dev Proxy is running and press
sto stop recording - Dev Proxy will generate an OpenAPI spec for the API calls made by the sample app and save it to a file
Help
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
You can try looking at issues related to this sample to see if anybody else is having the same issues.
If you encounter any issues using this sample, create a new issue.
Finally, if you have an idea for improvement, make a suggestion.
Disclaimer
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.