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

Crash if inherited property is structurally equal but not reference identical

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

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

2026年5月6日 から。

評価

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

説明

If a definition defines a property, and inherits from another definition that also defines the property:

  • If the properties are reference identical, it's allowed
  • If the properties are equivalent (but not reference identical), the tool crashes

Organic PRs hitting problem

Test Cases

Pass - Reference Identical
{
  "swagger": "2.0",
  "info": {
    "title": "structural-equality",
    "version": "1.0"
  },
  "paths": {},
  "definitions": {
    "Foo": {
      "type": "object",
      "properties": {
        "bar": {
          "$ref": "#/definitions/MyObject"
        }
      },
      "allOf": [
        {
          "$ref": "#/definitions/Foo2"
        }
      ]
    },
    "Foo2": {
      "type": "object",
      "properties": {
        "bar": {
          "$ref": "#/definitions/MyObject"
        }
      }
    },
    "MyObject": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  }
}
Fail - Structurally Equal
{
  "swagger": "2.0",
  "info": {
    "title": "structural-equality",
    "version": "1.0"
  },
  "paths": {},
  "definitions": {
    "Foo": {
      "type": "object",
      "properties": {
        "bar": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "allOf": [
        {
          "$ref": "#/definitions/Foo2"
        }
      ]
    },
    "Foo2": {
      "type": "object",
      "properties": {
        "bar": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}
Error
    incompatible properties : bar
      definitions/Foo/properties/bar
        at file:///home/mharder/openapi-diff-mh/incompat-prop/src/test/specs/incompatible-properties/structural-equality-fail.json#L12:8
      definitions/Foo2/properties/bar
        at file:///home/mharder/openapi-diff-mh/incompat-prop/src/test/specs/incompatible-properties/structural-equality-fail.json#L28:8
主要言語
C#
スター
290
フォーク
50
平均マージ
2日 21時間
マージ済み PR(30日)
10

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

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

はじめの一歩

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

Azure/openapi-diff のほかの issue

Azure/openapi-diff の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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