User guide

Everything the workbench does, in the order you will meet it. The same guide is available inside the app — press F1 or use the “?” button in the header.

01Overview

OASForge is a self-contained workbench for OpenAPI documents: a dark-themed Swagger UI preview paired with a YAML editor that validates, autocompletes, searches, imports, exports and mocks — entirely in your browser. Nothing you type ever leaves the page: documents are stored in your browser’s local storage, and the built-in mock server answers “Try it out” requests locally.

Three ready modes are available from the Spec selector in the header: the bundled Demo API (a full OpenAPI 3.1 feature tour), the live Swagger Petstore, and My API — the editor where you write or import your own documents. Supported input versions: Swagger 2.0 (with one-click conversion), OpenAPI 3.0, 3.1 and 3.2.

02Workspace and layout

In editor mode the window splits into the code pane and the live preview. The Editor / Split / Preview switch in the header selects the layout; the divider between the panes can be dragged to resize them, and a double-click on the divider restores the default. Both the split position and the issues-panel height persist across sessions.

ControlPurpose
Theme toggleDark or light theme; four accent palettes (Default, Nord, Dracula, Catppuccin) via the palette selector.
Full screenExpands the app to the whole display.
Edit a copyOn the Demo or Petstore views, creates an editable copy of the current spec in the editor.

03Managing documents

The editor keeps any number of named documents in local storage. The document selector in the toolbar switches between them; New starts one from the template, Rename and Delete manage the current one (Delete asks for a second click to confirm). Every keystroke is saved automatically.

Ways to bring a document in and out:

ActionBehavior
Open fileLoads a local YAML or JSON file. Postman collections are detected and converted automatically.
Load URLFetches a spec over HTTP(S). The remote server must allow cross-origin requests.
DownloadSaves the current document as openapi.yaml (Ctrl/Cmd + S).
SharePacks the document into a compressed link — no server involved; anyone opening the link gets a copy.
To JSON / To YAMLConverts the document between the two formats in place.

04Insert menu

The + Insert menu writes correct OpenAPI structure so you do not have to remember it. Insertions are indentation-aware and land in the right section, which is created when missing; generated names never collide with existing ones, and the placeholder name arrives pre-selected so typing renames it immediately.

ItemInserts
CRUD resourceA complete list/create/get/update/delete pair of paths with a shared schema and $refs.
New endpointA path with one operation (GET, POST, PUT, PATCH or DELETE) and a response skeleton.
Operation on this pathAdds a method to the path the cursor is inside.
Parameter / Request body / ResponseAdded to the operation under the cursor; duplicates are refused with a message.
Schema / Security schemeAppended under components; four scheme presets (API key, Bearer, Basic, OAuth2).
Example from schemaGenerates an example: block derived from the schema under the cursor, resolving $refs.

05Autocomplete

Completions appear as you type, or on demand with Ctrl + Space. Suggestions are contextual: operation keys inside a method block, parameter keys inside a - name: item, JSON Schema keywords inside schemas, media types under content:, quoted status codes under responses:.

Value positions complete too: in:, type:, format: and style: offer their legal values, $ref: lists every component defined in the document, and security requirements offer your declared scheme names.

06Field rules

Place the cursor on a schema property, a component schema or a parameter and a small + rule control appears at the end of the line. It lists the validation keywords that fit the declared type — minLength, maxLength, pattern and format for strings, minimum/maximum for numbers, minItems/uniqueItems for arrays, plus enum, default, example and description for any type.

required is handled semantically: for a property it is added to the parent schema’s required list (created on demand); for a parameter it sets required: true. Keywords already present are filtered out of the menu.

07Validation and quick fixes

The document is linted continuously against the OpenAPI object tables for its declared version. Findings appear in the panel between the code and the status bar; clicking one jumps to its line, which is also tinted in the editor. Errors are structural or semantic violations; warnings flag legal-but-problematic constructs. The preview keeps rendering regardless — validation informs, it never blocks.

Most findings carry a one-click Fix: quoting an unquoted version number, creating a missing security scheme, adding a missing description or responses block, removing a misplaced property, switching the document to the OpenAPI version a keyword requires, and more.

Messages are version-aware across Swagger 2.0 and OpenAPI 3.0–3.2: a 2.0 keyword in a 3.x document names its modern replacement, a 3.1-only feature in a 3.0 document offers a version bump, and constructs the specification ignores (such as a header parameter named Authorization) are explained.

