A comprehensive, enterprise-ready VS Code extension for RAML (RESTful API Modeling Language) development. This extension provides a robust suite of tools including an intelligent language server, an interactive outline navigator, and a rich React-based graphical UI viewer.
Features
Interactive RAML Viewer (Webview)
A fast, graphical interface for your API specification:
Two-Pane Explorer: Browse the API resource tree on the left, and view detailed endpoint specifications on the right.
Rich Method Previews: Tabbed interfaces to clearly display Request details, Response schemas, and Examples.
Deep Type Expansion: Automatically expands and resolves nested alias properties and library inclusions (e.g. uses: common), so you can view the complete structure without ever having to leave the viewer.
Theme Native: Integrates seamlessly with your active VS Code theme (Light or Dark).
Live Sync: The viewer updates instantly as you edit your .raml files.
RAML Navigator (Sidebar Tree)
A comprehensive outline of your RAML architecture, anchored directly in the VS Code Explorer sidebar:
Hierarchical Tree: Understand your API at a glance. Expand through Resources, HTTP Methods, Data Types, Traits, Resource Types, and Examples.
1-Click Navigation: Click any node to instantly jump to the exact line/column definition in your code—even resolving targets across multiple !include files.
Context Actions: Right-click to quickly generate boilerplate scaffolds for new Resources, Methods, and Types.
Smart Error Bubbling: Parsing errors and unresolved types are flagged directly in the tree. The navigator explicitly identifies which alias failed to expand alongside clear inline warnings.
Advanced Language Server (LSP)
Powered by a highly optimized integration with raml-1-parser:
Real-Time Diagnostics: Get squiggly lines for syntax errors, missing includes, duplicate resources/methods, and invalid type references as you type.
Cross-File IntelliSense: Go-to-Definition, Hover Info, and Autocomplete works flawlessly across complex modular APIs built with external libraries and fragments.
Syntax Highlighting & Snippets: Features full TextMate grammar injection for syntax highlighting, plus rapid scaffolding snippets.
Diagnostic Crash Logs: Uncover upstream library parser issues with a dedicated "🐞 Internal RAML Parser Bug" action node that dumps a rich diagnostic trace when unrecoverable errors occur.
Extension Settings
This extension contributes the following settings:
raml.tabSize: Expected number of spaces for indentation (default: 2).
raml.maxNestingDepth: Maximum recursion depth when resolving nested object properties and data types (default: 20).
raml.trace.server: Traces the communication between VS Code and the RAML Language Server.
Commands
Command
Description
RAML: Open Viewer
Opens the rich React webview for the active RAML document.
RAML: Refresh Navigator
Forces a manual refresh of the sidebar tree.
RAML: Go to Definition
Intelligently jumps to the definition of a type, trait, or include.
RAML: Add Resource
Generates a new resource scaffold at the current cursor location.
RAML: Add Method
Generates a new HTTP method scaffold.
RAML: Show Diagnostic Log
Opens the last crash log if the internal upstream parser encounters an issue.
Known Issues
In highly complex circular type inheritances, the viewer may stop expanding nested properties at raml.maxNestingDepth to prevent infinite loops.