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

[Schema Inaccuracy] Artifact.Id is missing `int64` format

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

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
openapi
領域
api

調査の方向性

api.github.com.json を開き、artifact オブジェクトの id プロパティを見つけます。Issue に示されている int64 形式を追加し、その後、スキーマによって生成されたクライアントが整数デシリアライザーではなく 64 ビットデシリアライザーを使用することを確認します。

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

説明

feature

Schema Inaccuracy

When I use Kiota to generate clients for the GitHub API, I get a deserialization error when retreiving artifacts through the API. The value for the Artifact.Id is simply too large and exceeds an Int32.

Expected

It should not result in deserialization errors.

Problem

In the api.github.com.json file, the Actor.Id is defined as:

      "artifact": {
        "title": "Artifact",
        "description": "An artifact",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 5
          },

This makes Kiota belive that it can use an integer deserializer:

        public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
        {
            return new Dictionary<string, Action<IParseNode>>
            {
                { "archive_download_url", n => { ArchiveDownloadUrl = n.GetStringValue(); } },
                { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } },
                { "digest", n => { Digest = n.GetStringValue(); } },
                { "expired", n => { Expired = n.GetBoolValue(); } },
                { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } },
--->            { "id", n => { Id = n.GetIntValue(); } },
                { "name", n => { Name = n.GetStringValue(); } },
                { "node_id", n => { NodeId = n.GetStringValue(); } },
                { "size_in_bytes", n => { SizeInBytes = n.GetIntValue(); } },
                { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } },
                { "url", n => { Url = n.GetStringValue(); } },
                { "workflow_run", n => { WorkflowRun = n.GetObjectValue<global::GitPackagesManager.ApiClient.Models.Artifact_workflow_run>(global::GitPackagesManager.ApiClient.Models.Artifact_workflow_run.CreateFromDiscriminatorValue); } },
            };
        }

If the Artifact.Id had been defined as

      "artifact": {
        "title": "Artifact",
        "description": "An artifact",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 5,
            "format": "int64"
          },

the 'Id' line in the generated GetFieldDeserializers() method would use n.GetLongValue() instead of n.GetIntValue()

主要言語
言語のデータがありません
スター
1.6k
フォーク
345
平均マージ
6時間
マージ済み PR(30日)
82

環境構築

はじめの一歩

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

github/rest-api-description のほかの issue

github/rest-api-description の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

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

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