← スキル一覧に戻る

uri-handling-utilities
by hanayashiki
VSCode Plugin and Language Service for OpenAPI documents
⭐ 0🍴 0📅 2026年1月10日
SKILL.md
name: uri-handling-utilities description: Use core utilities from @openapi-lsp/core for URI/URL and JSON Pointer handling. Apply when working with refs, URIs, JSON Pointers, URL fragments, or document references.
URI and JSON Pointer Handling
Use the RFC 6901-compliant utilities from @openapi-lsp/core for all URI/URL and JSON Pointer operations.
Import
import {
parseJsonPointer,
parseUriWithJsonPointer,
isLocalPointer,
uriWithJsonPointerLoose,
isNodeInDocument,
} from "@openapi-lsp/core/json-pointer";
Utilities
parseJsonPointer(pointer: string)
Parse JSON Pointer strings per RFC 6901. Handles raw ("/foo/bar") and URI fragments ("#/foo/bar").
parseUriWithJsonPointer(uri: string, baseUri?: string)
Parse full URI references, separating URL and fragment into { url, docUri, jsonPointer }.
isLocalPointer(ref: string)
Check if a $ref is local (starts with #).
uriWithJsonPointerLoose(uri: string, path: JsonPointerLoose)
Build URI references with properly encoded JSON Pointer fragments.
isNodeInDocument(nodeId: string, documentUri: string)
Check if a nodeId belongs to a document:
isNodeInDocument("file:///foo.yaml", "file:///foo.yaml"); // true (root)
isNodeInDocument("file:///foo.yaml#/User", "file:///foo.yaml"); // true (fragment)
isNodeInDocument("file:///bar.yaml#/User", "file:///foo.yaml"); // false
Key Rules
- Always use these utilities - Never manually parse URI/JSON Pointer strings
- Check Result types - Use
result.successbefore accessingresult.data - Provide baseUri for relative refs -
parseUriWithJsonPointer(ref, baseUri) - Use
isNodeInDocumentfor membership checks - Don't usestartsWith(uri + "#")
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です