Expose nested JSON Schema export warnings from the root model
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- dart
調査の方向性
Start with the schema model returned by toSchemaModel() and trace how warnings are stored on object properties. Add a regression test for a date bound on an object property, checking that recursive warnings retain their path while node-local warnings keeps its current meaning. Done when the root model exposes the nested Draft-7 warning and the test confirms its path.
索引モデルが issue の本文から書いたものです。
説明
Reproduction
Verified on Ack 2.0.0-beta.3 from main at b8eb8eb with Dart 3.14.0. In a Dart package with ack: ^2.0.0-beta.3, run:
import 'package:ack/ack.dart';
void main() {
final schema = Ack.object({'at': Ack.datetime().min(DateTime.utc(2026))});
print(schema.safeParse({'at': '2025-12-31T00:00:00Z'}).isFail);
print(schema.toJsonSchema());
final model = schema.toSchemaModel() as AckObjectSchemaModel;
print(model.warnings.map((warning) => warning.code).toList());
print(model.properties!['at']!.warnings.map((warning) => warning.code).toList());
}
Actual
- The runtime rejects the out-of-range timestamp (
true). - Draft-7 export emits
at: {type: string, format: date-time}without the lower bound. This is expected; Draft-7 has no equivalent date bound. - The root's
warningsis[], while theatproperty'swarningsis[datetime_constraint_not_draft7]. An exporter that checks only the model it was handed doesn't see that part of the runtime contract was lost.
Suggested change
Expose a recursive allWarnings accessor that preserves each warning's path, or propagate child warnings to the root. An accessor would let warnings retain its existing node-local meaning. Add a regression test for a date bound on an object property.
- 主要言語
- Dart
- スター
- 64
- フォーク
- 3
- 平均マージ
- 17時間 32分
- マージ済み PR(30日)
- 33
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
btwld/ack のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
2.0 enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
2.0 enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
2.0 enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
fujidaiti/smooth_sheets#655 ·
メンテナーはふだん 1 日以内に返信
-
Drop the decision-issue rule from ARCHITECTURE.md対応中かも @abianche が今日担当しました。 オープンchore
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 61/100
メンテナーはふだん 1 日以内に返信
-
area: library feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100