# Repository: swagger-api/swagger-editor # Stars: 9430 ## CLAUDE.md # CLAUDE.md - SwaggerEditor Codebase Guide for AI Assistants **Version:** 5.0.6 | **Last Updated:** 2026-02-27 --- ## Project Overview SwaggerEditor is a browser-based editor for API specifications supporting **OpenAPI 2.0/3.0/3.1**, **AsyncAPI 2.x**, **API Design Systems**, and **JSON Schema**. Built as a React app on SwaggerUI's plugin architecture with a split-pane Monaco Editor interface. **Core Technologies:** React 17+/18, SwaggerUI React, TypeScript (gradual), Immutable.js, Monaco Editor, ApiDOM, Webpack 5, Jest + Playwright **Philosophy:** Plugin-based architecture, minimal over-engineering, heavy E2E testing, gradual TypeScript adoption, app/ESM/UMD build artifacts. --- ## Codebase Structure ``` swagger-editor/ ├── config/ # Webpack configs (dev, prod, bundle), Jest transforms ├── docs/ # architecture.md, customization guides, migration guides ├── public/ # Static assets, HTML template ├── scripts/ # Build scripts (start, build, test) ├── src/ │ ├── App.tsx # Main app component & plugin composition │ ├── index.tsx # Browser entry point │ ├── plugins/ # 26 plugins (see Architecture section) │ ├── presets/ │ │ ├── monaco/ # Full-featured preset (default) │ │ └── textarea/ # Lightweight fallback │ ├── styles/ # Global SCSS (index.scss) │ └── types/ # TypeScript declarations (*.d.ts) ├── test/ │ ├── playwright/ │ │ ├── e2e/ # Test specs (*.spec.ts) │ │ ├── fixtures/ # Test data │ │ ├── helpers/ # Helper functions │ │ └── tsconfig.json │ └── setupTests.js # Jest setup (jest-dom, canvas-mock) ├── build/ # Standalone app (generated) └── dist/esm|umd|types/ # Library bundles (generated) ``` --- ## Architecture & Design Patterns ### Plugin Categories (26 total) **Editor implementations:** - `editor-textarea` — HTML `