Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ResolveFully fails on internal references when the initial spec is read from a file URL

オープン 初心者向け
#1,922 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

@pavelkryl がすでに取り組んでいます。

2026年6月9日 から。

  • #2342 @pavelkryl による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
java
領域
tooling

調査の方向性

まず、file:// URL から読み込まれた初期 OpenAPI 仕様と、#/components/pathItems/getPet のような内部 $ref を使って resolveFully を再現します。Visitor.readFile() と、スタックトレースに示されている周辺の URI 処理を確認します。回帰テストを追加し、FileNotFoundException なしで内部参照が解決されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Hi,
While testing the new 3.1.0 feature of a pathItem in components, I found that resolveFully is not replacing internal references such as $ref: "#/components/pathItems/getPet" when the initial URL to the spec is a file:// URL. There is an exception in the log like this:

java.io.FileNotFoundException: file:/...../target/test-classes/petstore-3.1.yaml (Aucun fichier ou dossier de ce type)
        at java.io.FileInputStream.open0(Native Method) ~[?:?]
        at java.io.FileInputStream.open(FileInputStream.java:216) ~[?:?]
        at java.io.FileInputStream.<init>(FileInputStream.java:157) ~[?:?]
        at java.io.FileInputStream.<init>(FileInputStream.java:111) ~[?:?]
        at io.swagger.v3.parser.reference.Visitor.readFile(Visitor.java:66) ~[swagger-parser-v3-2.1.13.jar:2.1.13]
        at io.swagger.v3.parser.reference.Visitor.readURI(Visitor.java:84) ~[swagger-parser-v3-2.1.13.jar:2.1.13]
        at io.swagger.v3.parser.reference.ReferenceVisitor.parse(ReferenceVisitor.java:279) ~[swagger-parser-v3-2.1.13.jar:2.1.13]

This is true for any internal reference from the initial specification.
The Visitor.readFile() method needs to transform the file URL to a valid path.
I've never contributed to swagger before but I could create a test case and PR for this issue.

主要言語
Java
スター
870
フォーク
565
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

swagger-api/swagger-parser のほかの issue

swagger-api/swagger-parser の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。