[Schema Inaccuracy] Artifact.Id is missing `int64` format
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 88/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- openapi
- 領域
- api
研究方向
開啟 api.github.com.json,找到 artifact 物件的 id 屬性。加入 issue 中顯示的 int64 格式,然後確認該 schema 是否會讓產生的用戶端使用 64 位元反序列化器,而不是整數反序列化器。
由索引模型根據 Issue 內容生成。
描述
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
- 分支
- 347
- 平均合併
- 2 小時 1 分鐘
- 30 天內合併 PR
- 80
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/rest-api-description 的其他 Issue
-
feature
難度 2/5 1-3 小時 新手友好度 62/100
github/rest-api-description#7286 ·
維護者通常 1 天內回覆
-
feature
難度 2/5 1-3 小時 新手友好度 82/100
github/rest-api-description#7246 ·
維護者通常 1 天內回覆
-
feature
難度 2/5 1-3 小時 新手友好度 85/100
github/rest-api-description#7220 ·
維護者通常 1 天內回覆
-
feature
難度 2/5 1-3 小時 新手友好度 82/100
github/rest-api-description#7201 ·
維護者通常 1 天內回覆
-
feature
難度 2/5 1-3 小時 新手友好度 72/100
github/rest-api-description#7163 ·
維護者通常 1 天內回覆
查看 github/rest-api-description 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 83/100
維護者通常 1 天內回覆
-
Object parameters lose their structure when resources is enabled可能已有人在做 @asts-top 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
nautechsystems/nautilus_trader#5364 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
temporalio/sdk-ruby#625 ·
維護者通常 1 天內回覆