All samples

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.

Waldek Mastykarz

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.

OpenAPI spec generated by Dev Proxy opened in Visual Studio Code

Compatibility

Dev Proxy v2.1.0

Contributors

Version history

VersionDateComments
1.5February 4, 2026Updated to Dev Proxy v2.1.0
1.4January 18, 2026Moved config files to .devproxy folder
1.3January 5, 2026Updated to Dev Proxy v2.0.0
1.2June 27, 2025Updated to Dev Proxy v0.29.2
1.1January 25, 2024Updated schema version
1.0January 24, 2024Initial 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-js folder
  • Start the sample app and Dev Proxy by running npm start
  • After Dev Proxy starts, press r to start recording
  • In a web browser, navigate to http://localhost:3000 and 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 s to 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.