Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Crash if inherited property is structurally equal but not reference identical

Đang mở
#482 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@mikeharder đang làm issue này rồi.

Từ ngày 6/5/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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
Ngôn ngữ chính
C#
Star
290
Fork
50
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
10

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/openapi-diff

Tất cả issue của Azure/openapi-diff

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.