Code Editor
Direct Spec Editing
The Code Editor gives you full control over your OpenAPI specification. Edit the raw YAML or JSON directly with syntax highlighting, validation, and real-time preview.
When to Use Code Editor
Use the Code Editor when you need precise control, want to copy/paste spec snippets, or prefer working with raw YAML/JSON.
Accessing the Code Editor
Open a Project in Designer Mode
Toggle to "Designer" view using the Area/Designer switch.
Select Design or Split View
Choose "Design" for full-width editing or "Split" to see Preview alongside.
Click "Editor"
Toggle between "Editor" and "Visual Designer" using the buttons.
YAML vs JSON
Switch between formats instantly - your spec content is preserved:
- - Cleaner, less verbose
- - Easier to read
- - Indentation-based
- - Strict syntax
- - Universal format
- - Better for APIs
Which Format Should I Use?
Both formats are equivalent, but each has strengths for different situations:
Choose YAML when:
- - Writing specs by hand (cleaner syntax)
- - Working with large, complex specs (easier to read)
- - Using multi-line descriptions (no escape sequences)
- - Collaborating with humans (git diffs are cleaner)
Choose JSON when:
- - Integrating with JavaScript/TypeScript tools
- - Generating specs programmatically
- - Strict validation is required (no implicit type conversion)
- - Consuming from APIs that return JSON
Conversion Gotchas
YAML Booleans
yes, no,on, off are treated as booleans. Use quotes if you mean strings: "yes"
Numbers in YAML
version: 1.0 becomes a number. Quote it: version: "1.0"
Editor Features
Syntax Highlighting
Keys, values, strings, and numbers are color-coded for easy reading. Supports both YAML and JSON syntax.
Line Numbers
Line numbers help you navigate large specs and match error messages to specific locations.
Editor Toolbar
Hover over the editor to reveal the toolbar buttons in the top-right corner:
Copy
Copy the entire spec to clipboard. Shows "Copied!" confirmation for 2 seconds.
Format
Beautify your code with proper indentation and line breaks. Makes specs easier to read.
Minify
Compress code by removing whitespace. Useful when sharing or embedding specs.
Smart Paste Detection
When you paste a large OpenAPI spec (500+ characters containing "openapi:"), Tigrister detects it automatically and updates the preview immediately.
Quick Import Tip
Found a spec online? Just copy the entire YAML/JSON and paste it into the editor. Tigrister will parse and display it instantly in the Preview panel.
Editor State Persistence
The editor remembers your position when you switch between views or close and reopen the designer:
Scroll Position
Jump back to where you were
Cursor Position
Continue editing seamlessly
Per-Project
Each project remembers separately
Real-time Validation
As you type, the editor validates your spec against the OpenAPI schema:
Errors
Invalid syntax or schema violations. Must be fixed before saving. Error count shown in toolbar.
Warnings
Best practice suggestions or potential issues. Won't block saving but worth reviewing.
- -Line 5: Missing required field "responses" in operation
- -Line 12: Invalid HTTP method "FETCH"
The banner shows a summary of all errors and warnings. Up to 3 errors are displayed inline. Fix all errors before the Save button becomes available.
Common Patterns (Copy & Paste)
Frequently used OpenAPI patterns ready to copy into your spec:
CRUD Endpoint
Copy-paste readyPagination Parameters
Reusable componentStandard Error Response
Consistent errorsBearer Token Security
JWT authenticationUsing References
After adding components, reference them with $ref: '#/components/schemas/Error'or $ref: '#/components/parameters/PageParam'
Tips
Use Split View
See your changes reflected in the Preview instantly as you edit.
Copy from Examples
Copy spec snippets from online examples and paste directly into the editor.
Fix Errors First
The Save button is disabled when errors exist. Fix all red errors before saving.
Indent with Spaces
YAML requires consistent indentation. Use 2 spaces per level.