swagger-editor
Swagger Editor
Swagger Editor is a browser-based tool for writing and editing API specifications. An API specification is a structured document that describes how a web service works: what endpoints it has, what data it expects, and what it returns. The format this editor targets is OpenAPI, which was previously called Swagger and is now one of the most widely used standards for describing REST APIs.
The editor provides a text editing area where you write the specification in YAML or JSON format, alongside a live preview that shows how the API would look to a developer browsing its documentation. This combination of writing and previewing in one place is the core purpose of the tool. The editor is built on top of Monaco, the same text editor that powers Visual Studio Code, so it includes features like syntax highlighting, code completion, and error checking as you type.
Version 5 of the editor, which this repository covers, supports OpenAPI 3.0, 3.1, and also AsyncAPI 2.x, which is a separate specification standard used for event-driven or message-based APIs rather than traditional request-response ones.
The package can be installed via npm and embedded into a web application as a React component. The README includes detailed setup instructions for webpack, including notes about memory requirements during the build process since the package is large enough to sometimes hit Node.js default memory limits. A Docker image is also available for those who want to run the editor without setting up a local JavaScript build environment.
The package collects anonymized installation analytics through a service called Scarf. The README explains how to disable this if preferred, either by setting a flag in package.json or by using an environment variable. The full README is longer than what was shown.