Warnings can be dismissed individually with their close control; dismissals are remembered per document and the status bar keeps an honest count (for example “Valid — rendering live (2 hidden)”). A footer row restores all hidden warnings at once. Errors cannot be dismissed. The panel’s height is adjustable by dragging its top edge.

09Try it out and the mock server

Every operation’s Try it out works immediately: the default server entry is an in-browser mock, so requests are answered locally from your schemas and examples and never leave the page. The mock is stateful — POST creates records held in memory, GET lists or returns them, PUT/PATCH update, DELETE removes. Endpoints without stored data respond with examples derived from their schemas.

Request headerEffect
X-Mock-StatusForces a specific documented status code in the response.
X-Mock-DelayDelays the response by the given number of milliseconds.

Your own servers stay selectable in the Servers dropdown, including a free-text entry for any base URL such as http://localhost:3000. Real servers must allow cross-origin requests from the page.

10Importing

Postman collections (v2 / v2.1 exports) are converted to OpenAPI 3.0.3 automatically when pasted, opened as a file or fetched from a URL. The conversion covers: folders as tags, the collection base URL as a server, all authentication types (API key, Bearer, Basic, OAuth2 with the matching flow — a raw Authorization header also becomes a bearer scheme), path and query variables, JSON, form-urlencoded, multipart, GraphQL and XML bodies, and every saved response: one per status code becomes its example, several variants of the same code become named examples shown as a dropdown, and meaningful response headers are documented while transport noise is dropped. Conversion is lossy in the Postman direction (scripts and tests are not representable), so imports are saved as a new document.

Swagger 2.0 documents are recognized and render as-is; a banner under the editor offers a one-click conversion to OpenAPI 3.0 — servers from host/basePath, body and form parameters to requestBody, definitions to components, references rewritten.

11Version history

The History control keeps compressed snapshots of each document: one is recorded automatically after meaningful changes (rate-limited), and Snapshot now stores one on demand. Up to twenty snapshots are kept per document in local storage.

Each entry offers Restore — the current state is snapshotted first, so restoring is itself reversible — and Diff, a color-coded line comparison against the current text.

12Exporting

FormatNotes
YAML fileDownload (or Ctrl/Cmd + S) saves the raw document.
Postman Collection v2.1Folders per tag, URL variables for path parameters, example values and bodies derived from schemas, authentication mapped from the security schemes.
Standalone HTMLA single self-contained file with Swagger UI embedded — opens from disk with no network access; suitable for e-mailing or archiving documentation.

13Keyboard shortcuts

ShortcutAction
Ctrl/Cmd + SDownload the current document
Ctrl/Cmd + EnterRender immediately (skip the debounce)
Ctrl/Cmd + FFind in code
Ctrl + SpaceAutocomplete
Ctrl/Cmd + Z / Ctrl/Cmd + Shift + ZUndo / redo
Enter / Shift + EnterNext / previous match in the find bar
EscClose the find bar, clear the operation search, dismiss menus, close this guide
F1Open this guide

14Running it yourself

The site is fully static and self-contained — all third-party assets are vendored, so it works offline and in air-gapped networks. Any static file server can host it:

python3 -m http.server 8000
# or, with Docker:
docker compose up   # http://localhost:8080

A single-file build is also published alongside the site as standalone.html: the entire application — scripts, styles, vendored libraries and the demo spec — inlined into one file that runs from file:// with no server and no network. Download it once and keep it anywhere; it is rebuilt on every deployment, so a fresh download is always current.

The site is also an installable application: browsers that support progressive web apps offer an install control in the address bar (or “Add to Home Screen” on mobile). The installed app opens in its own window and keeps working without a network connection — a service worker caches the entire application on first visit and refreshes it in the background on later loads.

Documents, snapshots, dismissed warnings and layout preferences live in the browser’s local storage of whoever is using the page; the server stores nothing.

15License

The project is available under the Elastic License 2.0. In short: free to use, copy, modify and embed — commercially included — but it may not be offered to third parties as a hosted or managed service, license notices must stay intact, and license-key functionality may not be circumvented. Vendored third-party assets keep their own licenses. See the LICENSE file in the repository for the full text.

16About

OASForge — formerly Swagger Dark UI — is designed, built and maintained by Kaan Dikeç — from the dark theme and the demo specification to the in-browser validator, mock server, converters and exporters. It is an independent open-source project.

ChannelAddress
Websitekaandikec.com
Source codegithub.com/dikeckaan/swagger-dark-ui
FeedbackGitHub issues

Copyright 2026 Kaan Dikeç. Licensed under the Elastic License 2.0.

No signup, no install — the editor runs entirely in your browser.

Open the OASForge editor