Materin View

by leapord
5
4
3
2
1
Score: 50/100

Description

Reviews

No reviews yet.

Stats

0
stars
33
downloads
0
forks
5
days
5
days
5
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
4
commits

Latest Version

5 days ago

Changelog

YAML robustness: multi-document YAML streams and flow-style YAML specs now parse correctly; clearer combined JSON+YAML error messages when a source matches neither format.

README file from

Github

Materin 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 $ref resolution (OpenAPI 3.x components + Swagger 2.0 definitions)
  • 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:

  1. Download main.js, manifest.json, styles.css
  2. Put them into <vault>/.obsidian/plugins/materin-view/
  3. Enable "Materin View" in Obsidian's community plugin settings

Usage

  1. Open the view from the ribbon icon (globe) or command "打开 OpenAPI 视图"
  2. Add documents via "+ 添加文档" (manual path/URL or workspace scan), or right-click a spec file in the file explorer
  3. 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)

License

MIT