Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Crash if inherited property is structurally equal but not reference identical

Aperta
#482 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@mikeharder ci sta già lavorando.

Dal 6/5/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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
Lingua principale
C#
Stelle
290
Fork
50
Merge medio
2g 21h
PR unite (30g)
10

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/openapi-diff

Tutte le issue di Azure/openapi-diff

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.