OpenAPITools / OpenAPITools/openapi-diff

Mark down changelog generation - enum rename interpreted as added

Abierto
#828 1 comentario 1 reacción 1 asignado Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Java
Estrellas
1.1k
Forks
190
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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`

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.