Getting $ref history

オープン
#1,146 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
backend

調査の方向性

Issue の validator.iter_errors の例から始め、参照 #1144 を確認してから、非推奨の validator.resolver が $ref のスコープ履歴をどのように公開しているかを追跡します。プロジェクトが、非推奨の resolver に依存せずにこのデバッグ情報を取得するためのサポートされた方法を提供し、期待される動作が文書化されるかテストでカバーされれば完了です。

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

説明

Dialects v2 Enhancement Error Reporting

In large schemas, understanding which $ref is being referenced when an error occurs can be helpful in debugging. We used to refer to the history of $ref with (ill-mannered) code like this:

for error in validator.iter_errors(instance):
    print(validator.resolver._scopes_stack)
    print(error)

However, with the current version of jsonschema, validator.resolver is deprecated, and it will be not possible to refer to it.

Is there a legitimate way to retrieve this information in jsonschema?

Reference: #1144

主要言語
Python
スター
5k
フォーク
741
平均マージ
4日 17時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

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

python-jsonschema/jsonschema のほかの issue

python-jsonschema/jsonschema の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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