NullReferenceException when generating code for a parameter with no schema
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #502 @github-actions による — マージ済み
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- fsharp
- 領域
- api
調査の方向性
Start with OperationCompiler.fs around line 206 to trace how a parameter with Content is represented, then follow the call into DefinitionCompiler.fs around line 440 where schemaObj is null. Run the provider against the OpenAPI document in the issue and verify code generation completes for the parameter whose schema is nested under Content.
索引モデルが issue の本文から書いたものです。
説明
Hi,
I tried pointing the provider at an OpenApi schema on a new project at work, and got a NullReferenceException from it, causing the build to fail.
Trying to minimise the issue, it looks like if I have something like
{
"openapi": "3.1.1",
"info": {
"title": "Testing | v1",
"version": "0.2.0.0"
},
"paths": {
"/api/v1/catalogues/scan": {
"post": {
"tags": [
"Catalogue"
],
"summary": "Testing",
"description": "Testing",
"operationId": "Scan",
"parameters": [
{
"name": "properties",
"in": "header",
"description": "header description",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"stage-location": {
"type": "string",
"description": "location"
},
"file-size": {
"minimum": 0,
"type": "integer",
"format": "int64"
}
}
}
}
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
}
}
The the provider gets to https://github.com/fsprojects/SwaggerProvider/blob/4e299fd52e64fc2354a99e2acec3420078c4f7f0/src/SwaggerProvider.DesignTime/DefinitionCompiler.fs#L440 and then throws because schemaObj is null.
Looking higher up the callstack around https://github.com/fsprojects/SwaggerProvider/blob/4e299fd52e64fc2354a99e2acec3420078c4f7f0/src/SwaggerProvider.DesignTime/OperationCompiler.fs#L206, current.Schema is null, but it does have a 'Content' property, and that does contain a schema.
This is as far as I've got looking at it so far, will have another look next week if no one else of repo assist gets to it first.
Thanks.
- 主要言語
- F#
- スター
- 278
- フォーク
- 60
- 平均マージ
- 18時間 21分
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fsprojects/SwaggerProvider のほかの issue
-
agentic-workflows automation repo-assist
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
fsprojects/SwaggerProvider#411 ·
メンテナーはふだん 1 日以内に返信
-
bug needs investigation
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
fsprojects/SwaggerProvider#490 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
automation documentation repo-assist
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
fsprojects/SwaggerProvider#489 ·
メンテナーはふだん 1 日以内に返信
-
automation blocked enhancement repo-assist
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
fsprojects/SwaggerProvider#358 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
fsprojects/SwaggerProvider#33 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
fsprojects/SwaggerProvider の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
decentralized-identity/didwebvh-ts#203 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area/map-site bug layer/core size/S
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
marola-dev/marola-app#60 ·
メンテナーはふだん 1 日以内に返信
-
Telegram webhook: line breaks lost since switch to rich messages対応中かも @Kshot3000 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
get_seat_availability: 'GNWL/AVAILABLE'-style statuses are reported as available with no seat countオープンbug good first issue tools
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100