README file from
GithubMaterin View
An Obsidian plugin that reads OpenAPI/Swagger specifications and renders them as a knife4j-style documentation view — with both browsing and debugging (send real requests) support.
Features
- Multi-document sources: add spec files from your vault (
.json/.yaml/.yml) or remote URLs — each source renders as an independent collapsible document menu - Markdown-embedded specs: OpenAPI JSON/YAML inside fenced code blocks in your notes is extracted and rendered
- Workspace scan: detect OpenAPI files across the vault by content (not filename), one click to add
- Context menu / commands: right-click a spec file → "Open with Materin View"; or scan via command palette
- knife4j-style docs: tag tree, method badges, parameters table, request/response schemas with
$refresolution (OpenAPI 3.xcomponents+ Swagger 2.0definitions) - Debug panel: editable base URL per document, parameter forms generated from the spec, request headers, JSON body — send requests from inside Obsidian (via
requestUrl, no CORS issues) and inspect status / headers / body - Variables:
{{key}}substitution in URL / headers / body with global and per-document scopes (document scope wins)
Install
From this repository's releases:
- Download
main.js,manifest.json,styles.css - Put them into
<vault>/.obsidian/plugins/materin-view/ - Enable "Materin View" in Obsidian's community plugin settings
Usage
- Open the view from the ribbon icon (globe) or command "打开 OpenAPI 视图"
- Add documents via "+ 添加文档" (manual path/URL or workspace scan), or right-click a spec file in the file explorer
- Pick an endpoint on the left — "文档" tab for the spec, "调试" tab to send requests
Development
npm install
npm run dev # watch build
npm run build # type-check + production build -> main.js
npm test # unit tests (vitest)