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

[Schema Inaccuracy] example seemingly used as a pseudo-discriminator

オープン
#368 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

@nickfloyd がすでに取り組んでいます。

2025年11月6日 から。

評価

この issue はまだ評価されていません。

説明

feature inaccuracy P4

.components.schemas.environment.properties.protection_rules (and some other places I think) is defined as:

    "anyOf": [
      {
        "type": "object",
        "properties": {
          "id": { "type": "integer", "example": 3515 },
          "node_id": { "type": "string", "example": "MDQ6R2F0ZTM1MTU=" },
          "type": { "type": "string", "example": "wait_timer" },
          "wait_timer": { "$ref": "#/components/schemas/wait-timer" }
        },
        "required": [ "id", "node_id", "type" ]
      },
      {
        "type": "object",
        "properties": {
          "id": { "type": "integer", "example": 3515 },
          "node_id": { "type": "string", "example": "MDQ6R2F0ZTM1MTU=" },
          "type": { "type": "string", "example": "required_reviewers" },
          "reviewers": { ... }
        },
        "required": [ "id", "node_id", "type" ]
      },
      {
        "type": "object",
        "properties": {
          "id": { "type": "integer", "example": 3515 },
          "node_id": { "type": "string", "example": "MDQ6R2F0ZTM1MTU=" },
          "type": { "type": "string", "example": "branch_policy" }
        },
        "required": [ "id", "node_id", "type" ]
      }

The examples associated with the type property seem to be used as discriminator values (although without that being spelled out explicitely anywhere).

I understand OpenAPIv3 has a discriminator feature for exactly that use case.

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

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

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

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

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