Schema not found, while being present
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
リンクされた PagerDuty openapiv3.json と、示されている cargo progenitor コマンドを使って失敗を再現し、その後、スキーマが見つからないことによる panic の周辺にある typify-impl/src/convert.rs の参照処理を調べてください。パラメーターのネストされたスキーマがどのように解決されるかを確認し、この入力に対する生成が、参照が見つからないことによる panic なしに完了することを検証してください。
索引モデルが issue の本文から書いたものです。
説明
Summary:
When running progenitor via command-line (cargo progenitor ...) against a PageDuty REST API document (raw json below) I get an error that audit_method_type/schema is missing, however, when searching the json I see "audit_method_type": ... specified.
I am not fully versed in Swagger/OpenAPI specs so I may be missing an issue with the PagerDuty OpenAPI spec itself.
(And, notably, the 52k line spec seems to produce some, but different, failures on everything that ingests it. Sometimes with circular references noted. Working with progenitor is part of how I'm trying to approach the spec. If this looks to ornery to tackle I'll also happily take any suggestions on how to piece out and sub-verify the spec myself. [and bring back any progenitor specific errors afterward])
=============================
Details:
1. nominal OpenAPI version (from json):
3.0.2
2. cargo-progenitor version (from cargo install --list):
v0.6.0
3. raw, commit-connected link:
PagerDuty/api-schema/rest/openapiv3.json
4. command line used:
RUST_BACKTRACE=1 RUST_LOG=trace cargo progenitor --input pagerduty_rest_api_public.json --output pd_rest_progenated --name pd_rest_rs --version 0.1.0
(note: the input file there reads "pagerduty_rest_api_public.json", but should be identical to the canonical "openapiv3.json")
5. output with backtrace:
[2024-05-06T13:33:41Z INFO typify_impl::convert] convert_schema Suggested("AuditRecordMethod_truncated_token") {
"description": "Truncated token containing the last 4 chars of the token's actual value.",
"examples": [
"3xyz"
],
"type": "string"
}
[2024-05-06T13:33:41Z INFO typify_impl::convert] convert_schema Suggested("AuditRecordMethod_type") {
"$ref": "#/components/parameters/audit_method_type/schema"
}
thread 'main' panicked at /Users/esl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typify-impl-0.0.16/src/convert.rs:1126:32:
$ref #/components/parameters/audit_method_type/schema is missing
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object
3: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema
4: typify_impl::TypeSpace::id_for_schema
5: typify_impl::structs::<impl typify_impl::TypeSpace>::struct_property
6: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
7: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
8: core::iter::adapters::try_process
9: typify_impl::structs::<impl typify_impl::TypeSpace>::struct_members
10: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_object
11: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object
12: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema
13: typify_impl::TypeSpace::id_for_schema
14: typify_impl::structs::<impl typify_impl::TypeSpace>::struct_property
15: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
16: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
17: core::iter::adapters::try_process
18: typify_impl::structs::<impl typify_impl::TypeSpace>::struct_members
19: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_object
20: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema_object
21: typify_impl::convert::<impl typify_impl::TypeSpace>::convert_schema
22: typify_impl::TypeSpace::convert_ref_type
23: typify_impl::TypeSpace::add_ref_types
24: progenitor_impl::Generator::generate_tokens
25: cargo_progenitor::main
6. what appears to be the missing schema, in the openapiv3.json:
"audit_method_type": {
"name": "method_type",
"in": "query",
"description": "Method type filter.",
"schema": {
"type": "string",
"description": "Describes the method used to perform the action:\n\n`browser` -- authenticated user session. Session value is not returned in the `truncated_token` field.\n\n`oauth` -- access token obtained via the OAuth flow. Truncated token value is returned in the `truncated_token` field.\n\n`api_token` -- Pagerduty API token. Truncated token value is returned in the `truncated_token` field.\n\n`identity_provider` -- action performed by an Identity provider on behalf of a user. No value is returned in the `truncated_token` field.\n\n`other` -- Method that does not fall in the predefined categories. Truncated token value MAY be returned in the `truncated_token` field.\n",
"enum": [
"browser",
"oauth",
"api_token",
"identity_provider",
"other"
]
}
},
- 主要言語
- Rust
- スター
- 1k
- フォーク
- 142
- 平均マージ
- 19時間 13分
- マージ済み PR(30日)
- 16
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oxidecomputer/progenitor のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oxidecomputer/progenitor#1345 ·
メンテナーはふだん 1 日以内に返信
-
Generated client treats a declared 304 Not Modified as UnexpectedResponse対応中かも @jjant が 5 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
oxidecomputer/progenitor#1462 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
oxidecomputer/progenitor#1457 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
oxidecomputer/progenitor#1444 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
oxidecomputer/progenitor#1382 ·
メンテナーはふだん 1 日以内に返信
oxidecomputer/progenitor の issue をすべて見る
似ている issue
-
area: cli good first issue type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
renaming a provider to a taken name fails with a raw sql error対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea:storage kind:bug priority:p3 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug bugfix
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
storytold/photocraft#16975 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信