OpenAPITools / OpenAPITools/openapi-diff

Mark down changelog generation - enum rename interpreted as added

Aperta
#828 1 commento 1 reazione 1 assegnatario Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Java
Stelle
1.1k
Fork
190
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I tested that on version 2.1.2 and 2.1.3. This unusual case but happened.

The following is modified excerpt of the json files. One of the enum field has bee renamed from 'StatusThree' to 'StatusNew'.

Then the change log has been generated in mark down format. The ideal case would be markdown reporting field renamed from A to B. The second best would be. A removed. B added. However markdown report states only the fact that B has been added.

Old Version:

{
    "definitions": {
        "SomeStatus": {
            "description": "Some status description",
            "enum": [
                "StatusOne",
                "StatusTwo",
                "StatusThree"
            ],
            "type": "string",
            "x-ms-enum": {
                "name": "SomeStatus",
                "modelAsString": false,
                "values": [
                {
                    "name": "StatusOne",
                    "value": "StatusOne"
                },
                {
                    "name": "StatusTwo",
                    "value": "StatusTwo"
                },
                {
                    "name": "StatusThree",
                    "value": "StatusThree"
                }
                ]
            }
        }
    }
}

New version:

{
    "definitions": {
        "SomeStatus": {
            "description": "Some status description",
            "enum": [
                "StatusOne",
                "StatusTwo",
                "StatusNew"
            ],
            "type": "string",
            "x-ms-enum": {
                "name": "SomeStatus",
                "modelAsString": false,
                "values": [
                {
                    "name": "StatusOne",
                    "value": "StatusOne"
                },
                {
                    "name": "StatusTwo",
                    "value": "StatusTwo"
                },
                {
                    "name": "StatusNew",
                    "value": "StatusNew"
                }
                ]
            }
        }
    }
}

Markdown output:

Changed response : 200 OK

Changed items (object):

* Changed property `status` (string)

    Added enum value:

    * `StatusNew`

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.